Mdo Class Reference

#include <Mdo.h>

Inheritance diagram for Mdo:

Inheritance graph
[legend]
List of all members.

Detailed Description

The default object of the Mdo Data type.

requirements
win98 or later
win2k or later
MFC
Version:
1.0 first version
Date:
09-16-2005
Author:
kamp
license
This code is absolutely free to use and modify. The code is provided "as is" with no expressed or implied warranty. The author accepts no liability if it causes any damage to your computer, causes your pet to fall ill, increases baldness or makes your car start emitting strange noises when you start it up. This code has no bugs, just undocumented features!

Todo:

Bug:

Definition at line 1050 of file Mdo.h.

Public Member Functions

 Mdo (void)
 ~Mdo (void)
virtual bool ReadData (FILE *inputFilePtr)
virtual bool WriteData (FILE *outputFilePtr)
virtual bool FileRetrieveData (H_BYTE *data, size_t *length, long *location, long direction=0)
bool FileStoreData (H_BYTE *data, size_t *length, long *location, long direction)
void ErrEnd (char *errMessage, long errorType=0)
void CopyHeader (_mdo_header *newHeader)
void SetDebug ()
void UnsetDebug ()
long GetNumberOfDimensions ()
long GetStorageWordLength ()
float GetMinScale ()
float GetMaxScale ()
float GetMaxAbs ()
float GetMinValue ()
float GetMaxValue ()
char * GetTitle ()
MdoRetrieveInfo * GetUserDataInfo ()
virtual void flush ()
bool retrieveLine (H_BYTE *data, size_t length, long *location, long direction)
bool ReturnDebug (void)
void PrintSerialNumber ()
unsigned long GetSerialNumber ()
wxString GetSerialNumberString ()

Protected Member Functions

bool DeleteHeader ()
void SetDimensions (long dimension, long *setCounts, long setStorageWordLength)
virtual bool RetrieveData (H_BYTE *data, size_t *arrayLength, long *location, long direction=0)
virtual bool StoreData (H_BYTE *data, size_t *length, long *location, long direction=0)

Protected Attributes

_mdo_header * header
bool byteSwap
bool dimensionSet
long typeOfStorage
long numberOfStorageFiles
char ** fileNames
H_BYTE * memPtr
float minScale
float maxScale
bool MDODEBUG
MdoRetrieveInfo * userDataInfo

Private Member Functions

void TransposePlane (H_BYTE *plane, long numberColumns, long numberRows)
void CleanFileNames ()
void SetTitle (char *newTitle)
bool ReadMdo (char *mdoInputFileName)
bool WriteMdo (char *mdoOutputFileName)
void Dump (char *dumpMessage="Mdo Dump")
void Open ()
void Open (char *newFileName)
void SetSampleRates (float *inputSampleRates)
void SetAnnotationStart (float *inputAnnotationStart)
void SetAnnotationEnd (float *inputAnnotationEnd)
void SetAnnotationLabels (char inputAnnotationLabels[3][MAX_ANNOTATION_SIZE+1])
void SetScale (float inputMinScale, float inputMaxScale)
void SetPlaneExtents (long index, long min, long max)
long GetDimension (long dimension)
long GetXDimension ()
long GetYDimension ()
long GetZDimension ()
float GetXAnnotationStart ()
float GetYAnnotationStart ()
float GetZAnnotationStart ()
float GetXAnnotationEnd ()
float GetYAnnotationEnd ()
float GetZAnnotationEnd ()
char * GetXAnnotationLabel ()
char * GetYAnnotationLabel ()
char * GetZAnnotationLabel ()
bool CopyMDO (MdoADT *newMDO)
void StoreDataValue (long data, long *location, long dir)
void StoreDataValue (float data, long *location, long dir)
void StoreDataValue (H_BYTE data, long *location, long dir)
float GetTrueMinValue ()
float GetTrueMaxValue ()
void SetTrueMinMaxValues (float minValue, float maxValue)
void Save (FILE *fp)
long Retrieve (FILE *fp)
void SetUserDataInfo (MdoRetrieveInfo *inputStructure)
void Flush ()
void FindLocation (size_t offset, long *location)
size_t GetMdoMemorySize (long localStorage)
bool RetrieveLine (H_BYTE *data, size_t length, long *location, long direction)
bool RetrieveBytePlane (H_BYTE *retrievedPlane, long *planeStart, long *planeEnd, long transpose=FALSE)
bool RetrievePlane (H_BYTE *retrievedPlane, long *planeStart, long *planeEnd, long transpose=FALSE)
long GetD1 (long *planeStart, long *planeEnd)
long GetD2 (long *planeStart, long *planeEnd)
void StoreFetchedStride (long *inputFetchStride)
bool SupplyRetrieveVector (MdoUserRetrieveVector suppliedUserVector)


