SIVIC API
0.9.26
|
#include <svkGEPFileReader.h>
Static Public Member Functions | |
static svkGEPFileReader * | New () |
static float | LookupRawVersion (float rdbmRev, float rdbmRevSwapped) |
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) |
Public Attributes | |
bool | checkSeriesUID |
Protected Member Functions | |
svkGEPFileReader () | |
~svkGEPFileReader () | |
virtual int | FillOutputPortInformation (int port, vtkInformation *info) |
virtual void | ExecuteInformation () |
virtual void | ExecuteDataWithInformation (vtkDataObject *output, vtkInformation *outInfo) |
virtual svkDcmHeader::DcmPixelDataFormat | GetFileType () |
void | ReadGEPFile () |
void | ParsePFile () |
void | InitOffsetsMap () |
virtual void | SetProvenance () |
virtual string | GetFileSeriesDescription (string fileName) |
Protected Member Functions inherited from svkImageReader2 | |
svkImageReader2 () | |
~svkImageReader2 () | |
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) |
void | SetReadLength (int length) |
Protected Attributes | |
map< string, vector< string > > | pfMap |
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 } |
This is an svkImageReader2 for reading GE P-files. The reader supports 9.x - 20.x raw file versions. The reader reads fields from GE P-files, putting the content into a string map. The reader then obtains a svkGEPFileMapper for the specific PSD in order to map that content to an svkMrsImageData object (and svkDcmHeader representing a DICOM MR Spectroscopy SOP Class UID). The mapping will depend on the specific psd context, for example because of variability in meaning of user cvs.
A mapper factory will ultimatly be developed to obtain the appropriate svkPFileMapper for a given Pfile.
Thanks to Mike Figueira of GE Medical for helful discussions about the class design. Many thanks also to Sanjay Joshi( GE Medical recon ), Mike Figueira (GEMS) and Katie McMillan (GEMS) for their help making this possible.
Acknowledgments: Dr. Ping-Hong Yeh for providing sample data for validating 21.x support.
|
protected |
|
protected |
|
virtual |
Check to see if this is a GE pfile. If so, try to open the file for reading. If that works, then return a success code. Return Values: 1 if can read the file, 0 otherwise.
References svkGEPFileReader::InitOffsetsMap(), svkImageReader2::onlyReadHeader, and svkGEPFileReader::ReadGEPFile().
void Deidentify | ( | ) |
|
protectedvirtual |
Side effect of Update() method. Used to load pixel data and initialize vtkImageData Called after ExecuteInformation()
References svkDcmHeader::GetDataDcos(), svkImageData::GetDcmHeader(), svkImageReader2::GetOutput(), svkImageReader2::onlyReadHeader, svkGEPFileMapper::ReadData(), svkImageData::SetDcos(), svkGEPFileReader::SetProvenance(), and svkImageReader2::SetupOutputInformation().
|
protectedvirtual |
Side effect of Update() method. Used to load pixel data and initialize vtkImageData Called before ExecuteData()
References svkImageReader2::onlyReadHeader, and svkImageReader2::SetupOutputInformation().
|
protectedvirtual |
Reimplemented from svkImageReader2.
|
inlinevirtual |
|
protectedvirtual |
get the series description for this file for globbing purposes:
Reimplemented from svkImageReader2.
References svkGEPFileReader::checkSeriesUID, svkGEPFileReader::GetPFMap(), svkGEPFileReader::New(), svkImageReader2::OnlyReadHeader(), and svkImageReader2::OnlyReadOneInputFile().
|
protectedvirtual |
Returns the file root without extension
Implements svkImageReader2.
References svkDcmHeader::SIGNED_FLOAT_4.
svkGEPFileMapper * GetMapper | ( | ) |
returns the mapper
map< string, vector< string > > GetPFMap | ( | ) |
References svkGEPFileReader::pfMap.
Referenced by svkGEPFileReader::GetFileSeriesDescription(), and svkDICOMRawDataWriter::Write().
|
inlinevirtual |
Implements svkImageReader2.
References svkImageReader2::GE_PFILE.
|
protected |
Initialize map of field names to dataType, size and offset. This map is used to parse GE Pfile:
// fieldName nativeType numElements offset stringValue // -------------------------------------------------------— // rhr.rh_rdbm_rev , FLOAT_4, 1 , 0 value // rhr.rh_logo , CHAR , 10 , 34 value
References svkGEPFileReader::pfMap, and svkImageReader2::StripWhite().
Referenced by svkGEPFileReader::CanReadFile(), and svkGEPFileReader::ParsePFile().
|
static |
Lookup version from rdbmRev:
void ModifyRawField | ( | string | rawField, |
string | value | ||
) |
References svkImageReader2::OnlyReadHeader(), and svkGEPFileReader::ReadGEPFile().
|
static |
|
protected |
Initializes the map of pfile offsets and data types, parses the pfile header and sets the field value in the map to a string representation of the header field.
fieldName nativeType numElements offset stringValue
References svkGEPFileReader::InitOffsetsMap(), and svkGEPFileReader::pfMap.
Referenced by svkGEPFileReader::ReadGEPFile().
void PrintHeader | ( | ) |
Prints the GE PFile Header to stdout
void PrintShortHeader | ( | ) |
Prints the GE PFile Header to stdout
|
protected |
Read GE Pfile header fields into a string STL map for use during initialization of DICOM header by Init*Module methods.
References svkGEPFileReader::checkSeriesUID, svkImageReader2::GlobFileNames(), and svkGEPFileReader::ParsePFile().
Referenced by svkGEPFileReader::CanReadFile(), svkGEPFileReader::Deidentify(), and svkGEPFileReader::ModifyRawField().
void SetChop | ( | bool | chop | ) |
Sets the value of chop for the acquisition.
void SetDeidentificationInstanceUID | ( | string | deidImageUID | ) |
Set the Image InstanceUID to be used for deidentification:
void SetDeidentificationLandmarkUID | ( | string | deidLandmarkUID | ) |
Set the Landmark UID to be used for deidentification:
void SetDeidentificationSeriesUID | ( | string | deidSeriesUID | ) |
Set the SeriesInstanceUID to be used for deidentification:
void SetDeidentificationStudyUID | ( | string | deidStudyUID | ) |
Set the StudyInstanceUID to be used for deidentification:
void SetDeidentify | ( | svkDcmHeader::PHIType | phiType | ) |
Sets mapper's data deidentification behavior. All PHI fields will be replaced with this value in the loaded DCM header.
void SetDeidentify | ( | svkDcmHeader::PHIType | phiType, |
string | deidentificationId | ||
) |
Sets string to use for identification. All PHI fields will be replaced with this value in the loaded DCM header. See !svkDcmHeader::Deidentify().
void SetDeidentify | ( | svkDcmHeader::PHIType | phiType, |
string | patientId, | ||
string | studyId | ||
) |
Sets string to use for identification. All PHI fields will be replaced with this value in the loaded DCM header. See !svkDcmHeader::Deidentify().
void SetEPSIParams | ( | svkEPSIReorder::EPSIType | type, |
svkEPSIReorder::EPSIAxis | axis, | ||
int | first, | ||
int | numLobes, | ||
int | numSkip | ||
) |
References svkGEPFileMapper::LOAD_EPSI, and svkGEPFileReader::SetMapperBehavior().
void SetMapperBehavior | ( | svkGEPFileMapper::MapperBehavior | type | ) |
Sets mapper's data loading behavior.
Referenced by svkGEPFileReader::SetEPSIParams().
|
protectedvirtual |
Appends algo info to provenance record.
Reimplemented from svkImageReader2.
References svkProvenance::AddAlgorithm(), svkProvenance::AddAlgorithmArg(), svkImageReader2::GetOutput(), and svkImageData::GetProvenance().
Referenced by svkGEPFileReader::ExecuteDataWithInformation().
void SetPSDLogic | ( | string | psdName | ) |
void SetTemperature | ( | float | temp | ) |
Sets the acquisition temperature in degrees celcius. Used to set the chemcial shift of water for the PPM reference.
vtkTypeMacro | ( | svkGEPFileReader | , |
svkImageReader2 | |||
) |
bool checkSeriesUID |
|
protected |
Referenced by svkGEPFileReader::GetPFMap(), svkGEPFileReader::InitOffsetsMap(), and svkGEPFileReader::ParsePFile().