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

#include <svkImageReader2.h>

Inheritance diagram for svkImageReader2:
svkDcmVolumeReader svkDdfVolumeReader svkGEPFileReader svkGESigna5XReader svkIdfVolumeReader svkLCModelReader svkPhilipsSReader svkSdbmVolumeReader svkSiemensRdaReader svkVariableFlipDatReader svkVarianReader

Public Types

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
}
 

Public Member Functions

 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 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

 svkImageReader2 ()
 
 ~svkImageReader2 ()
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 
virtual
svkDcmHeader::DcmPixelDataFormat 
GetFileType ()=0
 
void SetupOutputInformation ()
 
void SetupOutputExtent ()
 
void SetupOutputScalarData ()
 
virtual void ReadLine (ifstream *hdr, istringstream *iss)
 
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

vtkDataArray * dataArray
 
bool readOneInputFile
 
bool onlyGlobFiles
 
bool onlyReadHeader
 

Member Enumeration Documentation

enum ReaderType
Enumerator
UNDEFINED 
DICOM_MRS 
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 

Constructor & Destructor Documentation

svkImageReader2 ( )
protected
~svkImageReader2 ( )
protected

Member Function Documentation

int FillOutputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual
svkDcmHeader * GetDcmHeader ( const char *  fileName)
string GetFileExtension ( const char *  fname)
static

Returns the file root without extension or NULL if no extension found.

Referenced by svkDdfVolumeReader::CanReadFile(), svkPhilipsSReader::CanReadFile(), and svkImageReader2::GlobFileNames().

string GetFileNameWithoutPath ( const char *  fname)
static

Returns the file name without path: everything after the last "/".

Referenced by svkLCModelReader::GetVoxelIndexFromFileName(), and svkImageReader2::GlobFileNames().

string GetFilePath ( const char *  fname)
static

Returns the file path: everything before the last "/".

Referenced by svkImageReader2::GlobFileNames(), svkGESigna5XReader::InitDcmHeader(), and svkDcmVolumeReader::InitFileNames().

string GetFileRoot ( const char *  fname)
static

Returns the file root without extension (will include any path elements)

Referenced by svkPhilipsSMapper::ReadSDATFile(), and svkImageWriter::SetFileName().

string GetFileSeriesDescription ( string  fileName)
protectedvirtual
long GetFileSize ( ifstream *  fs)
static

Return the file size.

Referenced by svkVarianReader::ParseProcpar().

virtual svkDcmHeader::DcmPixelDataFormat GetFileType ( )
protectedpure virtual
svkImageData * GetOutput ( )

Referenced by svkGEPFileReader::Deidentify(), svkLCModelCSVReader::ExecuteDataWithInformation(), svkLCModelTableReader::ExecuteDataWithInformation(), svkLCModelCoordReader::ExecuteDataWithInformation(), svkSdbmVolumeReader::ExecuteDataWithInformation(), svkDdfVolumeReader::ExecuteDataWithInformation(), svkPhilipsSReader::ExecuteDataWithInformation(), svkVarianFidReader::ExecuteDataWithInformation(), svkFdfVolumeReader::ExecuteDataWithInformation(), svkIdfVolumeReader::ExecuteDataWithInformation(), svkSiemensRdaReader::ExecuteDataWithInformation(), svkGEPFileReader::ExecuteDataWithInformation(), svkDcmVolumeReader::ExecuteInformation(), svkDcmSegmentationVolumeReader::ExecuteInformation(), svkDdfVolumeReader::ExecuteInformation(), svkDcmEnhancedVolumeReader::ExecuteInformation(), svkGESigna5XReader::ExecuteInformation(), svkDcmRawDataReader::ExtractFiles(), svkImageReader2::GetDcmHeader(), svkImageReader2::GetFileSeriesDescription(), svkDcmMriVolumeReader::GetFileType(), svkF2C::GetIDFHeader(), svkDcmEnhancedVolumeReader::GetPixelTransform(), svkGEPostageStampReader::InitDcmHeader(), svkDcmMriVolumeReader::InitDcmHeader(), svkBrukerDCMMRSReader::InitDcmHeader(), svkDcmVolumeReader::InitDcmHeader(), svkGESigna5XReader::InitDcmHeader(), svkGESigna5XReader::InitEnhancedGeneralEquipmentModule(), svkGESigna5XReader::InitEnhancedMRImageModule(), svkGESigna5XReader::InitGeneralEquipmentModule(), svkGESigna5XReader::InitGeneralSeriesModule(), svkGESigna5XReader::InitGeneralStudyModule(), svkImageAlgorithmPipeline::InitializeAlgorithmForTag(), svkGESigna5XReader::InitMRAveragesMacro(), svkGESigna5XReader::InitMREchoMacro(), svkGESigna5XReader::InitMRFOVGeometryMacro(), svkGESigna5XReader::InitMRImageAndSpectroscopyInstanceMacro(), svkGESigna5XReader::InitMRImageFrameTypeMacro(), svkGESigna5XReader::InitMRImagingModifierMacro(), svkGESigna5XReader::InitMRModifierMacro(), svkGESigna5XReader::InitMRPulseSequenceModule(), svkGESigna5XReader::InitMRReceiveCoilMacro(), svkGESigna5XReader::InitMRTimingAndRelatedParametersMacro(), svkGESigna5XReader::InitMRTransmitCoilMacro(), svkGESigna5XReader::InitMultiFrameFunctionalGroupsModule(), svkGESigna5XReader::InitPatientModule(), svkGESigna5XReader::InitPerFrameFunctionalGroupMacros(), svkGESigna5XReader::InitPixelMeasuresMacro(), svkGESigna5XReader::InitPixelValueTransformationMacro(), svkGESigna5XReader::InitPlaneOrientationMacro(), svkDcmVolumeReader::InitSliceOrder(), svkDcmEnhancedVolumeReader::IsDataFloatingPoint(), svkDataModel::LoadFile(), svkAlgorithmPortMapper::SetMRImageInputPortValue(), svkAlgorithmPortMapper::SetMRSImageInputPortValue(), svkImageReader2::SetProvenance(), svkGEPFileReader::SetProvenance(), svkImageReader2::SetupOutputExtent(), svkImageReader2::SetupOutputInformation(), and svkImageReader2::SetupOutputScalarData().