Constructor & Destructor Documentation

Mdo::Mdo void   ) 
 

Default constructor

Parameters:
void 
Returns:

Definition at line 8 of file Mdo.cpp.

References NclLog::Creation().

00009 {
00010   MyLog->Creation( "MDO", this );
00011 }

Mdo::~Mdo void   ) 
 

Default destructor

Parameters:
void 
Returns:

Definition at line 13 of file Mdo.cpp.

References NclLog::Destruction().

00014 {
00015   MyLog->Destruction( "MDO", this );
00016 }


Member Function Documentation

void Mdo::CleanFileNames  )  [private]
 

delete pointers associated with fileNames

Reimplemented from MdoADT.

void MdoADT::CopyHeader _mdo_header *  newHeader  )  [inline, inherited]
 

This copies the header from the entered header structure This is a memcpy of one header to another.

Parameters:
*newHeader 

Definition at line 576 of file Mdo.h.

00576 { memcpy ( header, newHeader, sizeof(header)); }

bool Mdo::CopyMDO MdoADT *  newMDO  )  [private]
 

* Copies this MDO to another on this machine. In the following, location is a (nx, ny, nz, ...) location In order to (store,retrieve)Data() just call a *{Store,Retrieve}Data() member function that is appropriate to the internal storage type. *

Parameters:
*newMDO 
Returns:

Reimplemented from MdoADT.

Definition at line 314 of file Mdo.cpp.

00315 {
00316   return false;
00317 }

bool MdoADT::DeleteHeader  )  [protected, inherited]
 

Delete the Mdo Header.

Returns:

void Mdo::Dump char *  dumpMessage = "Mdo Dump"  )  [private]
 

Utility that prints out the various parameters of this mdo.

Parameters:
*dumpMessage 

Reimplemented from MdoADT.

Definition at line 100 of file Mdo.cpp.

00101 {
00102 }

void MdoADT::ErrEnd char *  errMessage,
long  errorType = 0
[inherited]
 

This is a utility that prints error messages. We use a default value of 1 to correspond to the nmeonic of several things can go wrong (1,2,3,...) but only one thing can go right (0). These errorType integers are passed to the exit call in the method.

Parameters:
*errMessage 
errorType 

bool Mdo::FileRetrieveData H_BYTE *  data,
size_t *  length,
long *  location,
long  direction = 0
[virtual]
 

This retrieves an array of length length in an mdo file version. Location follows the mdo data location convention.

Parameters:
*data 
*length 
*location 
direction 
Returns:

Reimplemented from MdoADT.

Definition at line 548 of file Mdo.cpp.

00551   {
00552     return false;
00553   }

bool Mdo::FileStoreData H_BYTE *  data,
size_t *  length,
long *  location,
long  direction
[virtual]
 

This stores an array of length length in an mdo file version. Location follows the mdo data location convention.

Parameters:
*data 
*length 
*location 
direction 
Returns:

Reimplemented from MdoADT.

Definition at line 572 of file Mdo.cpp.

00574    {
00575      return false;
00576      }

void Mdo::FindLocation size_t  offset,
long *  location
[private, virtual]
 

