11 #include "gVariables.hh" 19 #include "sOutputManager.hh" 20 #include "sScannerManager.hh" 21 #include "oImageDimensionsAndQuantification.hh" 23 #include "oInterfileIO.hh" 33 #define MODE_UNKNOWN -1 37 #define MODE_HISTOGRAM 1 39 #define MODE_NORMALIZATION 2 50 #define TYPE_UNKNOWN -1 67 #define SPEC_UNKNOWN -1 69 #define SPEC_EMISSION 0 71 #define SPEC_TRANSMISSION 1 448 {
mp_ID = ap_ImageDimensionsAndQuantification;}
534 virtual int Shuffle( int64_t );
void SetDataMode(int a_dataMode)
void SetIgnorePOIFlag(bool a_ignorePOIFlag)
This class is designed to be a mother virtual class for DataFile.
INTNB * mp_additionalDataSize
void GetEventIndexStartAndStop(int64_t *ap_indexStart, int64_t *ap_indexStop, int a_subsetNum=0, int a_NbSubsets=1)
int64_t GetNbEvents()
Get the total number of events in the datafile.
Declaration of class iEventListPET.
bool * GetPOIDirectionFlag()
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 ...
oMemoryMapped * mp_MappedFile
FLTNB GetCalibrationFactor()
FLTNB ** m2p_additionalData
virtual int CheckFileSizeConsistency()=0
int SetParametersFrom(vDataFile *ap_DataFile)
virtual int WriteEvent(vEvent *ap_Event, int a_th=0)=0
int ReadInfoInHeader(bool a_affectQuantificationFlag=true)
void SetVerbose(int a_verboseLevel)
Declaration of class iEventNorm.
virtual int ReadSpecificInfoInHeader(bool a_affectQuantificationFlag=true)=0
void SetDuration(FLTNB a_value)
FLTNB * GetPOIResolution()
Declaration of class iEventHistoPET.
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)
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...
FLTNB mp_POIResolution[3]
int InitializeMappedFile()
Check the datafile existency, map it to memory and get the raw char* pointer. .
virtual int CheckSpecificConsistencyWithAnotherDataFile(vDataFile *ap_DataFile)=0
void SetPOIResolution(FLTNB ap_value[3])
FLTNB * GetNewAdditionalDataMatrix(INTNB a_nbDataPerEvent)
Allocate the memory for this additional data matrix and return the pointer to the matrix...
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)
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)
void SetCalibrationFactor(FLTNB a_value)
bool GetBedPositionFlag()
vEvent ** m2p_BufferEvent
virtual int PrepareDataFile()=0
This function is implemented in child classes Store different kind of information inside arrays (da...
Declaration of class iEventSPECT.
FLTNB m_relativeBedPosition
void SetHeaderDataFileName(const string &a_headerFileName)
int OpenFileForWriting(string a_suffix="")
vEvent * PROJ_GenerateEvent(int idx_elt1, int idx_elt2, int a_th)
virtual void DescribeSpecific()=0
A pure virtual function used to describe the specific parts of the datafile.
int GetNbAdditionalData()
Get the number of additional data.
void SetNbEvents(int64_t a_value)
int InitializeAdditionalData(const string &a_pathToAdditionalData)
Memory allocation and initialization for the additional data matrices.
Implementation of file to memory mapping.
void SetBedIndex(int a_bedIndex)
bool mp_POIDirectionFlag[3]
Mother class for the Event objects.
FLTNB GetRelativeBedPosition()
Declaration of class iEventCT.
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 vEvent.
virtual vEvent * GetEventSpecific(char *ap_buffer, int a_th)=0
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...
Declaration of class iEventPET.
virtual int Shuffle(int64_t)
!!!\ This function has been modified to be used specifically with a
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
virtual int SetSpecificParametersFrom(vDataFile *ap_DataFile)=0
virtual int PROJ_InitFile()=0
This function is implemented in child classes Initialize the fstream objets for output writing as w...
string GetDataModeToString()
oImageDimensionsAndQuantification * mp_ID