svkImageData * GetOutput ( int  port)
virtual svkImageReader2::ReaderType GetReaderType ( )
pure virtual
void GlobFileNames ( )
void OnlyGlobFiles ( )

Only list the files in the data set, then exit.

References svkImageReader2::onlyGlobFiles.

void OnlyReadHeader ( bool  onlyReadHeader)
  • If only the idf header is to be read. Sometimes this acts as a template for processing, but
    • there isn't an associated data file.

References svkImageReader2::onlyReadHeader.

Referenced by svkGEPFileReader::Deidentify(), svkGEPFileReader::GetFileSeriesDescription(), svkImageReader2::GetFileSeriesDescription(), svkGEPFileReader::ModifyRawField(), svkImageReaderFactory::QuickParse(), and svkDICOMRawDataWriter::Write().

void OnlyReadOneInputFile ( )

Only read the one specified input file. Otherwise the default behavior is to read all the files in the group.

References svkImageReader2::readOneInputFile.

Referenced by svkGEPFileReader::GetFileSeriesDescription(), svkImageReader2::GetFileSeriesDescription(), svkImageAlgorithmPipeline::InitializeAlgorithmForTag(), and svkDataModel::LoadFile().

void ReadLine ( ifstream *  hdr,
istringstream *  iss 
)
protectedvirtual
void ReadLineIgnore ( ifstream *  hdr,
istringstream *  iss,
char  delim 
)
protected

Utility function to read a single line from the volume file. and ignore all characters up to the specified delimiting character.

References svkImageReader2::ReadLine().

int ReadLineKeyValue ( ifstream *  hdr,
istringstream *  iss,
char  delim,
string *  key,
string *  value 
)
protected

Read the value part of a delimited key value line in a file:

Returns
0 on success, 1 if can't parse line with delimiter into key/value pair

References svkImageReader2::ReadLine(), and svkImageReader2::StripWhite().

string ReadLineSubstr ( ifstream *  hdr,
istringstream *  iss,
int  start,
int  stop 
)
protected

Utility function for extracting a substring with white space removed from LHS.

References svkImageReader2::ReadLine().

string ReadLineValue ( ifstream *  hdr,
istringstream *  iss,
char  delim 
)
protected

Read the value part of a delimited key value line in a file:

References svkImageReader2::ReadLine().

Referenced by svkVariableFlipDatReader::InitDatReader().

string RemoveDelimFromDate ( string *  slashDate,
char  delimChar = '/' 
)
static

Remove slashes from idf date and reorder for DICOM compliance: 07/25/2007 -> 20070725 assumes input order is month, day, year output order is year, month, day

References svkImageReader2::StripWhite().

Referenced by svkPhilipsSMapper::GetDcmDate(), svkGEPFileMapper::InitGeneralStudyModule(), and svkGEPFileMapper::InitMultiFrameFunctionalGroupsModule().

void SetProvenance ( )
protectedvirtual

Appends algo info to provenance record.

Reimplemented in svkGEPFileReader.

References svkImageReader2::GetOutput().

void SetReadLength ( int  length)
protected
void SetupOutputExtent ( )
protected
void SetupOutputInformation ( )
protected
void SetupOutputScalarData ( )
protected
string StripWhite ( string  in)
static
vtkTypeMacro ( svkImageReader2  ,
vtkImageReader2   
)

Member Data Documentation

vtkDataArray* dataArray
protected
bool onlyGlobFiles
protected
bool onlyReadHeader
protected
bool readOneInputFile
protected

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