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
svkGEPFileMapper Class Reference

#include <svkGEPFileMapper.h>

Inheritance diagram for svkGEPFileMapper:
svkGEPFileMapperMBrease svkGEPFileMapperMPCSIOBL svkGEPFileMapperUCSF svkGEPFileMapperUCSFfidcsi svkGEPFileMapperUCSFfidcsiDev0 svkGEPFileMapperUCSFProseProstate svkGEPFileMapperUCSFfidcsiDev07t

Public Types

enum  MapperBehavior {
  UNDEFINED = 0, LOAD_RAW, LOAD_RAW_UNSUPPRESSED, LOAD_RAW_SUPPRESSED,
  LOAD_AVG_UNSUPPRESSED, LOAD_AVG_SUPPRESSED, LOAD_EPSI
}
 

Public Member Functions

 vtkTypeMacro (svkGEPFileMapper, vtkObject)
 
virtual void InitializeDcmHeader (map< string, vector< string > > pfMap, svkDcmHeader *header, float pfileVersion, int swapBytes, map< string, void * > inputArgs)
 
virtual void ReadData (vtkStringArray *pFileNames, svkImageData *data)
 
string GetProgressText ()
 
void SetProgressText (string progressText)
 
void SetPfileName (string pfileName)
 

Static Public Member Functions

static svkGEPFileMapperNew ()
 
static string ConvertGEDateToDICOM (string geDate)
 

Protected Member Functions

 svkGEPFileMapper ()
 
 ~svkGEPFileMapper ()
 
void InitPatientModule ()
 
void InitGeneralStudyModule ()
 
void InitGeneralSeriesModule ()
 
void InitFrameOfReferenceModule ()
 
void InitGeneralEquipmentModule ()
 
void InitEnhancedGeneralEquipmentModule ()
 
virtual void InitMultiFrameFunctionalGroupsModule ()
 
virtual void InitAcquisitionContextModule ()
 
virtual void InitMRSpectroscopyPulseSequenceModule ()
 
virtual void InitSharedFunctionalGroupMacros ()
 
virtual void InitPerFrameFunctionalGroupMacros ()
 
virtual void InitPixelMeasuresMacro ()
 
virtual void InitPlaneOrientationMacro ()
 
virtual void InitMRSpectroscopyFrameTypeMacro ()
 
virtual void InitMRTimingAndRelatedParametersMacro ()
 
virtual void InitMRSpectroscopyFOVGeometryMacro ()
 
virtual void InitMREchoMacro ()
 
virtual void InitMRModifierMacro ()
 
virtual void InitMRReceiveCoilMacro ()
 
virtual void InitMRTransmitCoilMacro ()
 
virtual void InitMRAveragesMacro ()
 
virtual void InitMRSpatialSaturationMacro ()
 
virtual void InitSatBand (float satRAS[3], float translation)
 
virtual void InitMRSpectroscopyModule ()
 
virtual string GetVolumeLocalizationTechnique ()
 
virtual void InitVolumeLocalizationSeq ()
 
virtual void InitMRSpectroscopyDataModule ()
 
virtual void InitK0Sampled (svkDcmHeader *hdr)
 
virtual void InitSatBandsFromXML ()
 
virtual void GetCenterFromRawFile (double *center)
 
virtual float GetFrequencyOffset ()
 
int GetNumVoxelsInVol ()
 
virtual void GetNumVoxels (int numVoxels[3])
 
virtual int GetNumKSpacePoints ()
 
virtual void GetVoxelSpacing (double voxelSpacing[3])
 
void GetFOV (float fov[3])
 
int GetNumCoils ()
 
int GetNumFrames ()
 
virtual int GetNumTimePoints ()
 
virtual int GetNumDummyScans ()
 
virtual int GetNumEPSIAcquisitions ()
 
bool AddDummy (int offset, int coilNum, int timePt)
 
void GetDcos (double dcos[3][3])
 
virtual float GetPPMRef ()
 
bool IsSwapOn ()
 
bool Is2D ()
 
virtual bool IsChopOn ()
 
virtual void GetXYZIndices (int dataIndex, int *x, int *y, int *z)
 
void UpdateProgress (double amount)
 
virtual void ModifyBehavior (svkImageData *data)
 
void RedimensionModifiedSVData (svkImageData *data)
 
virtual int GetNumberUnsuppressedAcquisitions ()
 
virtual int GetNumberSuppressedAcquisitions ()
 
virtual void GetSelBoxCenter (double selBoxCenter[3])
 
virtual void GetSelBoxSize (double selBoxSize[3])
 
void SetCellSpectrum (vtkImageData *data, bool wasSampled, int offset, int index, int x, int y, int z, int timePoint=0, int channel=0)
 