The inverse of findOffset. This will produce a location when given an offset. The resulting array must be freed by the user.

Parameters:
offset 
*location 

Implements MdoADT.

Definition at line 560 of file Mdo.cpp.

00561   {
00562   }

virtual void MdoADT::flush  )  [inline, virtual, inherited]
 

Flushes mdo buffers if on disk Set the storage parameters for a specific typeOfStorage if typeOfStorage == singleFile, take a bunch of default values for block dimensions, cache size, etc. Allowable storageType's are: none, memory, singleFile, multipleFiles Of course, a storage type of none is not very productive. It will however, provide access to header and other non-data portions of the mdo.

Definition at line 912 of file Mdo.h.

00912 {}

void Mdo::Flush  )  [private]
 

Flushes mdo buffers if on disk Set the storage parameters for a specific typeOfStorage if typeOfStorage == singleFile, take a bunch of default values for block dimensions, cache size, etc. Allowable storageType's are: none, memory, singleFile, multipleFiles Of course, a storage type of none is not very productive. It will however, provide access to header and other non-data portions of the mdo.

Definition at line 444 of file Mdo.cpp.

00444 {}

long Mdo::GetD1 long *  planeStart,
long *  planeEnd
[private]
 

This method will find the first varying direction in the plane parallel to the axis that contains both the points planeStart and planeEnd.

Parameters:
*planeStart 
*planeEnd 
Returns:

Reimplemented from MdoADT.

Definition at line 479 of file Mdo.cpp.

00480 {
00481   return (long)NULL;
00482 }

long Mdo::GetD2 long *  planeStart,
long *  planeEnd
[private]
 

This method will find the second varying direction in the plane parallel to the axis that contains both the points planeStart and planeEnd.

Parameters:
*planeStart 
*planeEnd 
Returns:

Reimplemented from MdoADT.

Definition at line 493 of file Mdo.cpp.

00494 {
00495   return (long)NULL;
00496 }

long Mdo::GetDimension long  dimension  )  [private]
 

Retrieve a sepcific number of samples in direction getDimension.

Parameters:
dimension 
Returns:

Reimplemented from MdoADT.

Definition at line 187 of file Mdo.cpp.

00188 {
00189   return 0;
00190 }

float MdoADT::GetMaxAbs  )  [inline, inherited]
 

These methods return various extrema of the mdo. These extrema are caculated during the data loading phase of the mdo.

The above scaling methods only work with float, H_BYTE, and long types.

Returns:

Definition at line 805 of file Mdo.h.

References _mdo_header::maxAbs.

00805 { return header->maxAbs;}

float MdoADT::GetMaxScale  )  [inline, inherited]
 

Gets the scale's used for conversion to H_BYTE data in retrieveBytePlane. Data retrieved as bytes are returned scaled by (maxScale-minScale). The origin of the H_BYTE data is set at (maxScale+minScale)/2.0

Returns:

Definition at line 794 of file Mdo.h.

00794 { return maxScale;}

float MdoADT::GetMaxValue  )  [inline, inherited]
 

These methods return various extrema of the mdo. These extrema are caculated during the data loading phase of the mdo.

The above scaling methods only work with float, H_BYTE, and long types.

Returns:

Definition at line 825 of file Mdo.h.

References _mdo_header::maxValue.

00825 { return header->maxValue;}

size_t Mdo::GetMdoMemorySize long  localStorage  )  [private, virtual]
 

Returns the size of this mdo in bytes.

Parameters:
localStorage 
Returns:

Implements MdoADT.

Definition at line 451 of file Mdo.cpp.

00452 {
00453   return (size_t)NULL;
00454 }

float MdoADT::GetMinScale  )  [inline, inherited]
 

Gets the scale's used for conversion to H_BYTE data in retrieveBytePlane. Data retrieved as bytes are returned scaled by (maxScale-minScale). The origin of the H_BYTE data is set at (maxScale+minScale)/2.0

Returns:

Definition at line 787 of file Mdo.h.

00787 { return minScale;}

