CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
vDataFile Class Referenceabstract

This class is designed to be a mother virtual class for DataFile. More...

#include <vDataFile.hh>

Inheritance diagram for vDataFile:
Inheritance graph
Collaboration diagram for vDataFile:
Collaboration graph

Public Member Functions

 vDataFile ()
 vDataFile constructor. More...
 
virtual ~vDataFile ()
 vDataFile destructor. More...
 
int ReadInfoInHeader (bool a_affectQuantificationFlag=true)
 
int SetParametersFrom (vDataFile *ap_DataFile)
 
int CheckParameters ()
 Check the initialization of member variables
Call the CheckSpecificParameters() function implemented in child classes. More...
 
int InitializeMappedFile ()
 Check the datafile existency, map it to memory and get the raw char* pointer.
. More...
 
virtual int ComputeSizeEvent ()=0
 This function is implemented in child classes
Computation of the size of each event according to the mandatory/optional correction fields. More...
 
virtual int PrepareDataFile ()=0
 This function is implemented in child classes
Store different kind of information inside arrays (data relative to specific correction as well as basic raw data for the case data is loaded in RAM)
Use the flag provided by the user to determine how the data has to be sorted (preloaded or read on the fly) More...
 
int OpenFileForWriting (string a_suffix="")
 
int CloseFile ()
 Close as many binary file stream for writing. More...
 
virtual int WriteHeader ()=0
 This function is implemented in child classes.
Generate a header file according to the data output information. More...
 
virtual int WriteEvent (vEvent *ap_Event, int a_th=0)=0
 
vEventGetEvent (int64_t a_eventIndex, int a_th=0)
 
virtual vEventGetEventSpecific (char *ap_buffer, int a_th)=0
 
void GetEventIndexStartAndStop (int64_t *ap_indexStart, int64_t *ap_indexStop, int a_subsetNum=0, int a_NbSubsets=1)
 
int CheckConsistencyWithAnotherBedDataFile (vDataFile *ap_DataFile)
 
void Describe ()
 A function used to describe the generic parts of the datafile. More...
 
virtual void DescribeSpecific ()=0
 A pure virtual function used to describe the specific parts of the datafile. More...
 
virtual int PROJ_InitFile ()=0
 This function is implemented in child classes
Initialize the fstream objets for output writing as well as some other variables specific to the Projection script. More...
 
virtual int PROJ_GetScannerSpecificParameters ()=0
 This function is implemented in child classes
It is used to set several variables of the datafile when using the projection script.
Get modality specific parameters from the scanner object, through the scannerManager. More...
 
int PROJ_WriteData ()
 Write/Merge chunk of data in a general data file. More...
 
int PROJ_DeleteTmpDataFile ()
 Delete temporary datafile used for multithreaded output writing if needed. More...
 
vEventPROJ_GenerateEvent (int idx_elt1, int idx_elt2, int a_th)
 
int GetBedIndex ()
 
int GetDataMode ()
 
string GetDataModeToString ()
 
int GetDataType ()
 
string GetDataTypeToString ()
 
int GetDataSpec ()
 
string GetDataSpecToString ()
 
int64_t GetSize ()
 
int64_t GetEventSize ()
 
string GetHeaderDataFileName ()
 
string GetDataFileName ()
 
FLTNB GetStartTime ()
 
FLTNB GetDuration ()
 
FLTNB GetCalibrationFactor ()
 
FLTNBGetPOIResolution ()
 
bool * GetPOIDirectionFlag ()
 
bool GetPOIInfoFlag ()
 
bool GetIgnorePOIFlag ()
 
virtual int GetMaxRingDiff ()
 Return an error by default.
This function is surcharged by the PET (and CT) scanner daughter class. More...
 
void SetDataMode (int a_dataMode)
 
void SetDataType (int a_dataType)
 
void SetBedIndex (int a_bedIndex)
 
bool GetBedPositionFlag ()
 
FLTNB GetRelativeBedPosition ()
 
void SetVerbose (int a_verboseLevel)
 
int GetVerbose ()
 Get the verbose level. More...
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetPOIResolution (FLTNB ap_value[3])
 
void SetIgnorePOIFlag (bool a_ignorePOIFlag)
 
void SetHeaderDataFileName (const string &a_headerFileName)
 
void SetBinaryDataFileName (const string &a_dataFileName)
 
void SetCalibrationFactor (FLTNB a_value)
 
void SetNbEvents (int64_t a_value)
 
void SetStartTime (FLTNB a_value)
 
void SetDuration (FLTNB a_value)
 
string GetScannerName ()
 
virtual int Shuffle (int64_t)
 !!!\ This function has been modified to be used specifically with a More...
 
 vDataFile ()
 vDataFile constructor. More...
 
virtual ~vDataFile ()
 vDataFile destructor. More...
 
int ReadInfoInHeader (bool a_affectQuantificationFlag=true)
 
int SetParametersFrom (vDataFile *ap_DataFile)
 
int CheckParameters ()
 
int InitializeMappedFile ()
 
int InitializeAdditionalData (const string &a_pathToAdditionalData)
 Memory allocation and initialization for the additional data matrices. More...
 
FLTNBGetNewAdditionalDataMatrix (INTNB a_nbDataPerEvent)
 Allocate the memory for this additional data matrix and return the pointer to the matrix. More...
 
virtual int ComputeSizeEvent ()=0
 