virtual void InitSpecTuple (int numFreqPts, int freqPt, float *tuple, vtkDataArray *dataArray)
 
int GetHeaderValueAsInt (string key)
 
long long int GetHeaderValueAsLongInt (string key)
 
float GetHeaderValueAsFloat (string key)
 
string GetHeaderValueAsString (string key)
 
virtual bool WasIndexSampled (int xIndex, int yIndex, int zIndex)
 
bool isInputArgSet (string argName)
 
bool GetInputArgStringValue (string argName, string *argValue)
 
bool GetInputArgBoolValue (string argName, bool *argValue)
 
virtual void ReorderEPSI (svkMrsImageData *data)
 
string GetNucleus ()
 
void ModifyForPatientEntry (double dcos[3][3])
 

Protected Attributes

string progressText
 
map< string, vector< string > > pfMap
 
svkDcmHeaderdcmHeader
 
float pfileVersion
 
int * specData
 
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
 
int chopVal
 
map< string, void * > inputArgs
 
int swapBytes
 
svkMRSIODiod
 
double progress
 
string pfileName
 

Detailed Description

Mapper from pfile header to DICOM IOD/SOP Class instance.

Member Enumeration Documentation

Data Loading Behavior options:

Enumerator
UNDEFINED 
LOAD_RAW 
LOAD_RAW_UNSUPPRESSED 
LOAD_RAW_SUPPRESSED 
LOAD_AVG_UNSUPPRESSED 
LOAD_AVG_SUPPRESSED 
LOAD_EPSI 

Constructor & Destructor Documentation

svkGEPFileMapper ( )
protected
~svkGEPFileMapper ( )
protected

Member Function Documentation

bool AddDummy ( int  offset,
int  coilNum,
int  timePt 
)
protected

Determine whether to add a dummy scan. The assumption is that the number of dummy scans should be equal to the number of coils or numCoils * numTimePts (e.g. for a spectral editing sequence). If true, then the an FID worth of data should be skipped over when reading data (e.g. frame_size * numComponents, or numFreqPts * numComponents)

References svkGEPFileMapper::GetHeaderValueAsInt(), svkGEPFileMapper::GetNumCoils(), svkGEPFileMapper::GetNumDummyScans(), svkGEPFileMapper::GetNumKSpacePoints(), and svkGEPFileMapper::GetNumTimePoints().

Referenced by svkGEPFileMapper::ReadData().

string ConvertGEDateToDICOM ( string  geDate)
static
void GetCenterFromRawFile ( double *  center)
protectedvirtual
void GetDcos ( double  dcos[3][3])
protected
void GetFOV ( float  fov[3])
protected
float GetFrequencyOffset ( )
protectedvirtual
float GetHeaderValueAsFloat ( string  key)
protected
int GetHeaderValueAsInt ( string  key)
protected
long long int GetHeaderValueAsLongInt ( string  key)
protected

returns the value for the specified key as a long long int. An int may be 4 or 8 bytes, but long int should be 8 as needed.

References svkGEPFileMapper::pfMap.

Referenced by svkGEPFileMapper::GetNumDummyScans(), and svkGEPFileMapper::GetNumTimePoints().

string GetHeaderValueAsString ( string  key)
protected
bool GetInputArgBoolValue ( string  argName,
bool *  argValue 
)
protected

Sets the inputArg value for the specified key as a string. If the value is not set, then argValue is not modified. Return value is true if the arg was found, or false if not set.

References svkGEPFileMapper::inputArgs, and svkGEPFileMapper::isInputArgSet().

Referenced by svkGEPFileMapperMBrease::IsChopOn(), and svkGEPFileMapper::IsChopOn().

bool GetInputArgStringValue ( string  argName,
string *  argValue 
)
protected

Sets the inputArg value for the specified key as a string. If the value is not set, then argValue is not modified. Return value is true if the arg was found, or false if not set.

References svkGEPFileMapper::inputArgs, and svkGEPFileMapper::isInputArgSet().

string GetNucleus ( )
protected
int GetNumberSuppressedAcquisitions ( )
protectedvirtual

For single voxel acquisitions, return the number of suppressed acquisitions.

Reimplemented in svkGEPFileMapperMBrease.

References svkGEPFileMapper::GetHeaderValueAsFloat().

Referenced by svkGEPFileMapper::ModifyBehavior().

int GetNumberUnsuppressedAcquisitions ( )
protectedvirtual

For single voxel acquisitions, return the number of unsuppressed acquisitions.

Reimplemented in svkGEPFileMapperMBrease.

References svkGEPFileMapper::GetHeaderValueAsFloat().

Referenced by svkGEPFileMapper::ModifyBehavior().