float MdoADT::GetMinValue  )  [inline, inherited]
 

These methods return various extrema of the mdo. These extrema are caculated during the data loading phase of the mdo.

The above scaling methods only work with float, H_BYTE, and long types.

Returns:

Definition at line 815 of file Mdo.h.

References _mdo_header::minValue.

00815 { return header->minValue;}

long MdoADT::GetNumberOfDimensions  )  [inline, inherited]
 

Retrieve the number of dimensions (directions) in this mdo.

Returns:

Definition at line 665 of file Mdo.h.

References _mdo_header::dimension.

00665 { return header->dimension; } ;

unsigned long NclBase::GetSerialNumber  )  [inherited]
 

Return the serial number as an unsigned long.

Parameters:
void 
Returns:

Definition at line 82 of file NclBase.cpp.

References NclBase::serialNumber.

00084 {
00085   return(serialNumber);
00086 }

wxString NclBase::GetSerialNumberString  )  [inherited]
 

Return the serial number as a wxString.

Parameters:
void 
Returns:

Definition at line 88 of file NclBase.cpp.

References NclBase::serialNumber.

Referenced by NclLog::Creation(), NclLog::Destruction(), and NclCanvas::OnDraw().

00090 {
00091   wxString rv;
00092     rv.Printf( "%d", serialNumber );
00093   return rv;
00094 }

long MdoADT::GetStorageWordLength  )  [inline, inherited]
 

Retrieve the number storage word length.

Returns:

Definition at line 678 of file Mdo.h.

References _mdo_header::storageWordLength.

00678 { return header->storageWordLength; } ;

char* MdoADT::GetTitle  )  [inline, inherited]
 

Returns a pointer to the mdo title.

Returns:

Definition at line 862 of file Mdo.h.

00862 { return title; }

float Mdo::GetTrueMaxValue  )  [private]
 

These methods return various extrema of the mdo. These extrema are caculated during the data loading phase of the mdo.

The above scaling methods only work with float, H_BYTE, and long types.

Returns:

Reimplemented from MdoADT.

Definition at line 372 of file Mdo.cpp.

00373 {
00374   return (float)NULL;
00375 }

float Mdo::GetTrueMinValue  )  [private]
 

The above scaling methods only work with float, H_BYTE, and long types.

Returns:

Reimplemented from MdoADT.

Definition at line 359 of file Mdo.cpp.

00360 {
00361   return (float)NULL;
00362 }

MdoRetrieveInfo* MdoADT::GetUserDataInfo  )  [inherited]
 

Gets the userDataInfo structure.

Returns:

float Mdo::GetXAnnotationEnd  )  [private]
 

these three methods get the annotation value of the end sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 252 of file Mdo.cpp.

00253 {
00254   return 0.0;
00255 }

char * Mdo::GetXAnnotationLabel  )  [private]
 

these three methods get the annotation value of the end sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 281 of file Mdo.cpp.

00282 {
00283   return NULL;
00284 }

float Mdo::GetXAnnotationStart  )  [private]
 

these three methods get the annotation value of the start sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 224 of file Mdo.cpp.

00225 {
00226   return 0.0;
00227 }

long Mdo::GetXDimension  )  [private]
 

These three methods return the mdo deimensions in the first three directions.

Returns:

Reimplemented from MdoADT.

Definition at line 197 of file Mdo.cpp.

00198 {
00199   return 0;
00200 }

float Mdo::GetYAnnotationEnd  )  [private]
 

these three methods get the annotation value of the end sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 261 of file Mdo.cpp.

00262 {
00263   return 0.0;
00264 }

char * Mdo::GetYAnnotationLabel  )  [private]
 

these three methods get the annotation value of the end sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 290 of file Mdo.cpp.

00291 {
00292   return NULL;
00293 }

float Mdo::GetYAnnotationStart  )  [private]
 

these three methods get the annotation value of the start sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 233 of file Mdo.cpp.

00234 {
00235   return 0.0;
00236 }