virtual int PrepareDataFile ()=0
 
int OpenFileForWriting (string a_suffix="")
 
int CloseFile ()
 
virtual int WriteHeader ()=0
 
virtual int WriteEvent (vEvent *ap_Event, int a_th=0)=0
 
vEventGetEvent (int64_t a_eventIndex, int a_th=0)
 
virtual vEventGetEventSpecific (char *ap_buffer, int a_th)=0
 
void GetEventIndexStartAndStop (int64_t *ap_indexStart, int64_t *ap_indexStop, int a_subsetNum=0, int a_NbSubsets=1)
 
int CheckConsistencyWithAnotherBedDataFile (vDataFile *ap_DataFile)
 
void Describe ()
 
virtual void DescribeSpecific ()=0
 
virtual int PROJ_InitFile ()=0
 
virtual int PROJ_GetScannerSpecificParameters ()=0
 
int PROJ_WriteData ()
 
int PROJ_DeleteTmpDataFile ()
 
vEventPROJ_GenerateEvent (int idx_elt1, int idx_elt2, int a_th)
 
int GetBedIndex ()
 
int GetDataMode ()
 
string GetDataModeToString ()
 
int GetDataType ()
 
string GetDataTypeToString ()
 
int GetDataSpec ()
 
string GetDataSpecToString ()
 
int64_t GetSize ()
 
int64_t GetEventSize ()
 
string GetHeaderDataFileName ()
 
string GetDataFileName ()
 
FLTNB GetStartTime ()
 
FLTNB GetDuration ()
 
FLTNB GetCalibrationFactor ()
 
FLTNBGetPOIResolution ()
 
bool * GetPOIDirectionFlag ()
 
bool GetPOIInfoFlag ()
 
bool GetIgnorePOIFlag ()
 
virtual int GetMaxRingDiff ()
 
void SetDataMode (int a_dataMode)
 
void SetDataType (int a_dataType)
 
void SetBedIndex (int a_bedIndex)
 
bool GetBedPositionFlag ()
 
FLTNB GetRelativeBedPosition ()
 
void SetVerbose (int a_verboseLevel)
 
int GetVerbose ()
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetPOIResolution (FLTNB ap_value[3])
 
void SetIgnorePOIFlag (bool a_ignorePOIFlag)
 
void SetHeaderDataFileName (const string &a_headerFileName)
 
void SetBinaryDataFileName (const string &a_dataFileName)
 
void SetCalibrationFactor (FLTNB a_value)
 
int64_t GetNbEvents ()
 Get the total number of events in the datafile. More...
 
void SetNbEvents (int64_t a_value)
 
void SetStartTime (FLTNB a_value)
 
void SetDuration (FLTNB a_value)
 
string GetScannerName ()
 
int GetNbAdditionalData ()
 Get the number of additional data. More...
 
virtual int Shuffle (int64_t)
 

Public Attributes

FLTNB ** m2p_additionalData
 

Protected Attributes

oImageDimensionsAndQuantificationmp_ID
 
int m_verbose
 
string m_headerFileName
 
string m_dataFileName
 
int64_t m_nbEvents
 
int m_dataMode
 
int m_dataType
 
int m_dataSpec
 
FLTNB m_startTimeInSec
 
FLTNB m_durationInSec
 
FLTNB m_calibrationFactor
 
int m_bedIndex
 
FLTNB m_relativeBedPosition
 
bool m_bedPositionFlag
 
string m_scannerName
 
bool m_POIInfoFlag
 
bool m_ignorePOIFlag
 
bool mp_POIDirectionFlag [3]
 
FLTNB mp_POIResolution [3]
 
int64_t m_sizeEvent
 
fstream ** m2p_dataFile
 
vEvent ** m2p_BufferEvent
 
int64_t m_mpi1stEvent
 
int64_t m_mpiLastEvent
 
int64_t m_mpiNbEvents
 
oMemoryMappedmp_MappedFile
 
char * mp_mappedMemory
 
int m_nbAdditionalData
 
INTNBmp_additionalDataSize
 
bool m_loadedAdditional
 
int m_nbCustomINTData
 
int m_nbCustomFLTData
 

Private Member Functions

virtual int SetSpecificParametersFrom (vDataFile *ap_DataFile)=0
 
virtual int CheckSpecificParameters ()=0
 This function is implemented in child classes
Check specific parameters of child classes. More...
 
virtual int CheckFileSizeConsistency ()=0
 
virtual int ReadSpecificInfoInHeader (bool a_affectQuantificationFlag=true)=0
 
virtual int CheckSpecificConsistencyWithAnotherDataFile (vDataFile *ap_DataFile)=0
 
virtual int SetSpecificParametersFrom (vDataFile *ap_DataFile)=0
 
virtual int CheckSpecificParameters ()=0
 
virtual int CheckFileSizeConsistency ()=0
 
virtual int ReadSpecificInfoInHeader (bool a_affectQuantificationFlag=true)=0
 
virtual int CheckSpecificConsistencyWithAnotherDataFile (vDataFile *ap_DataFile)=0
 

Detailed Description

This class is designed to be a mother virtual class for DataFile.

This class manages the reading of the generic input file (header + data).
It uses some events as buffers to get data informations during run-time.

Definition at line 80 of file code/include/datafile/vDataFile.hh.

Constructor & Destructor Documentation

◆ vDataFile() [1/2]