int GetNumCoils ( )
protected
int GetNumDummyScans ( )
protectedvirtual

Determine number of dummy scans (FIDs) in the data block. This is the difference between the raw pass size and the expected size of the data based on numCoils, numTimePts, numKSpacePts and numFreqPts.

Reimplemented in svkGEPFileMapperMPCSIOBL.

References svkGEPFileMapper::dcmHeader, svkGEPFileMapper::GetHeaderValueAsInt(), svkGEPFileMapper::GetHeaderValueAsLongInt(), svkGEPFileMapper::GetNumCoils(), svkGEPFileMapper::GetNumKSpacePoints(), svkGEPFileMapper::GetNumTimePoints(), and svkDcmHeader::GetStringValue().

Referenced by svkGEPFileMapper::AddDummy(), and svkGEPFileMapper::ReadData().

int GetNumEPSIAcquisitions ( )
protectedvirtual
int GetNumFrames ( )
protected

Number of frames is number of slices * numCoils * numTimePoints

References svkGEPFileMapper::GetNumCoils(), svkGEPFileMapper::GetNumTimePoints(), and svkGEPFileMapper::GetNumVoxels().

int GetNumKSpacePoints ( )
protectedvirtual

Determine the number of sampled k-space points in the data set. This may differ from the number of voxels in the rectalinear grid, for example if elliptical or another non rectangular acquisition sampling strategy was employed. GE product sequences pad the reduced k-space data with zeros so the number of k-space points is the same as the number of voxels, but that may not be true for custom sequences.

Reimplemented in svkGEPFileMapperUCSF.

References svkGEPFileMapper::GetNumVoxelsInVol().

Referenced by svkGEPFileMapper::AddDummy(), svkGEPFileMapper::GetNumDummyScans(), svkGEPFileMapper::GetNumTimePoints(), svkGEPFileMapper::InitMRSpectroscopyPulseSequenceModule(), and svkGEPFileMapper::ReadData().

int GetNumTimePoints ( )
protectedvirtual
void GetNumVoxels ( int  numVoxels[3])
protectedvirtual
int GetNumVoxelsInVol ( )
protected
float GetPPMRef ( )
protectedvirtual

Gets the chemical shift reference taking into account acquisition frequency offset and the acquisition sample temperature.

Reimplemented in svkGEPFileMapperUCSFfidcsiDev0, and svkGEPFileMapperUCSFfidcsiDev07t.

References svkGEPFileMapper::GetHeaderValueAsFloat(), svkGEPFileMapper::GetNucleus(), svkSpecUtils::GetPPMRef(), svkGEPFileMapper::inputArgs, and svkGEPFileMapper::pfileVersion.

Referenced by svkGEPFileMapper::InitMRSpectroscopyModule().

string GetProgressText ( )
void GetSelBoxCenter ( double  selBoxCenter[3])
protectedvirtual
void GetSelBoxSize ( double  selBoxSize[3])
protectedvirtual
string GetVolumeLocalizationTechnique ( )
protectedvirtual
void GetVoxelSpacing ( double  voxelSpacing[3])
protectedvirtual
void GetXYZIndices ( int  dataIndex,
int *  x,
int *  y,
int *  z 
)
protectedvirtual

If swapping is turned on, the data will need to get mapped correctly from the input data buffer read from disk (specData) to the correct svkImageData arrays. If swap is true, then the data indices are swapped and ky is flipped.

References svkGEPFileMapper::GetNumVoxels(), and svkGEPFileMapper::IsSwapOn().

Referenced by svkGEPFileMapper::ReadData().

void InitAcquisitionContextModule ( )
protectedvirtual
void InitEnhancedGeneralEquipmentModule ( )
protected
void InitFrameOfReferenceModule ( )
protected
void InitGeneralEquipmentModule ( )
protected
void InitGeneralSeriesModule ( )
protected
void InitGeneralStudyModule ( )
protected
void InitializeDcmHeader ( map< string, vector< string > >  pfMap,
svkDcmHeader header,
float  pfileVersion,
int  swapBytes,
map< string, void * >  inputArgs 
)
virtual
void InitK0Sampled ( svkDcmHeader hdr)
protectedvirtual
void InitMRAveragesMacro ( )
protectedvirtual
void InitMREchoMacro ( )
protectedvirtual
void InitMRModifierMacro ( )
protectedvirtual
void InitMRReceiveCoilMacro ( )
protectedvirtual

Should work for single vs multi-coil, but will not currently differentiate between volume, surface, body coils

References svkDcmHeader::AddSequenceItemElement(), svkGEPFileMapper::dcmHeader, svkGEPFileMapper::GetHeaderValueAsString(), and svkGEPFileMapper::GetNumCoils().