long Mdo::GetYDimension  )  [private]
 

These three methods return the mdo deimensions in the first three directions.

Returns:

Reimplemented from MdoADT.

Definition at line 205 of file Mdo.cpp.

00206 {
00207   return 0;
00208 }

float Mdo::GetZAnnotationEnd  )  [private]
 

these three methods get the annotation value of the end sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 270 of file Mdo.cpp.

00271 {
00272   return 0.0;
00273 }

char * Mdo::GetZAnnotationLabel  )  [private]
 

these three methods get the annotation value of the end sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 299 of file Mdo.cpp.

00300 {
00301   return NULL;
00302 }

float Mdo::GetZAnnotationStart  )  [private]
 

these three methods get the annotation value of the start sample for X,Y,Z

Returns:

Reimplemented from MdoADT.

Definition at line 242 of file Mdo.cpp.

00243 {
00244   return 0.0;
00245 }

long Mdo::GetZDimension  )  [private]
 

These three methods return the mdo deimensions in the first three directions.

Returns:

Reimplemented from MdoADT.

Definition at line 214 of file Mdo.cpp.

00215 {
00216   return (long)NULL;
00217 }

void Mdo::Open char *  newFileName  )  [private]
 

Open a single file temporary storage, using a file name.

Parameters:
*newFileName 

Reimplemented from MdoADT.

Definition at line 118 of file Mdo.cpp.

00119 {
00120 }

void Mdo::Open  )  [private]
 

Open and allocate sotrage as memory, files, etc.

Reimplemented from MdoADT.

Definition at line 109 of file Mdo.cpp.

00110 {
00111 }

void NclBase::PrintSerialNumber  )  [inherited]
 

Print the serial number on cerr.

Parameters:
void 
Returns:

Definition at line 74 of file NclBase.cpp.

References NclBase::myName, NclBase::ReturnDebug(), and NclBase::serialNumber.

00076 {
00077   if ( ReturnDebug() )
00078     cerr << "\n" << myName << "." << serialNumber << " Serial number ";
00079 }

bool Mdo::ReadData FILE *  inputFilePtr  )  [virtual]
 

Reads the data of an open file into the mdo.

Parameters:
inputFilePtr 
Returns:

Implements MdoADT.

Definition at line 25 of file Mdo.cpp.

00026 {
00027   return true;
00028 }

bool Mdo::ReadMdo char *  mdoInputFileName  )  [private]
 

Reads in the mdo from the given file pointer.

Parameters:
mdoInputFileName 
Returns:

Reimplemented from MdoADT.

Definition at line 79 of file Mdo.cpp.

00080 {
00081   return true;
00082 }

long Mdo::Retrieve FILE *  fp  )  [private]
 

Retrieves member objects from a file. Currently, this objects Save and Retrieve methods will not work in conjunction with the other objects' Save an Retrieve methods. This object stores the binary data on the file pointed, and retireves the information by a file pointer. Other methods use a file pointer on Save, and a object pointer on Retrieve. Thus, the safest use of the mdo Save and Retrieve methods is in a separate file. In any event, most applications execute Save and Retrieve for the objects that build the mdo, without saving the mdo directly.

Parameters:
fp 
Returns:

Reimplemented from MdoADT.

Definition at line 417 of file Mdo.cpp.

00418 {
00419   return (long)NULL;
00420 }

bool Mdo::RetrieveBytePlane H_BYTE *  retrievedPlane,
long *  planeStart,
long *  planeEnd,
long  transpose = FALSE
[private]
 

This method uses the members minScale, maxScale to scale the data and provide H_BYTE output in the user allocated array data. The plane retrieved is specified by two long's variedDimension1 and variedDimension2. which specify the directions of the plane spanned by data.

If transpose == TRUE, we want the transpose of the plane returned. Otherwise, return the data in the natural ordering, i.e. the direction with the lower numerical value is contiguous in the plane.

The default value of transpose is FALSE, i.e. use the natural ordering.

retrievedPlane is a data cache used by private methods.