vDataFile::vDataFile ( )

vDataFile constructor.

Initialize the member variables to their default values.

Definition at line 16 of file code/src/datafile/vDataFile.cc.

◆ ~vDataFile() [1/2]

vDataFile::~vDataFile ( )
virtual

vDataFile destructor.

Definition at line 62 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:

◆ vDataFile() [2/2]

vDataFile::vDataFile ( )

vDataFile constructor.

Initialize the member variables to their default values.

◆ ~vDataFile() [2/2]

virtual vDataFile::~vDataFile ( )
virtual

vDataFile destructor.

Member Function Documentation

◆ CheckConsistencyWithAnotherBedDataFile() [1/2]

int vDataFile::CheckConsistencyWithAnotherBedDataFile ( vDataFile ap_DataFile)

Definition at line 371 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckConsistencyWithAnotherBedDataFile() [2/2]

int vDataFile::CheckConsistencyWithAnotherBedDataFile ( vDataFile ap_DataFile)

◆ CheckFileSizeConsistency() [1/2]

virtual int vDataFile::CheckFileSizeConsistency ( )
privatepure virtual

Implemented in iDataFilePET, iDataFilePET, iDataFileSPECT, iDataFileSPECT, iDataFileCT, and iDataFileCT.

Here is the caller graph for this function:

◆ CheckFileSizeConsistency() [2/2]

virtual int vDataFile::CheckFileSizeConsistency ( )
privatepure virtual

◆ CheckParameters() [1/2]

int vDataFile::CheckParameters ( )

Check the initialization of member variables
Call the CheckSpecificParameters() function implemented in child classes.

Returns
0 if success, and positive value otherwise.

Definition at line 300 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckParameters() [2/2]

int vDataFile::CheckParameters ( )

◆ CheckSpecificConsistencyWithAnotherDataFile() [1/2]

virtual int vDataFile::CheckSpecificConsistencyWithAnotherDataFile ( vDataFile ap_DataFile)
privatepure virtual

Implemented in iDataFilePET, iDataFilePET, iDataFileSPECT, iDataFileSPECT, iDataFileCT, and iDataFileCT.

Here is the caller graph for this function:

◆ CheckSpecificConsistencyWithAnotherDataFile() [2/2]

virtual int vDataFile::CheckSpecificConsistencyWithAnotherDataFile ( vDataFile ap_DataFile)
privatepure virtual

◆ CheckSpecificParameters() [1/2]

int vDataFile::CheckSpecificParameters ( )
privatepure virtual

This function is implemented in child classes
Check specific parameters of child classes.

Returns
0 if success, and positive value otherwise.

Implemented in iDataFilePET, iDataFilePET, iDataFileSPECT, iDataFileSPECT, iDataFileCT, and iDataFileCT.

Here is the caller graph for this function:

◆ CheckSpecificParameters() [2/2]

virtual int vDataFile::CheckSpecificParameters ( )
privatepure virtual

◆ CloseFile() [1/2]

int vDataFile::CloseFile ( )

Close as many binary file stream for writing.

Use the m2p_dataFile for that purpose, see OpenFileForWriting() function

Returns
0 upon success, another value otherwise

Definition at line 563 of file code/src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ CloseFile() [2/2]

int vDataFile::CloseFile ( )

◆ ComputeSizeEvent() [1/2]

vDataFile::ComputeSizeEvent ( )
pure virtual

This function is implemented in child classes
Computation of the size of each event according to the mandatory/optional correction fields.

Returns
0 is success, positive value otherwise

Implemented in iDataFileCT, iDataFileCT, iDataFileSPECT, iDataFileSPECT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ ComputeSizeEvent() [2/2]

virtual int vDataFile::ComputeSizeEvent ( )
pure virtual

◆ Describe() [1/2]

void vDataFile::Describe ( )

A function used to describe the generic parts of the datafile.

Definition at line 495 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Describe() [2/2]

void vDataFile::Describe ( )

◆ DescribeSpecific() [1/2]

vDataFile::DescribeSpecific ( )
pure virtual

A pure virtual function used to describe the specific parts of the datafile.

Implemented in iDataFileSPECT, iDataFileSPECT, iDataFileCT, iDataFileCT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ DescribeSpecific() [2/2]

virtual void vDataFile::DescribeSpecific ( )
pure virtual

◆ GetBedIndex() [1/2]

int vDataFile::GetBedIndex ( )
inline
Returns
its bed index

Definition at line 271 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetBedIndex() [2/2]

int vDataFile::GetBedIndex ( )
inline

Definition at line 288 of file include/datafile/vDataFile.hh.

◆ GetBedPositionFlag() [1/2]

bool vDataFile::GetBedPositionFlag ( )
inline
Returns
The m_bedPositionFlag

Definition at line 403 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetBedPositionFlag() [2/2]

bool vDataFile::GetBedPositionFlag ( )
inline

Definition at line 420 of file include/datafile/vDataFile.hh.

◆ GetCalibrationFactor() [1/2]

FLTNB vDataFile::GetCalibrationFactor ( )
inline
Returns
calibration factor

Definition at line 345 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetCalibrationFactor() [2/2]

FLTNB vDataFile::GetCalibrationFactor ( )
inline

Definition at line 362 of file include/datafile/vDataFile.hh.

◆ GetDataFileName() [1/2]

