10 #define VDATAFILE_HH 1
32 #define MODE_UNKNOWN -1
36 #define MODE_HISTOGRAM 1
38 #define MODE_NORMALIZATION 2
49 #define TYPE_UNKNOWN -1
55 #define TYPE_TRANSMISSION 2
409 {
mp_ID = ap_ImageDimensionsAndQuantification;}
508 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]
vEvent * GetEventWithoutOrderAssumption(int64_t a_eventIndex, int a_th)
According to the current part of the datafile loaded in memory, either read from this buffer or direc...
int CheckParameters()
Check the initialization of member variables Call the CheckSpecificParameters() function implemente...
virtual vEvent * GetEventFromBuffer(char *ap_buffer, int a_th)=0
This function is implemented in child classes Read an event from the position pointed by 'ap_buffer...
FLTNB GetCalibrationFactor()
bool * mp_overBufferRange
int64_t m_1stIdxArrayEvents
virtual int CheckFileSizeConsistency()=0
int ReadInfoInHeader(bool a_affectQuantificationFlag=true)
Read and check general information from the header datafile Call the ReadSpecificInformationInHeade...
virtual int PROJ_WriteHeader()=0
This function is implemented in child classes. Generate a header file according to the projection a...
void SetVerbose(int a_verboseLevel)
set verbosity
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...
bool m_requestBufferFilling
Declaration of class iEventTransmission.
virtual ~vDataFile()
vDataFile destructor.
virtual int GetMaxRingDiff()
Return an error by default. This function is surcharged by the PET (and CT) scanner daughter class...
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.
string GetHeaderDataFileName()
int64_t m_sizeArrayEvents
virtual int CheckSpecificParameters()=0
This function is implemented in child classes Check specific parameters of child classes...
void SetStartTime(FLTNB a_value)
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
void ResetBufferRange()
Simply set the m_1stIdxArrayEvents and m_lastIdxArrayEvents to -1 only if the percentage load is stri...
oImageDimensionsAndQuantification * mp_ID
int CheckConsistencyWithAnotherBedDatafile(vDataFile *ap_Datafile)
Check consistency between 'this' and the provided datafile as two bed positions.
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 * GetPOIResolution()
void SetHeaderDataFileName(const string &a_headerFileName)
set the data header file name
int64_t * mp_nbEventsReadFromFile
virtual int PROJ_WriteEvent(vEvent *ap_Event, int a_th)=0
This function is implemented in child classes Write event according to the chosen type of data...
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...
int PROJ_DeleteTmpDatafile()
Delete temporary datafile used for multithreaded output writing if needed.
vEvent * GetEventWithAscendingOrderAssumption(int64_t a_eventIndex, int64_t a_eventIndexLimit, int a_th)
According to the current part of the datafile loaded in memory, either read from this buffer or direc...
bool m_currentlyFillingBuffer
vEvent * GetEventFromFile(int64_t a_eventIndex, int a_th)
Return the a_eventIndex event from the datafile.
int GetPercentageLoad()
Get the percentage of the data file that will be loaded in memory.
virtual int CheckSpecificConsistencyWithAnotherDatafile(vDataFile *ap_Datafile)=0
Check consistency between 'this' and the provided datafile, for specific characteristics.
int FillBuffer(int64_t a_eventIndex)
Fill 'mp_arrayEvents' from the 'a_eventIndex' position in the data file. The filling process stops ...
void SetNbEvents(int64_t a_value)
initialize the number of events with a int64_t value
FLTNB mp_POIResolution[3]
bool * mp_currentlyReadingBuffer
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
This class is designed to manage all dimensions and quantification related stuff. ...
int InitializeFile()
Instantiate the fstream objets for input reading and check if the related datafile's existence and co...
Declaration of class iEventNorm.
char ** m2p_bufferEventFromFile
FLTNB m_calibrationFactor
virtual int PROJ_GetScannerSpecificParameters()=0
This function is implemented in child classes It is used to set several variables of the datafile w...
int64_t m_lastIdxArrayEvents
int GetVerbose()
Get the verbose level.
virtual int Shuffle(int64_t)
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
set the pointer to the oImageDimensionsAndQuantification object
void SetPercentageLoad(int a_percentageLoad)
Set the percentage of the data file that will be loaded in memory.
virtual int PROJ_InitFile()=0
This function is implemented in child classes Initialize the fstream objets for output writing as w...