Parameters:
*retrievedPlane 
*planeStart 
*planeEnd 
transpose 
Returns:

Reimplemented from MdoADT.

virtual bool MdoADT::RetrieveData H_BYTE *  data,
size_t *  arrayLength,
long *  location,
long  direction = 0
[inline, protected, virtual, inherited]
 

This will retrieve a data array of length arrayLength at location. ArrayLength is given in bytes. Location follows the mdo data location convention.

Parameters:
*data 
*arrayLength 
*location 
direction 
Returns:

Definition at line 491 of file Mdo.h.

00493     {direction++;return( (bool) 0);}

bool MdoADT::retrieveLine H_BYTE *  data,
size_t  length,
long *  location,
long  direction
[inline, inherited]
 

This allows retrieval of a datum by an array of "length" arrayLength, in bytes. That is the value "length" is the number of samples times header->storageWordLength.

Parameters:
*data 
length 
*location 
direction 
Returns:

Definition at line 938 of file Mdo.h.

00938 { return false;};

bool Mdo::RetrieveLine H_BYTE *  data,
size_t  length,
long *  location,
long  direction
[private]
 

This allows retrieval of a datum by an array of "length" arrayLength, in bytes. That is the value "length" is the number of samples times header->storageWordLength.

Parameters:
*data 
length 
*location 
direction 
Returns:

Definition at line 466 of file Mdo.cpp.

00467 {
00468   return false;
00469 }

bool Mdo::RetrievePlane H_BYTE *  retrievedPlane,
long *  planeStart,
long *  planeEnd,
long  transpose = FALSE
[private]
 

retrievePlane() calls {singleFile,memory}RetrievePlane() The plane retrieved is specified by two points in the plane, as provided by planeStart and planeEnd.

If transpose == TRUE, we want the transpose of the plane returned. Otherwise, return the data in the natural ordering, i.e. the direction with the lower numerical value is contiguous in the plane.

The default value of transpose is FALSE, i.e. use the natural ordering.

retrievedPlane is a data cache used by private methods. {singleFile,memory}RetrievePlane() are called by retrievePlane()

Parameters:
*retrievedPlane 
*planeStart 
*planeEnd 
transpose 
Returns:

bool NclBase::ReturnDebug void   )  [inherited]
 

Parameters:
void 
Returns:

Definition at line 61 of file NclBase.cpp.

Referenced by NclBase::PrintSerialNumber().

00062 {
00063   return true;
00064 }

void Mdo::Save FILE *  fp  )  [private]
 

Saves the parameters to a binary file.

Parameters:
fp 

Reimplemented from MdoADT.

Definition at line 396 of file Mdo.cpp.

00397 {
00398 }

void Mdo::SetAnnotationEnd float *  inputAnnotationEnd  )  [private]
 

Set the annotation value of the end sample

Parameters:
*inputAnnotationEnd 

Reimplemented from MdoADT.

Definition at line 145 of file Mdo.cpp.

00146 {
00147 }

void Mdo::SetAnnotationLabels char  inputAnnotationLabels[3][MAX_ANNOTATION_SIZE+1]  )  [private]
 

Set the annotation value of the end sample

Parameters:
inputAnnotationLabels[3][MAX_ANNOTATION_SIZE+1] 

Reimplemented from MdoADT.

Definition at line 154 of file Mdo.cpp.

00155 {
00156 }

void Mdo::SetAnnotationStart float *  inputAnnotationStart  )  [private]
 

Set the annotation value of the start sample

Parameters:
*inputAnnotationStart 

Reimplemented from MdoADT.

Definition at line 136 of file Mdo.cpp.

00137 {
00138 }

void MdoADT::SetDebug void   )  [inline, inherited]
 

Set any internal debug flags.

Reimplemented from NclBase.

Definition at line 601 of file Mdo.h.

00601 { MDODEBUG = (bool) TRUE;}

void MdoADT::SetDimensions long  dimension,
long *  setCounts,
long  setStorageWordLength
[protected, inherited]
 