string vDataFile::GetDataFileName ( )
inline
Returns
datafile name

Definition at line 327 of file code/include/datafile/vDataFile.hh.

◆ GetDataFileName() [2/2]

string vDataFile::GetDataFileName ( )
inline

Definition at line 344 of file include/datafile/vDataFile.hh.

◆ GetDataMode() [1/2]

int vDataFile::GetDataMode ( )
inline
Returns
data mode

Definition at line 277 of file code/include/datafile/vDataFile.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDataMode() [2/2]

int vDataFile::GetDataMode ( )
inline

Definition at line 294 of file include/datafile/vDataFile.hh.

Here is the call graph for this function:

◆ GetDataModeToString() [1/2]

string vDataFile::GetDataModeToString ( )
Returns
The data mode as a human-readable string

Definition at line 841 of file code/src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ GetDataModeToString() [2/2]

string vDataFile::GetDataModeToString ( )

◆ GetDataSpec() [1/2]

int vDataFile::GetDataSpec ( )
inline
Returns
data spec

Definition at line 299 of file code/include/datafile/vDataFile.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDataSpec() [2/2]

int vDataFile::GetDataSpec ( )
inline

Definition at line 316 of file include/datafile/vDataFile.hh.

Here is the call graph for this function:

◆ GetDataSpecToString() [1/2]

string vDataFile::GetDataSpecToString ( )
Returns
The data spec as a human-readable string

Definition at line 857 of file code/src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ GetDataSpecToString() [2/2]

string vDataFile::GetDataSpecToString ( )

◆ GetDataType() [1/2]

int vDataFile::GetDataType ( )
inline
Returns
data type

Definition at line 288 of file code/include/datafile/vDataFile.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDataType() [2/2]

int vDataFile::GetDataType ( )
inline

Definition at line 305 of file include/datafile/vDataFile.hh.

Here is the call graph for this function:

◆ GetDataTypeToString() [1/2]

string vDataFile::GetDataTypeToString ( )
Returns
The data type as a human-readable string

Definition at line 825 of file code/src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ GetDataTypeToString() [2/2]

string vDataFile::GetDataTypeToString ( )

◆ GetDuration() [1/2]

FLTNB vDataFile::GetDuration ( )
inline
Returns
FLTNB corresponding to the acquisition duration (s)

Definition at line 339 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetDuration() [2/2]

FLTNB vDataFile::GetDuration ( )
inline

Definition at line 356 of file include/datafile/vDataFile.hh.

◆ GetEvent() [1/2]

vEvent * vDataFile::GetEvent ( int64_t  a_eventIndex,
int  a_th = 0 
)

Definition at line 583 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEvent() [2/2]

vEvent* vDataFile::GetEvent ( int64_t  a_eventIndex,
int  a_th = 0 
)

◆ GetEventIndexStartAndStop() [1/2]

void vDataFile::GetEventIndexStartAndStop ( int64_t *  ap_indexStart,
int64_t *  ap_indexStop,
int  a_subsetNum = 0,
int  a_NbSubsets = 1 
)

Definition at line 656 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEventIndexStartAndStop() [2/2]

void vDataFile::GetEventIndexStartAndStop ( int64_t *  ap_indexStart,
int64_t *  ap_indexStop,
int  a_subsetNum = 0,
int  a_NbSubsets = 1 
)

◆ GetEventSize() [1/2]

int64_t vDataFile::GetEventSize ( )
inline

Definition at line 316 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetEventSize() [2/2]

int64_t vDataFile::GetEventSize ( )
inline

Definition at line 333 of file include/datafile/vDataFile.hh.

◆ GetEventSpecific() [1/2]

virtual vEvent* vDataFile::GetEventSpecific ( char *  ap_buffer,
int  a_th 
)
pure virtual

Implemented in iDataFileCT, iDataFileCT, iDataFileSPECT, iDataFileSPECT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ GetEventSpecific() [2/2]

virtual vEvent* vDataFile::GetEventSpecific ( char *  ap_buffer,
int  a_th 
)
pure virtual

◆ GetHeaderDataFileName() [1/2]

string vDataFile::GetHeaderDataFileName ( )
inline
Returns
headerdatafile name

Definition at line 321 of file code/include/datafile/vDataFile.hh.

◆ GetHeaderDataFileName() [2/2]

string vDataFile::GetHeaderDataFileName ( )
inline

Definition at line 338 of file include/datafile/vDataFile.hh.

◆ GetIgnorePOIFlag() [1/2]

bool vDataFile::GetIgnorePOIFlag ( )
inline
Returns
m_ignorePOIFlag

Definition at line 369 of file code/include/datafile/vDataFile.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIgnorePOIFlag() [2/2]

bool vDataFile::GetIgnorePOIFlag ( )
inline

Definition at line 386 of file include/datafile/vDataFile.hh.

Here is the call graph for this function:

◆ GetMaxRingDiff() [1/2]

int vDataFile::GetMaxRingDiff ( )
virtual

Return an error by default.
This function is surcharged by the PET (and CT) scanner daughter class.

Returns
-1 (error) if not surcharged by a daughter class

Definition at line 687 of file code/src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ GetMaxRingDiff() [2/2]

virtual int vDataFile::GetMaxRingDiff ( )
virtual

◆ GetNbAdditionalData()

public inline int vDataFile::GetNbAdditionalData ( )
inline

Get the number of additional data.

