32 #define VDATAFILE_HH 1
55 #define MODE_UNKNOWN -1
59 #define MODE_HISTOGRAM 1
61 #define MODE_NORMALIZATION 2
72 #define TYPE_UNKNOWN -1
89 #define SPEC_UNKNOWN -1
91 #define SPEC_EMISSION 0
93 #define SPEC_TRANSMISSION 1
454 {
mp_ID = ap_ImageDimensionsAndQuantification;}
525 virtual int Shuffle( int64_t );
void SetDataMode(int a_dataMode)
set the data mode
void SetIgnorePOIFlag(bool a_ignorePOIFlag)
Set a boolean that that if we ignore POI information or not.
This class is designed to be a mother virtual class for DataFile.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
void GetEventIndexStartAndStop(int64_t *ap_indexStart, int64_t *ap_indexStop, int a_subsetNum=0, int a_NbSubsets=1)
Compute the index start and stop of the events loop with respect to the current subset and MPI size a...
Declaration of class oImageDimensionsAndQuantification.
bool mp_POIDirectionFlag[3]
virtual vEvent * GetEventSpecific(char *ap_buffer, int a_th)=0
This function is implemented in child classes Read an event from the position pointed by 'ap_buffer...
int CheckParameters()
Check the initialization of member variables Call the CheckSpecificParameters() function implemente...
virtual int WriteHeader()=0
This function is implemented in child classes. Generate a header file according to the data output ...
FLTNB GetCalibrationFactor()
virtual int CheckFileSizeConsistency()=0
int SetParametersFrom(vDataFile *ap_DataFile)
Initialize all parameters from the provided datafile.
oMemoryMapped * mp_MappedFile
int ReadInfoInHeader(bool a_affectQuantificationFlag=true)
Read and check general information from the header datafile Call the ReadSpecificInformationInHeade...
virtual int WriteEvent(vEvent *ap_Event, int a_th=0)=0
This function is implemented in child classes Write event according to the chosen type of data...
void SetVerbose(int a_verboseLevel)
set verbosity
virtual int CheckSpecificConsistencyWithAnotherDataFile(vDataFile *ap_DataFile)=0
Check consistency between 'this' and the provided datafile, for specific characteristics.
void SetDuration(FLTNB a_value)
virtual int ComputeSizeEvent()=0
This function is implemented in child classes Computation of the size of each event according to th...
int CheckConsistencyWithAnotherBedDataFile(vDataFile *ap_DataFile)
Check consistency between 'this' and the provided datafile as two bed positions.
string GetDataSpecToString()
virtual ~vDataFile()
vDataFile destructor.
virtual int GetMaxRingDiff()
Return an error by default. This function is surcharged by the PET (and CT) scanner daughter class...
int InitializeMappedFile()
Check the datafile existency, map it to memory and get the raw char* pointer. .
Declaration of class iEventSPECT.
void SetPOIResolution(FLTNB ap_value[3])
initialize the POI resolution (for list-mode)
Declaration of class iEventHistoPET.
int PROJ_WriteData()
Write/Merge chunk of data in a general data file.
vEvent * GetEvent(int64_t a_eventIndex, int a_th=0)
string GetHeaderDataFileName()
int CloseFile()
Close as many binary file stream for writing.
void SetBinaryDataFileName(const string &a_dataFileName)
set the data binary file name
virtual int CheckSpecificParameters()=0
This function is implemented in child classes Check specific parameters of child classes...
void SetStartTime(FLTNB a_value)
bool * GetPOIDirectionFlag()
vDataFile()
vDataFile constructor.
void SetDataType(int a_dataType)
set the data type
void SetCalibrationFactor(FLTNB a_value)
initialize the global calibration factor with a FLTNB value
bool GetBedPositionFlag()
oImageDimensionsAndQuantification * mp_ID
Declaration of class sScannerManager.
virtual int ReadSpecificInfoInHeader(bool a_affectQuantificationFlag=true)=0
This function is implemented in child classes Read and check modality-specific information from the...
Declaration of class vEvent.
virtual int PrepareDataFile()=0
This function is implemented in child classes Store different kind of information inside arrays (da...
FLTNB m_relativeBedPosition
FLTNB * GetPOIResolution()
void SetHeaderDataFileName(const string &a_headerFileName)
set the data header file name
int OpenFileForWriting(string a_suffix="")
Open a binary file stream for writing, with eventually the suffix appended to the file name...
vEvent * PROJ_GenerateEvent(int idx_elt1, int idx_elt2, int a_th)
Generate a standard event and set up its ID Used by the projection, list-mode sensitivity generatio...
virtual void DescribeSpecific()=0
A pure virtual function used to describe the specific parts of the datafile.
void SetNbEvents(int64_t a_value)
initialize the number of events with a int64_t value
FLTNB mp_POIResolution[3]
Implementation of file to memory mapping.
Declaration of class iEventListPET.
void SetBedIndex(int a_bedIndex)
set the bed index corresponding to this data file
Declaration of class sOutputManager.
Mother class for the Event objects.
Declaration of class iEventPET.
vEvent ** m2p_BufferEvent
FLTNB GetRelativeBedPosition()
void Describe()
A function used to describe the generic parts of the datafile.
This class is designed to manage all dimensions and quantification related stuff. ...
string GetDataTypeToString()
Declaration of class iEventNorm.
virtual int SetSpecificParametersFrom(vDataFile *ap_DataFile)=0
This function is implemented in child classes Initialize all specific parameters from the provided ...
Portable read-only memory mapping (Windows and Linux)
FLTNB m_calibrationFactor
int PROJ_DeleteTmpDataFile()
Delete temporary datafile used for multithreaded output writing if needed.
virtual int PROJ_GetScannerSpecificParameters()=0
This function is implemented in child classes It is used to set several variables of the datafile w...
int GetVerbose()
Get the verbose level.
virtual int Shuffle(int64_t)
!!!\ This function has been modified to be used specifically with a
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
set the pointer to the oImageDimensionsAndQuantification object
virtual int PROJ_InitFile()=0
This function is implemented in child classes Initialize the fstream objets for output writing as w...
string GetDataModeToString()
Declaration of class iEventCT.