This routine sets the information needed for setting the dimension informtion. There are dimension directions, and setCounts[0],...,setCounts[diemnsion] samples in each direction.

Parameters:
dimension 
*setCounts 
setStorageWordLength 

void Mdo::SetPlaneExtents long  index,
long  min,
long  max
[private]
 

Set the plane extraction extents

Parameters:
index 
min 
max 

Reimplemented from MdoADT.

Definition at line 176 of file Mdo.cpp.

00177 {
00178 }

void Mdo::SetSampleRates float *  inputSampleRates  )  [private]
 

Set the sample rates.

Parameters:
*inputSampleRates 

Reimplemented from MdoADT.

Definition at line 127 of file Mdo.cpp.

00128 {
00129 }

void Mdo::SetScale float  inputMinScale,
float  inputMaxScale
[private]
 

Sets the scale factors used for conversion to H_BYTE in retrieveBytePlane.

Parameters:
inputMinScale 
inputMaxScale 

Reimplemented from MdoADT.

Definition at line 165 of file Mdo.cpp.

00166 {
00167 }

void Mdo::SetTitle char *  newTitle  )  [private]
 

Sets the title of this mdo.

Parameters:
*newTitle 

Reimplemented from MdoADT.

Definition at line 68 of file Mdo.cpp.

00069 {
00070 }

void Mdo::SetTrueMinMaxValues float  minValue,
float  maxValue
[private]
 

These methods return various extrema of the mdo. These extrema are caculated during the data loading phase of the mdo.

The above scaling methods only work with float, H_BYTE, and long types.

Parameters:
minValue 
maxValue 

Reimplemented from MdoADT.

Definition at line 387 of file Mdo.cpp.

00388 {
00389 }

void Mdo::SetUserDataInfo MdoRetrieveInfo *  inputStructure  )  [private]
 

Sets the userDataInfo structure.

Parameters:
inputStructure 

Reimplemented from MdoADT.

Definition at line 428 of file Mdo.cpp.

00429 {
00430 }

virtual bool MdoADT::StoreData H_BYTE *  data,
size_t *  length,
long *  location,
long  direction = 0
[inline, protected, virtual, inherited]
 

This will store a data array of length length at location. Length is given in bytes. Location follows the mdo data location convention.

Parameters:
*data 
*length 
*location 
direction 
Returns:

Definition at line 505 of file Mdo.h.

00507     {direction++;return( (bool) 0);}

void Mdo::StoreDataValue H_BYTE  data,
long *  location,
long  dir
[private]
 

These three methods allow storage by type, i.e. long, float, or H_BYTE. The value stored is passed by reference, not pointer.

Parameters:
data 
*location 
dir 

Reimplemented from MdoADT.

Definition at line 349 of file Mdo.cpp.

00350 {
00351 }

void Mdo::StoreDataValue float  data,
long *  location,
long  dir
[private]
 

These three methods allow storage by type, i.e. long, float, or H_BYTE. The value stored is passed by reference, not pointer.

Parameters:
data 
*location 
dir 

Reimplemented from MdoADT.

Definition at line 338 of file Mdo.cpp.

00339 {
00340 }

void Mdo::StoreDataValue long  data,
long *  location,
long  dir
[private]
 

These three methods allow storage by type, i.e. long, float, or H_BYTE. The value stored is passed by reference, not pointer.

Parameters:
data 
*location 
dir 

Reimplemented from MdoADT.

Definition at line 327 of file Mdo.cpp.

00328 {
00329 }

void Mdo::StoreFetchedStride long *  inputFetchStride  )  [private, virtual]
 

This will store the stride used when using the mdo direct fetch. It is only used in MdoDirect.h. For other mdo's only data used in the mdo is stored it the mdo. In the direct case, the decision of which data to use, and which to skip is postponed until the time of retrieval.

Parameters:
*inputFetchStride 

Implements MdoADT.

Definition at line 508 of file Mdo.cpp.

00509 {
00510 }

