SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
svkVarianReader Class Reference

#include <svkVarianReader.h>

Inheritance diagram for svkVarianReader:
svkImageReader2 svkFdfVolumeReader svkVarianFidReader

Public Member Functions

 vtkTypeMacro (svkVarianReader, svkImageReader2)
 
- Public Member Functions inherited from svkImageReader2
 vtkTypeMacro (svkImageReader2, vtkImageReader2)
 
svkImageDataGetOutput ()
 
svkImageDataGetOutput (int)
 
svkDcmHeaderGetDcmHeader (const char *fileName)
 
void OnlyReadOneInputFile ()
 
void OnlyGlobFiles ()
 
void GlobFileNames ()
 
void OnlyReadHeader (bool onlyReadHeader)
 
virtual svkImageReader2::ReaderType GetReaderType ()=0
 

Static Public Member Functions

static void UserToMagnet (double *user, double *magnet, double dcos[3][3])
 
- Static Public Member Functions inherited from svkImageReader2
static string StripWhite (string in)
 
static string RemoveDelimFromDate (string *slashDate, char delimChar= '/')
 
static string GetFileRoot (const char *fname)
 
static string GetFileExtension (const char *fname)
 
static string GetFilePath (const char *fname)
 
static string GetFileNameWithoutPath (const char *fname)
 
static long GetFileSize (ifstream *fs)
 

Protected Member Functions

 svkVarianReader ()
 
 ~svkVarianReader ()
 
int GetNumPixelsInVol ()
 
int GetNumSlices ()
 
void ParseProcpar (string path)
 
int GetProcparKeyValuePair ()
 
void ReadLine (ifstream *fs, istringstream *iss)
 
void ParseAndSetProcparStringElements (string key, string valueArray1, string valueArray2)
 
void PrintProcparKeyValuePairs ()
 
int GetNumberOfProcparElements (string *valueString)
 
void GetProcparValueArray (string *valueString)
 
void RemoveStringQuotes (string *input)
 
void AssignProcparVectorElements (vector< string > *procparVector, string valueArray)
 
- Protected Member Functions inherited from svkImageReader2
 svkImageReader2 ()
 
 ~svkImageReader2 ()
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 
virtual
svkDcmHeader::DcmPixelDataFormat 
GetFileType ()=0
 
void SetupOutputInformation ()
 
void SetupOutputExtent ()
 
void SetupOutputScalarData ()
 
void ReadLineIgnore (ifstream *hdr, istringstream *iss, char delim)
 
string ReadLineSubstr (ifstream *hdr, istringstream *iss, int start, int stop)
 
string ReadLineValue (ifstream *hdr, istringstream *iss, char delim)
 
int ReadLineKeyValue (ifstream *hdr, istringstream *iss, char delim, string *key, string *value)
 
virtual void SetProvenance ()
 
virtual string GetFileSeriesDescription (string fileName)
 
void SetReadLength (int length)
 

Protected Attributes

ifstream * procparFile
 
map< string, vector< vector
< string > > > 
procparMap
 
int numSlices
 
long procparFileSize
 
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
 
- Protected Attributes inherited from svkImageReader2
vtkDataArray * dataArray
 
bool readOneInputFile
 
bool onlyGlobFiles
 
bool onlyReadHeader
 

Additional Inherited Members

- Public Types inherited from svkImageReader2
enum  ReaderType {
  UNDEFINED = -1, DICOM_MRS =0, DICOM_MRI, DICOM_ENHANCED_MRI,
  DICOM_SEGMENTATION, DICOM_RAW, SIEMENS_RDA, VARIAN_FID,
  VARIAN_FDF, GE_PFILE, GE_SDBM, GE_POSTAGE_STAMP,
  GE_SIGNA_LX2, GE_SIGNA_5X, LC_MODEL_COORD, LC_MODEL_CSV,
  LC_MODEL_TABLE, VARIABLE_FLIP_DAT, BRUKER_MRS, PHILIPS_S,
  DDF, IDF, LAST_TYPE = IDF
}
 

Detailed Description

Varian reader base class.

Constructor & Destructor Documentation

svkVarianReader ( )
protected
~svkVarianReader ( )
protected

Member Function Documentation

void AssignProcparVectorElements ( vector< string > *  procparVector,
string  valueArray 
)
protected
int GetNumberOfProcparElements ( string *  valueString)
protected

Utility method to determine how many space delimited elements are in current propcar string.

Referenced by svkVarianReader::GetProcparValueArray().

int GetNumPixelsInVol ( )
protected
int GetNumSlices ( )
protected

Not sure if this is always extent 5 if the data is coronal and sagital for example

int GetProcparKeyValuePair ( )
protected

Utility function to read key/values from procpar file and set the delimited key/value pair into the stl map. Returns -1 if can't parse line.

References svkVarianReader::GetProcparValueArray(), svkVarianReader::ParseAndSetProcparStringElements(), svkVarianReader::procparFile, svkVarianReader::procparFileSize, and svkVarianReader::ReadLine().

Referenced by svkVarianReader::ParseProcpar().

void GetProcparValueArray ( string *  valueString)
protected
void ParseAndSetProcparStringElements ( string  key,
string  valueArray1,
string  valueArray2 
)
protected

Push key value pairs into the map's value vector: mapFor values that are space delimited lists, put each element into the value vector.

References svkVarianReader::AssignProcparVectorElements(), and svkVarianReader::procparMap.

Referenced by svkVarianReader::GetProcparKeyValuePair().

void ParseProcpar ( string  path)
protected

Parses the procpar file if present. The format appears to be: keyName numElements1 space_separated_values numElements2 space_separated_values

References svkImageReader2::GetFileSize(), svkVarianReader::GetProcparKeyValuePair(), svkVarianReader::procparFile, and svkVarianReader::procparFileSize.

void PrintProcparKeyValuePairs ( )
protected

Prints the key value pairs parsed from the header.

References svkVarianReader::procparMap.

void ReadLine ( ifstream *  fs,
istringstream *  iss 
)
protectedvirtual

Utility function to read a single line from the fdf file stream.

Reimplemented from svkImageReader2.

Referenced by svkVarianReader::GetProcparKeyValuePair(), and svkVarianReader::GetProcparValueArray().

void RemoveStringQuotes ( string *  input)
protected

Remove any quotation marks from the string

Referenced by svkVarianReader::AssignProcparVectorElements().

void UserToMagnet ( double *  user,
double *  magnet,
double  dcos[3][3] 
)
static
vtkTypeMacro ( svkVarianReader  ,
svkImageReader2   
)

Member Data Documentation

svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
protected
int numSlices
protected
ifstream* procparFile
protected
long procparFileSize
protected
map<string, vector < vector<string> > > procparMap
protected

The documentation for this class was generated from the following files: