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

#include <svkDcmVolumeReader.h>

Inheritance diagram for svkDcmVolumeReader:
svkImageReader2 svkBrukerDCMMRSReader svkDcmEnhancedVolumeReader svkDcmMriVolumeReader svkDcmMrsVolumeReader svkDcmRawDataReader svkDcmSegmentationVolumeReader svkGEPostageStampReader

Public Member Functions

 vtkTypeMacro (svkDcmVolumeReader, 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 float GetFloatValAttribute7 (vector< string > vec)
 
static int GetIntValAttribute8 (vector< string > vec)
 
static void GetVOILUTScaledPixels (float *floatPixels, unsigned short *shortPixels, float center, float window, int numberOfPixels)
 
- 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 Types

enum  ProprietarySOP { DICOM_STD_SOP = 0, GE_POSTAGE_STAMP_SOP, BRUKER_MRS_SOP }
 

Protected Member Functions

 svkDcmVolumeReader ()
 
 ~svkDcmVolumeReader ()
 
virtual void ExecuteInformation ()
 
virtual void ExecuteDataWithInformation (vtkDataObject *output, vtkInformation *outInfo)
 
ProprietarySOP ContainsProprietaryContent (svkImageData *data)
 
void InitFileNames ()
 
void OnlyReadInputFile ()
 
void SortFilesByImagePositionPatient (vector< vector< string > > &dcmSeriesAttributes, bool ascending)
 
void SortFilesByInstanceNumber (vector< vector< string > > &dcmSeriesAttributes, int numSlicesPerVol, bool ascending)
 
virtual void InitDcmHeader ()
 
void InitSliceOrder ()
 
void InitSliceOrder (string hfileStart, string fileEnd)
 
virtual bool CheckForMultiVolume ()
 
float GetSliceSpacing ()
 
virtual void CleanAttributes (set< string > *uniqueSlices)
 
- 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 ()
 
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

int numFrames
 
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
 
int numVolumes
 
- 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
}
 

Member Enumeration Documentation

enum ProprietarySOP
protected
Enumerator
DICOM_STD_SOP 
GE_POSTAGE_STAMP_SOP 
BRUKER_MRS_SOP 

Constructor & Destructor Documentation

svkDcmVolumeReader ( )
protected
~svkDcmVolumeReader ( )
protected

Member Function Documentation

bool CheckForMultiVolume ( )
protectedvirtual
virtual void CleanAttributes ( set< string > *  uniqueSlices)
inlineprotectedvirtual
svkDcmVolumeReader::ProprietarySOP ContainsProprietaryContent ( svkImageData data)
protected
void ExecuteDataWithInformation ( vtkDataObject *  output,
vtkInformation *  outInfo 
)
protectedvirtual

Side effect of Update() method. Used to load pixel data and initialize vtkImageData Called after ExecuteInformation()

void ExecuteInformation ( )
protectedvirtual
float GetFloatValAttribute7 ( vector< string >  vec)
static

sort compare utility method. Gets the 7th element of the vectors being compared.

Referenced by SortAscendAttribute7(), and SortDescendAttribute7().

int GetIntValAttribute8 ( vector< string >  vec)
static

sort compare utility method. Gets the 8th element of the vectors being compared.

Referenced by SortAscendAttribute8(), and SortDescendAttribute8().

float GetSliceSpacing ( )
protected
void GetVOILUTScaledPixels ( float *  floatPixels,
unsigned short *  shortPixels,
float  center,
float  window,
int  numberOfValues 
)
static

Scales an array of unsigned short pixel values into to a floating point array according to the given center and window. The minimum value of the output will be the center - window/2 and the max will be center + window/2.

void InitDcmHeader ( )
protectedvirtual
void InitFileNames ( )
protected

Parse through the DICOM images and determine which ones belong to the same series as the specified input file instances (StudyInstanceUID, SeriesInstanceUID), then also verify that each image has the same orientation. The orientation check is useful for cases when there are multiple orientations in the same series (e.g. 3 plane localizer). Since there may be slight diffs between the values in ImageOrientationPatient the check is performed to within a tolerance.

Currently only supports single volume data, i.e. only one image at each location (ImagePositionPatient).

References svkDcmVolumeReader::CheckForMultiVolume(), svkDcmVolumeReader::CleanAttributes(), svkDcmHeader::ElementExists(), svkImageData::GetDcmHeader(), svkImageReader2::GetFilePath(), svkDcmHeader::GetNormalVector(), svkDcmHeader::GetStringValue(), svkDcmHeader::IsFileDICOM(), svkMriImageData::New(), svkDcmVolumeReader::numVolumes, svkImageReader2::onlyGlobFiles, svkDcmVolumeReader::OnlyReadInputFile(), svkDcmHeader::ReadDcmFileHeaderOnly(), svkDcmVolumeReader::SortFilesByImagePositionPatient(), and svkDcmVolumeReader::SortFilesByInstanceNumber().

Referenced by svkGEPostageStampReader::InitDcmHeader(), svkDcmMriVolumeReader::InitDcmHeader(), and svkBrukerDCMMRSReader::InitDcmHeader().

void InitSliceOrder ( )
protected
void InitSliceOrder ( string  fileStart,
string  fileEnd 
)
protected
void OnlyReadInputFile ( )
protected

Reset file names to only the single input file name

Referenced by svkDcmVolumeReader::InitFileNames().

void SortFilesByImagePositionPatient ( vector< vector< string > > &  dcmSeriesAttributes,
bool  ascending 
)
protected

Sort the list of files in either ascending or descending order by ImagePositionPatient

References SortAscendAttribute7(), and SortDescendAttribute7().

Referenced by svkDcmVolumeReader::InitFileNames().

void SortFilesByInstanceNumber ( vector< vector< string > > &  dcmSeriesAttributes,
int  numSlicesPerVol,
bool  ascending 
)
protected

Sort the list of files in either ascending or descending order by InstanceNumber thie input is already sorted by ImagePositionPatient

References svkDcmVolumeReader::numVolumes, SortAscendAttribute8(), and SortDescendAttribute8().

Referenced by svkDcmVolumeReader::InitFileNames().

vtkTypeMacro ( svkDcmVolumeReader  ,
svkImageReader2   
)

Member Data Documentation

svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
protected
int numFrames
protected
int numVolumes
protected

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