bool Mdo::SupplyRetrieveVector MdoUserRetrieveVector  suppliedUserVector  )  [private, virtual]
 

This method sets the internally required userRetrieveVector function for the MdoDirectADT object to that pointed to by suppliedUserVector. The function must match the following template:

H_BYTE *suppliedUserVector( size_t offset, size_t length)

where the offset is the offset in bytes of the requested vector if the data were stored in contiguous memory. The method findOffset of the mdo will correctly convert a location to an offset.

The value of length is the length_in_bytes of the vector to be retrieved.

By supplying this function pointer, the user provides the MdoDirectADT object the method that will be used to retrieve data.

Parameters:
suppliedUserVector 
Returns:

Implements MdoADT.

Definition at line 534 of file Mdo.cpp.

00535 {
00536   return false;
00537 }

void Mdo::TransposePlane H_BYTE *  plane,
long  numberColumns,
long  numberRows
[private]
 

Parameters:
*plane 
numberColumns 
numberRows 

Reimplemented from MdoADT.

Definition at line 59 of file Mdo.cpp.

00060 {
00061 }

void MdoADT::UnsetDebug void   )  [inline, inherited]
 

These routines toggle the MDODEBUG flag. When set to the DEBUG mode, the mdo will conduct complex error checking on data storage and retrieval.

Reimplemented from NclBase.

Definition at line 608 of file Mdo.h.

00608 { MDODEBUG = (bool) FALSE;}

bool Mdo::WriteData FILE *  outputFilePtr  )  [virtual]
 

For the exchange format

Parameters:
outputFilePtr 
Returns:

Implements MdoADT.

Definition at line 35 of file Mdo.cpp.

00036 {
00037   return true;
00038 }

bool Mdo::WriteMdo char *  mdoOutputFileName  )  [private]
 

This will write the mdo in a format that can be read back in later.

Parameters:
mdoOutputFileName 
Returns:

Reimplemented from MdoADT.

Definition at line 90 of file Mdo.cpp.

00091 {
00092   return true;
00093 }


Member Data Documentation

bool MdoADT::byteSwap [protected, inherited]
 

Was the data H_BYTE swapped on input?

Definition at line 380 of file Mdo.h.

bool MdoADT::dimensionSet [protected, inherited]
 

Has the dimension info been entered?

Definition at line 385 of file Mdo.h.

char** MdoADT::fileNames [protected, inherited]
 

The name(s) of the storage file(s).

Definition at line 399 of file Mdo.h.

_mdo_header* MdoADT::header [protected, inherited]
 

The header of the mdo. The size, extents, sampling rates, title, etc. are stored in this header.

Definition at line 376 of file Mdo.h.

float MdoADT::maxScale [protected, inherited]
 

The maximum scale used for display.

Definition at line 411 of file Mdo.h.

bool MdoADT::MDODEBUG [protected, inherited]
 

Used to flag DEBUG output at runtime. This may be set using the method setDebug(). This sets MDODEBUG to TRUE, and it remains until unsetDebug() is called.

Definition at line 417 of file Mdo.h.

H_BYTE* MdoADT::memPtr [protected, inherited]
 

Pointer to memory for storage. If the storage type is none, this is a null.

Definition at line 404 of file Mdo.h.

float MdoADT::minScale [protected, inherited]
 

Ths minimum scale used for display.

Definition at line 408 of file Mdo.h.

long MdoADT::numberOfStorageFiles [protected, inherited]
 

The number of file names in fileNames array.

Definition at line 395 of file Mdo.h.

long MdoADT::typeOfStorage [protected, inherited]
 

There are setStorageWordLength bytes stored at each location. Type is not set until other resources have been set.

Definition at line 391 of file Mdo.h.

MdoRetrieveInfo* MdoADT::userDataInfo [protected, inherited]
 

Provides a structure of information about the user format.

Definition at line 532 of file Mdo.h.


Generated on Wed Sep 28 11:10:42 2005 for NClip by doxygen 1.3.1 using KingsTools