Returns
m_nbAdditionalData

Definition at line 530 of file include/datafile/vDataFile.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNbEvents()

public inline int64_t vDataFile::GetNbEvents ( )
inline

Get the total number of events in the datafile.

Returns
m_nbEvents

Definition at line 493 of file include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetNewAdditionalDataMatrix()

FLTNB * vDataFile::GetNewAdditionalDataMatrix ( INTNB  a_nbDataPerEvent)

Allocate the memory for this additional data matrix and return the pointer to the matrix.

Parameters
a_nbDataPerEventthe number of data per event

The size of the matrix will be equal to the number of events multiplied by the input parameter

Returns
The pointer to the additional data matrix

Definition at line 374 of file src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ GetPOIDirectionFlag() [1/2]

bool * vDataFile::GetPOIDirectionFlag ( )
inline
Returns
pointer to the array containing POI (position of interaction) direction flags

Definition at line 357 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetPOIDirectionFlag() [2/2]

bool* vDataFile::GetPOIDirectionFlag ( )
inline

Definition at line 374 of file include/datafile/vDataFile.hh.

◆ GetPOIInfoFlag() [1/2]

bool vDataFile::GetPOIInfoFlag ( )
inline
Returns
m_POIInfoFlag

Definition at line 363 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetPOIInfoFlag() [2/2]

bool vDataFile::GetPOIInfoFlag ( )
inline

Definition at line 380 of file include/datafile/vDataFile.hh.

◆ GetPOIResolution() [1/2]

FLTNB * vDataFile::GetPOIResolution ( )
inline
Returns
pointer to the array containing POI (position of interaction) resolution

Definition at line 351 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetPOIResolution() [2/2]

FLTNB* vDataFile::GetPOIResolution ( )
inline

Definition at line 368 of file include/datafile/vDataFile.hh.

◆ GetRelativeBedPosition() [1/2]

FLTNB vDataFile::GetRelativeBedPosition ( )
inline
Returns
The m_relativeBedPositionInMm

Definition at line 409 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetRelativeBedPosition() [2/2]

FLTNB vDataFile::GetRelativeBedPosition ( )
inline

Definition at line 426 of file include/datafile/vDataFile.hh.

◆ GetScannerName() [1/2]

string vDataFile::GetScannerName ( )
inline
Returns
the scanner name

Definition at line 499 of file code/include/datafile/vDataFile.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScannerName() [2/2]

string vDataFile::GetScannerName ( )
inline

Definition at line 523 of file include/datafile/vDataFile.hh.

◆ GetSize() [1/2]

int64_t vDataFile::GetSize ( )
inline
Returns
number of events in the datafile

Definition at line 310 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetSize() [2/2]

int64_t vDataFile::GetSize ( )
inline

Definition at line 327 of file include/datafile/vDataFile.hh.

◆ GetStartTime() [1/2]

FLTNB vDataFile::GetStartTime ( )
inline
Returns
FLTNB corresponding to the acquisition start time (s)

Definition at line 333 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetStartTime() [2/2]

FLTNB vDataFile::GetStartTime ( )
inline

Definition at line 350 of file include/datafile/vDataFile.hh.

◆ GetVerbose() [1/2]

int vDataFile::GetVerbose ( )
inline

Get the verbose level.

Returns
m_verbose

Definition at line 423 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ GetVerbose() [2/2]

int vDataFile::GetVerbose ( )
inline

Definition at line 440 of file include/datafile/vDataFile.hh.

◆ InitializeAdditionalData()

int vDataFile::InitializeAdditionalData ( const string &  a_pathToAdditionalData)

Memory allocation and initialization for the additional data matrices.

Parameters
a_pathToAdditionalDatapath to additional data, multiple files are separated by commas

Nothing is performed if the path provided in parameter is empty; the data is directly read

Returns
0 if success, positive value otherwise

Definition at line 289 of file src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeMappedFile() [1/2]

int vDataFile::InitializeMappedFile ( )

Check the datafile existency, map it to memory and get the raw char* pointer.
.

Returns
0 if success, and positive value otherwise.

Definition at line 447 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeMappedFile() [2/2]

int vDataFile::InitializeMappedFile ( )

◆ OpenFileForWriting() [1/2]

int vDataFile::OpenFileForWriting ( string  a_suffix = "")

Definition at line 522 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OpenFileForWriting() [2/2]

int vDataFile::OpenFileForWriting ( string  a_suffix = "")

◆ PrepareDataFile() [1/2]

vDataFile::PrepareDataFile ( )
pure virtual

This function is implemented in child classes
Store different kind of information inside arrays (data relative to specific correction as well as basic raw data for the case data is loaded in RAM)
Use the flag provided by the user to determine how the data has to be sorted (preloaded or read on the fly)

Returns
0 is success, positive value otherwise

Implemented in iDataFileCT, iDataFileCT, iDataFileSPECT, iDataFileSPECT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ PrepareDataFile() [2/2]

virtual int vDataFile::PrepareDataFile ( )
pure virtual

◆ PROJ_DeleteTmpDataFile() [1/2]

int vDataFile::PROJ_DeleteTmpDataFile ( )

Delete temporary datafile used for multithreaded output writing if needed.

Returns
0 if success, and positive value otherwise.
0 if success, and positive value otherwise.

Definition at line 771 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PROJ_DeleteTmpDataFile() [2/2]