Referenced by svkGEPFileMapper::InitSharedFunctionalGroupMacros().

void InitMRSpatialSaturationMacro ( )
protectedvirtual
void InitMRSpectroscopyDataModule ( )
protectedvirtual
void InitMRSpectroscopyFOVGeometryMacro ( )
protectedvirtual
void InitMRSpectroscopyFrameTypeMacro ( )
protectedvirtual
void InitMRSpectroscopyModule ( )
protectedvirtual
void InitMRSpectroscopyPulseSequenceModule ( )
protectedvirtual
void InitMRTimingAndRelatedParametersMacro ( )
protectedvirtual
void InitMRTransmitCoilMacro ( )
protectedvirtual
void InitMultiFrameFunctionalGroupsModule ( )
protectedvirtual
void InitPatientModule ( )
protected
void InitPerFrameFunctionalGroupMacros ( )
protectedvirtual
void InitPixelMeasuresMacro ( )
protectedvirtual
void InitPlaneOrientationMacro ( )
protectedvirtual
void InitSatBand ( float  satRAS[3],
float  translation 
)
protectedvirtual

Add a sat band to the SpatialSaturationSequence: RAS: vector of the normal to the sat band with length equal to the band thickness in RAS coordinates. translation : translation along that vector from origin to sat band location (slab farthest from origin)

References svkDcmHeader::AddSequenceItemElement(), svkGEPFileMapper::dcmHeader, and svkDcmHeader::GetNumberOfItemsInSequence().

Referenced by svkGEPFileMapper::InitMRSpatialSaturationMacro(), and svkGEPFileMapperUCSF::InitSatBandsFromXML().

void InitSatBandsFromXML ( )
protectedvirtual
void InitSharedFunctionalGroupMacros ( )
protectedvirtual
void InitSpecTuple ( int  numFreqPts,
int  freqPt,
float *  tuple,
vtkDataArray *  dataArray 
)
protectedvirtual

Virtual method for initializing the spectrum array for a given cell. Some data sets have time/frequency reversed

Reimplemented in svkGEPFileMapperUCSFfidcsiDev07t.

Referenced by svkGEPFileMapper::SetCellSpectrum().

void InitVolumeLocalizationSeq ( )
protectedvirtual
bool Is2D ( )
protected

Is this a 2D or 3D data set (spatial dimensions)?

References svkGEPFileMapper::GetHeaderValueAsInt().

Referenced by svkGEPFileMapper::GetFOV().

bool IsChopOn ( )
protectedvirtual
bool isInputArgSet ( string  argName)
protected

Returns true if the inputArgs map key is set

References svkGEPFileMapper::inputArgs.

Referenced by svkGEPFileMapper::GetInputArgBoolValue(), and svkGEPFileMapper::GetInputArgStringValue().

bool IsSwapOn ( )
protected
void ModifyBehavior ( svkImageData data)
protectedvirtual
void ModifyForPatientEntry ( double  dcos[3][3])
protected

Modifies the dcos to reflect the patient entry.

References svkGEPFileMapper::GetHeaderValueAsInt().

Referenced by svkGEPFileMapper::GetDcos().

static svkGEPFileMapper* New ( )
static
void ReadData ( vtkStringArray *  pFileNames,
svkImageData data 
)
virtual
void RedimensionModifiedSVData ( svkImageData data)
protected
void ReorderEPSI ( svkMrsImageData data)
protectedvirtual
void SetCellSpectrum ( vtkImageData *  data,
bool  wasSampled,
int  offset,
int  index,
int  x,
int  y,
int  z,
int  timePoint = 0,
int  channel = 0 
)
protected
void SetPfileName ( string  pfileName)
void SetProgressText ( string  progressText)
void UpdateProgress ( double  amount)
protected
vtkTypeMacro ( svkGEPFileMapper  ,
vtkObject   
)
bool WasIndexSampled ( int  indexX,
int  indexY,
int  indexZ 
)
protectedvirtual

Determines whether a voxel (index) was sampled (or a zero padded point is present in the data set), or not, i.e. was it within the elliptical sampling volume if reduced k-space elliptical sampling was used. Could be extended to support other sparse sampling trajectories. Note that for product sequences this always returns true since GE zero-pads reduced k-space data to a full rectilinear grid.

Reimplemented in svkGEPFileMapperUCSF.

Referenced by svkGEPFileMapper::ReadData().

Member Data Documentation

int chopVal
protected
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
protected
svkDcmHeader* dcmHeader
protected
map< string, void* > inputArgs
protected
svkMRSIOD* iod
protected
string pfileName
protected
float pfileVersion
protected
map<string, vector< string > > pfMap
protected
double progress
protected
string progressText
protected
int* specData
protected
int swapBytes
protected

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