int vDataFile::PROJ_DeleteTmpDataFile ( )

◆ PROJ_GenerateEvent() [1/2]

vEvent * vDataFile::PROJ_GenerateEvent ( int  idx_elt1,
int  idx_elt2,
int  a_th 
)

Definition at line 809 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PROJ_GenerateEvent() [2/2]

vEvent* vDataFile::PROJ_GenerateEvent ( int  idx_elt1,
int  idx_elt2,
int  a_th 
)

◆ PROJ_GetScannerSpecificParameters() [1/2]

vDataFile::PROJ_GetScannerSpecificParameters ( )
pure virtual

This function is implemented in child classes
It is used to set several variables of the datafile when using the projection script.
Get modality specific parameters from the scanner object, through the scannerManager.

Returns
0 if success, positive value otherwise

Implemented in iDataFilePET, iDataFilePET, iDataFileSPECT, iDataFileSPECT, iDataFileCT, and iDataFileCT.

Here is the caller graph for this function:

◆ PROJ_GetScannerSpecificParameters() [2/2]

virtual int vDataFile::PROJ_GetScannerSpecificParameters ( )
pure virtual

◆ PROJ_InitFile() [1/2]

vDataFile::PROJ_InitFile ( )
pure virtual

This function is implemented in child classes
Initialize the fstream objets for output writing as well as some other variables specific to the Projection script.

Returns
0 if success, and positive value otherwise.

Implemented in iDataFilePET, iDataFilePET, iDataFileSPECT, iDataFileSPECT, iDataFileCT, and iDataFileCT.

Here is the caller graph for this function:

◆ PROJ_InitFile() [2/2]

virtual int vDataFile::PROJ_InitFile ( )
pure virtual

◆ PROJ_WriteData() [1/2]

int vDataFile::PROJ_WriteData ( )

Write/Merge chunk of data in a general data file.

Returns
0 if success, and positive value otherwise.
0 if success, and positive value otherwise.

Definition at line 700 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PROJ_WriteData() [2/2]

int vDataFile::PROJ_WriteData ( )

◆ ReadInfoInHeader() [1/2]

int vDataFile::ReadInfoInHeader ( bool  a_affectQuantificationFlag = true)

Definition at line 87 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadInfoInHeader() [2/2]

int vDataFile::ReadInfoInHeader ( bool  a_affectQuantificationFlag = true)

◆ ReadSpecificInfoInHeader() [1/2]

virtual int vDataFile::ReadSpecificInfoInHeader ( bool  a_affectQuantificationFlag = true)
privatepure virtual

Implemented in iDataFileCT, iDataFileCT, iDataFileSPECT, iDataFileSPECT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ ReadSpecificInfoInHeader() [2/2]

virtual int vDataFile::ReadSpecificInfoInHeader ( bool  a_affectQuantificationFlag = true)
privatepure virtual

◆ SetBedIndex() [1/2]

void vDataFile::SetBedIndex ( int  a_bedIndex)
inline

Definition at line 397 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetBedIndex() [2/2]

void vDataFile::SetBedIndex ( int  a_bedIndex)
inline

Definition at line 414 of file include/datafile/vDataFile.hh.

◆ SetBinaryDataFileName() [1/2]

void vDataFile::SetBinaryDataFileName ( const string &  a_dataFileName)
inline

Definition at line 461 of file code/include/datafile/vDataFile.hh.

◆ SetBinaryDataFileName() [2/2]

void vDataFile::SetBinaryDataFileName ( const string &  a_dataFileName)
inline

Definition at line 478 of file include/datafile/vDataFile.hh.

◆ SetCalibrationFactor() [1/2]

void vDataFile::SetCalibrationFactor ( FLTNB  a_value)
inline

Definition at line 469 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetCalibrationFactor() [2/2]

void vDataFile::SetCalibrationFactor ( FLTNB  a_value)
inline

Definition at line 486 of file include/datafile/vDataFile.hh.

◆ SetDataMode() [1/2]

void vDataFile::SetDataMode ( int  a_dataMode)
inline

Definition at line 383 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetDataMode() [2/2]

void vDataFile::SetDataMode ( int  a_dataMode)
inline

Definition at line 400 of file include/datafile/vDataFile.hh.

◆ SetDataType() [1/2]

void vDataFile::SetDataType ( int  a_dataType)
inline

Definition at line 390 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetDataType() [2/2]

void vDataFile::SetDataType ( int  a_dataType)
inline

Definition at line 407 of file include/datafile/vDataFile.hh.

◆ SetDuration() [1/2]

void vDataFile::SetDuration ( FLTNB  a_value)
inline

Definition at line 493 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetDuration() [2/2]

void vDataFile::SetDuration ( FLTNB  a_value)
inline

Definition at line 517 of file include/datafile/vDataFile.hh.

◆ SetHeaderDataFileName() [1/2]

void vDataFile::SetHeaderDataFileName ( const string &  a_headerFileName)
inline

Definition at line 453 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetHeaderDataFileName() [2/2]

void vDataFile::SetHeaderDataFileName ( const string &  a_headerFileName)
inline

Definition at line 470 of file include/datafile/vDataFile.hh.

◆ SetIgnorePOIFlag() [1/2]

void vDataFile::SetIgnorePOIFlag ( bool  a_ignorePOIFlag)
inline

Definition at line 445 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetIgnorePOIFlag() [2/2]

void vDataFile::SetIgnorePOIFlag ( bool  a_ignorePOIFlag)
inline

Definition at line 462 of file include/datafile/vDataFile.hh.

◆ SetImageDimensionsAndQuantification() [1/2]

void vDataFile::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Definition at line 430 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetImageDimensionsAndQuantification() [2/2]

void vDataFile::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Definition at line 447 of file include/datafile/vDataFile.hh.

◆ SetNbEvents() [1/2]

void vDataFile::SetNbEvents ( int64_t  a_value)
inline

Definition at line 477 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetNbEvents() [2/2]

void vDataFile::SetNbEvents ( int64_t  a_value)
inline

Definition at line 501 of file include/datafile/vDataFile.hh.

◆ SetParametersFrom() [1/2]

int vDataFile::SetParametersFrom ( vDataFile ap_DataFile)

Definition at line 260 of file code/src/datafile/vDataFile.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetParametersFrom() [2/2]

int vDataFile::SetParametersFrom ( vDataFile ap_DataFile)

◆ SetPOIResolution() [1/2]

void vDataFile::SetPOIResolution ( FLTNB  ap_value[3])
inline

Definition at line 438 of file code/include/datafile/vDataFile.hh.

◆ SetPOIResolution() [2/2]

void vDataFile::SetPOIResolution ( FLTNB  ap_value[3])
inline

Definition at line 455 of file include/datafile/vDataFile.hh.

◆ SetSpecificParametersFrom() [1/2]

virtual int vDataFile::SetSpecificParametersFrom ( vDataFile ap_DataFile)
privatepure virtual

Implemented in iDataFilePET, iDataFilePET, iDataFileSPECT, iDataFileSPECT, iDataFileCT, and iDataFileCT.

Here is the caller graph for this function:

◆ SetSpecificParametersFrom() [2/2]

virtual int vDataFile::SetSpecificParametersFrom ( vDataFile ap_DataFile)
privatepure virtual

◆ SetStartTime() [1/2]

void vDataFile::SetStartTime ( FLTNB  a_value)
inline

Definition at line 485 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetStartTime() [2/2]

void vDataFile::SetStartTime ( FLTNB  a_value)
inline

Definition at line 509 of file include/datafile/vDataFile.hh.

◆ SetVerbose() [1/2]

void vDataFile::SetVerbose ( int  a_verboseLevel)
inline

Definition at line 416 of file code/include/datafile/vDataFile.hh.

Here is the caller graph for this function:

◆ SetVerbose() [2/2]

void vDataFile::SetVerbose ( int  a_verboseLevel)
inline

Definition at line 433 of file include/datafile/vDataFile.hh.

◆ Shuffle() [1/2]

int vDataFile::Shuffle ( int64_t  nb_events_to_load)
virtual

!!!\ This function has been modified to be used specifically with a

Definition at line 608 of file code/src/datafile/vDataFile.cc.

Here is the caller graph for this function:

◆ Shuffle() [2/2]

virtual int vDataFile::Shuffle ( int64_t  )
virtual

◆ WriteEvent() [1/2]

virtual int vDataFile::WriteEvent ( vEvent ap_Event,
int  a_th = 0 
)
pure virtual

Implemented in iDataFileCT, iDataFileCT, iDataFileSPECT, iDataFileSPECT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ WriteEvent() [2/2]

virtual int vDataFile::WriteEvent ( vEvent ap_Event,
int  a_th = 0 
)
pure virtual

◆ WriteHeader() [1/2]

vDataFile::WriteHeader ( )
pure virtual

This function is implemented in child classes.
Generate a header file according to the data output information.

Returns
0 if success, and positive value otherwise.

Implemented in iDataFileCT, iDataFileCT, iDataFileSPECT, iDataFileSPECT, iDataFilePET, and iDataFilePET.

Here is the caller graph for this function:

◆ WriteHeader() [2/2]

virtual int vDataFile::WriteHeader ( )
pure virtual

Member Data Documentation

◆ m2p_additionalData

FLTNB** vDataFile::m2p_additionalData

Dynamic array for additional data to be used in reconstruction, 2 pointers: 1: number of additional data 2: the data

Definition at line 583 of file include/datafile/vDataFile.hh.

◆ m2p_BufferEvent

vEvent ** vDataFile::m2p_BufferEvent
protected

vEvent structure, used to read and transfer the raw data to each part of the algorithm (multithreaded)

Definition at line 577 of file code/include/datafile/vDataFile.hh.

◆ m2p_dataFile

fstream ** vDataFile::m2p_dataFile
protected

File associated to the raw data file (multithreaded)

Definition at line 576 of file code/include/datafile/vDataFile.hh.

◆ m_bedIndex

int vDataFile::m_bedIndex
protected

Bed position index corresponding to this data file

Definition at line 563 of file code/include/datafile/vDataFile.hh.

◆ m_bedPositionFlag

bool vDataFile::m_bedPositionFlag
protected

Flag indicating that a relative bed position has been provided

Definition at line 565 of file code/include/datafile/vDataFile.hh.

◆ m_calibrationFactor

FLTNB vDataFile::m_calibrationFactor
protected

Calibration factor for the data. Default value =1.0

Definition at line 562 of file code/include/datafile/vDataFile.hh.

◆ m_dataFileName

string vDataFile::m_dataFileName
protected

String containing the path to the raw datafile

Definition at line 555 of file code/include/datafile/vDataFile.hh.

◆ m_dataMode

int vDataFile::m_dataMode
protected

Flag indicating if the data is List (=0) or Histogram (=1) mode

Definition at line 557 of file code/include/datafile/vDataFile.hh.

◆ m_dataSpec

int vDataFile::m_dataSpec
protected

Flag indicating the physical specificity of the data: SPEC_EMISSION or SPEC_TRANSMISSION

Definition at line 559 of file code/include/datafile/vDataFile.hh.

◆ m_dataType

int vDataFile::m_dataType
protected

Flag indicating if the data is PET (=0),SPECT (=1) or TRANSMISSION type (=2)

Definition at line 558 of file code/include/datafile/vDataFile.hh.

◆ m_durationInSec

FLTNB vDataFile::m_durationInSec
protected

Duration of the acquisition (s)

Definition at line 561 of file code/include/datafile/vDataFile.hh.

◆ m_headerFileName

string vDataFile::m_headerFileName
protected

String containing the path to the header file

Definition at line 554 of file code/include/datafile/vDataFile.hh.

◆ m_ignorePOIFlag

bool vDataFile::m_ignorePOIFlag
protected

Flag to say if we ignore the POI data if present, or not. Default = false

Definition at line 570 of file code/include/datafile/vDataFile.hh.

◆ m_loadedAdditional

bool vDataFile::m_loadedAdditional
protected

Flag indicating if additional data have been loaded

Definition at line 624 of file include/datafile/vDataFile.hh.

◆ m_mpi1stEvent

int64_t vDataFile::m_mpi1stEvent
protected

First index managed by this MPI instance

Definition at line 578 of file code/include/datafile/vDataFile.hh.

◆ m_mpiLastEvent

int64_t vDataFile::m_mpiLastEvent
protected

Last index (included) managed by this MPI instance

Definition at line 579 of file code/include/datafile/vDataFile.hh.

◆ m_mpiNbEvents

int64_t vDataFile::m_mpiNbEvents
protected

Number of events managed by this MPI instance

Definition at line 580 of file code/include/datafile/vDataFile.hh.

◆ m_nbAdditionalData

int vDataFile::m_nbAdditionalData
protected

The number of additional data

Definition at line 622 of file include/datafile/vDataFile.hh.

◆ m_nbCustomFLTData

int vDataFile::m_nbCustomFLTData
protected

Nb of customizable EVTFLTDATA variables in the event

Definition at line 628 of file include/datafile/vDataFile.hh.

◆ m_nbCustomINTData

int vDataFile::m_nbCustomINTData
protected

Nb of customizable EVTINTDATA variables in the event

Definition at line 627 of file include/datafile/vDataFile.hh.

◆ m_nbEvents

int64_t vDataFile::m_nbEvents
protected

Total number of events in the raw data

Definition at line 556 of file code/include/datafile/vDataFile.hh.

◆ m_POIInfoFlag

bool vDataFile::m_POIInfoFlag
protected

Flag to say if POI information is included in the datafile for each event

Definition at line 569 of file code/include/datafile/vDataFile.hh.

◆ m_relativeBedPosition

FLTNB vDataFile::m_relativeBedPosition
protected

Bed relative position in mm

Definition at line 564 of file code/include/datafile/vDataFile.hh.

◆ m_scannerName

string vDataFile::m_scannerName
protected

Scanner name

Definition at line 566 of file code/include/datafile/vDataFile.hh.

◆ m_sizeEvent

int64_t vDataFile::m_sizeEvent
protected

Size of an event in the datafile (calculated from mandatory and optional fields)

Definition at line 575 of file code/include/datafile/vDataFile.hh.

◆ m_startTimeInSec

FLTNB vDataFile::m_startTimeInSec
protected

Start time of the acquisition (s)

Definition at line 560 of file code/include/datafile/vDataFile.hh.

◆ m_verbose

int vDataFile::m_verbose
protected

Verbosity

Definition at line 551 of file code/include/datafile/vDataFile.hh.

◆ mp_additionalDataSize

INTNB* vDataFile::mp_additionalDataSize
protected

The size of each additional data matrix (can differ in PET whether the data are for each TOF bin or not

Definition at line 623 of file include/datafile/vDataFile.hh.

◆ mp_ID

oImageDimensionsAndQuantification * vDataFile::mp_ID
protected

Pointer to the oImageDimensionsAndQuantification object

Definition at line 550 of file code/include/datafile/vDataFile.hh.

◆ mp_MappedFile

oMemoryMapped * vDataFile::mp_MappedFile
protected

The object managing the mapping of the datafile

Definition at line 581 of file code/include/datafile/vDataFile.hh.

◆ mp_mappedMemory

char * vDataFile::mp_mappedMemory
protected

The raw pointer directly mapped to the datafile

Definition at line 582 of file code/include/datafile/vDataFile.hh.

◆ mp_POIDirectionFlag

bool vDataFile::mp_POIDirectionFlag
protected

Flag to say which direction is included in the POI for each event; radial, tangential and axial

Definition at line 571 of file code/include/datafile/vDataFile.hh.

◆ mp_POIResolution

FLTNB vDataFile::mp_POIResolution
protected

POI resolution (position of interaction) for each direction: radial, tangential and axial

Definition at line 572 of file code/include/datafile/vDataFile.hh.


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