CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions | 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)
 Read and check general information from the header datafile
Call the ReadSpecificInformationInHeader() function implemented in child classes. More...
 
int CheckParameters ()
 Check the initialization of member variables
Call the CheckSpecificParameters() function implemented in child classes. More...
 
int InitializeFile ()
 Instantiate the fstream objets for input reading and check if the related datafile's existence and consistency.
Also init the char* buffers for event read directly from files. 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...
 
void ResetBufferRange ()
 Simply set the m_1stIdxArrayEvents and m_lastIdxArrayEvents to -1 only if the percentage load is strictly between 0 and 100. More...
 
int FillBuffer (int64_t a_eventIndex)
 Fill 'mp_arrayEvents' from the 'a_eventIndex' position in the data file.
The filling process stops after 'm_sizeArrayEvents' new events have been added, or if we reach the last event of the datafile. More...
 
vEventGetEventWithAscendingOrderAssumption (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 directly from datafile. More...
 
vEventGetEventWithoutOrderAssumption (int64_t a_eventIndex, int a_th)
 According to the current part of the datafile loaded in memory, either read from this buffer or directly from datafile. More...
 
vEventGetEventFromFile (int64_t a_eventIndex, int a_th)
 Return the a_eventIndex event from the datafile. More...
 
virtual vEventGetEventFromBuffer (char *ap_buffer, int a_th)=0
 This function is implemented in child classes
Read an event from the position pointed by 'ap_buffer', parse the generic or modality-specific information, and store them in the (multithreaded) 'm2p_BufferEvent' object. More...
 
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 and rank. More...
 
int CheckConsistencyWithAnotherBedDatafile (vDataFile *ap_Datafile)
 Check consistency between 'this' and the provided datafile as two bed positions. 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...
 
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. More...
 
virtual int PROJ_WriteHeader ()=0
 This function is implemented in child classes.
Generate a header file according to the projection and data output informations. 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)
 Generate a standard event and set up its ID
Used by the projection, list-mode sensitivity generation, and datafile converter scripts. More...
 
int GetBedIndex ()
 
int GetDataMode ()
 
int GetDataType ()
 
int64_t GetSize ()
 
int64_t GetEventSize ()
 
string GetHeaderDataFileName ()
 
string GetDataFileName ()
 
int64_t GetStartTime ()
 
int64_t GetDuration ()
 
FLTNB GetCalibrationFactor ()
 
FLTNBGetPOIResolution ()
 
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)
 set the data mode More...
 
void SetDataType (int a_dataType)
 set the data type More...
 
void SetBedIndex (int a_bedIndex)
 set the bed index corresponding to this data file More...
 
void SetPercentageLoad (int a_percentageLoad)
 Set the percentage of the data file that will be loaded in memory. More...
 
int GetPercentageLoad ()
 Get the percentage of the data file that will be loaded in memory. More...
 
void SetVerbose (int a_verboseLevel)
 set verbosity More...
 
int GetVerbose ()
 Get the verbose level. More...
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 set the pointer to the oImageDimensionsAndQuantification object More...
 
void SetPOIResolution (FLTNB ap_value[3])
 initialize the POI resolution (for list-mode) More...
 
void SetIgnorePOIFlag (bool a_ignorePOIFlag)
 Set a boolean that that if we ignore POI information or not. More...
 
void SetHeaderDataFileName (const string &a_headerFileName)
 set the data header file name More...
 
void SetCalibrationFactor (FLTNB a_value)
 initialize the global calibration factor with a FLTNB value More...
 
void SetNbEvents (int64_t a_value)
 initialize the number of events with a int64_t value More...
 
void SetStartTime (FLTNB a_value)
 
void SetDuration (FLTNB a_value)
 
string GetScannerName ()
 

Protected Attributes

oImageDimensionsAndQuantificationmp_ID
 
int m_verbose
 
fstream ** m2p_dataFile
 
string m_headerFileName
 
string m_dataFileName
 
int64_t m_totalNbEvents
 
int m_dataMode
 
int m_dataType
 
FLTNB m_startTimeInSec
 
FLTNB m_durationInSec
 
FLTNB m_calibrationFactor
 
int m_bedIndex
 
int64_t m_sizeEvent
 
string m_scannerName
 
bool m_POIInfoFlag
 
bool m_ignorePOIFlag
 
bool mp_POIDirectionFlag [3]
 
FLTNB mp_POIResolution [3]
 
vEvent ** m2p_BufferEvent
 
char * mp_arrayEvents
 
char ** m2p_bufferEventFromFile
 
int64_t m_mpi1stEvent
 
int64_t m_mpiLastEvent
 
int64_t m_mpiNbEvents
 
int64_t m_1stIdxArrayEvents
 
int64_t m_lastIdxArrayEvents
 
int64_t m_sizeArrayEvents
 
int m_percentageLoad
 
bool m_requestBufferFilling
 
bool m_currentlyFillingBuffer
 
bool * mp_currentlyReadingBuffer
 
bool * mp_overBufferRange
 
int64_t * mp_nbEventsReadFromFile
 

Private Member Functions

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
 This function is implemented in child classes
Read and check modality-specific information from the header datafile. More...
 
virtual int CheckSpecificConsistencyWithAnotherDatafile (vDataFile *ap_Datafile)=0
 Check consistency between 'this' and the provided datafile, for specific characteristics. More...
 
virtual int Shuffle (int64_t)
 

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 67 of file vDataFile.hh.

Constructor & Destructor Documentation

vDataFile::vDataFile ( )

vDataFile constructor.

Initialize the member variables to their default values.

Definition at line 26 of file vDataFile.cc.

vDataFile::~vDataFile ( )
virtual

vDataFile destructor.

Definition at line 79 of file vDataFile.cc.

Here is the call graph for this function:

Member Function Documentation

int vDataFile::CheckConsistencyWithAnotherBedDatafile ( vDataFile ap_Datafile)

Check consistency between 'this' and the provided datafile as two bed positions.

Parameters
vDataFile*ap_Datafile

It checks data type, mode, number of events if histogram, event size, calibration factor, and scanner. For characteristics specific to the modality, it finally calls the pure virtual CheckSpecificConsistyWithAnotherBedDatafile() function implemented by children.

Returns
0 if the provided datafile is consistent with 'this', another value otherwise

Definition at line 339 of file vDataFile.cc.

Here is the call graph for this function:

virtual int vDataFile::CheckFileSizeConsistency ( )
privatepure virtual

Implemented in iDataFilePET, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

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 269 of file vDataFile.cc.

Here is the call graph for this function:

vDataFile::CheckSpecificConsistencyWithAnotherDatafile ( vDataFile ap_Datafile)
privatepure virtual

Check consistency between 'this' and the provided datafile, for specific characteristics.

Parameters
vDataFile*ap_Datafile

Pure virtual function implemented by children. It checks correction flags, etc.

Returns
0 if the provided datafile is consistent with 'this', another value otherwise

Implemented in iDataFilePET, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

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, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

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 iDataFileSPECT, iDataFilePET, and iDataFileTransmission.

Here is the caller graph for this function:

int vDataFile::FillBuffer ( int64_t  a_eventIndex)

Fill 'mp_arrayEvents' from the 'a_eventIndex' position in the data file.
The filling process stops after 'm_sizeArrayEvents' new events have been added, or if we reach the last event of the datafile.

Parameters
a_eventIndex: long int containing a position index in the data file, from which events should be loaded in the buffer
Returns
Positive value if the reading failed, 0 otherwise

Definition at line 513 of file vDataFile.cc.

Here is the caller graph for this function:

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

Definition at line 274 of file vDataFile.hh.

FLTNB vDataFile::GetCalibrationFactor ( )
inline
Returns
calibration factor

Definition at line 327 of file vDataFile.hh.

Here is the caller graph for this function:

string vDataFile::GetDataFileName ( )
inline
Returns
datafile name

Definition at line 309 of file vDataFile.hh.

int vDataFile::GetDataMode ( )
inline
Returns
data mode

Definition at line 280 of file vDataFile.hh.

Here is the caller graph for this function:

int vDataFile::GetDataType ( )
inline
Returns
data type

Definition at line 286 of file vDataFile.hh.

Here is the caller graph for this function:

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

Definition at line 321 of file vDataFile.hh.

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

This function is implemented in child classes
Read an event from the position pointed by 'ap_buffer', parse the generic or modality-specific information, and store them in the (multithreaded) 'm2p_BufferEvent' object.

Parameters
ap_buffer: address pointing to the event to recover in the event buffer array
a_th: index of the thread from which the function was called
Returns
the thread-specific 'm2p_BufferEvent' object containing the modality-specific information for the event

Implemented in iDataFileSPECT, iDataFilePET, and iDataFileTransmission.

Here is the caller graph for this function:

vEvent * vDataFile::GetEventFromFile ( int64_t  a_eventIndex,
int  a_th 
)

Return the a_eventIndex event from the datafile.

Parameters
a_eventIndex: index of the event to recover
a_th: index of the thread from which the function was called
Returns
the m2p_BufferEvent element of the the 'a_th' thread, or NULL is something went wrong

Definition at line 849 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void vDataFile::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 and rank.

Parameters
ap_indexStart: pointer to recover the index of the first event
ap_indexStop: pointer to recover the index of the last event
a_subsetNum: actual subset index of the iteration (0 if no subsets)
a_nbSubsets: max number of subsets in this iteration (1 if no subsets)

Definition at line 873 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t vDataFile::GetEventSize ( )
inline

Definition at line 298 of file vDataFile.hh.

Here is the caller graph for this function:

vEvent * vDataFile::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 directly from datafile.

Parameters
a_eventIndex: index of the event to recover
a_eventIndexLimit: index over which we consider the thread will soon finish
a_th: index of the thread from which the function was called

This function can be used only inside a loop on events in the ascending order, because it uses this assumption to increase efficiency. Only the thread 0 manages the buffer, if out-of-range, it waits for all other threads to be 'after' this current buffer range to fill the next part. These parts of datafiles are computed based on the provided m_percentageLoad. The file is loaded into the mp_arrayEvents. See the implementation of this function for more detailed information in the comment sections.

Returns
the m2p_BufferEvent element of the the 'a_th' thread, or NULL if something went wrong

Definition at line 609 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

vEvent * vDataFile::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 directly from datafile.

Parameters
a_eventIndex: index of the event to recover
a_th: index of the thread from which the function was called

This function can be used inside a loop on events without any assumption on the order. Only the thread 0 manages the buffer, if out-of-range, it requests to fill the buffer and waits for all other threads to stop reading from the buffer. Once done, it fills the buffer, the file being loaded into the mp_arrayEvents. These parts of datafiles are computed based on the provided m_percentageLoad. With this function, it is possible that the thread 0 is ahead of others threads so in an ascending order, these other threads will be late and always read from file. If this function is used inside a loop on events in the ascending order, then please use the GetEventWithAscendingOrderAssumption() function.

Returns
the m2p_BufferEvent element of the the 'a_th' thread, or NULL if something went wrong

Definition at line 734 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

string vDataFile::GetHeaderDataFileName ( )
inline
Returns
headerdatafile name

Definition at line 303 of file vDataFile.hh.

bool vDataFile::GetIgnorePOIFlag ( )
inline
Returns
m_ignorePOIFlag

Definition at line 345 of file vDataFile.hh.

Here is the caller graph for this function:

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

Reimplemented in iDataFilePET.

Definition at line 906 of file vDataFile.cc.

int vDataFile::GetPercentageLoad ( )
inline

Get the percentage of the data file that will be loaded in memory.

Returns
m_percentageLoad

Definition at line 387 of file vDataFile.hh.

bool vDataFile::GetPOIInfoFlag ( )
inline
Returns
m_POIInfoFlag

Definition at line 339 of file vDataFile.hh.

Here is the caller graph for this function:

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

Definition at line 333 of file vDataFile.hh.

Here is the caller graph for this function:

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

Definition at line 469 of file vDataFile.hh.

Here is the caller graph for this function:

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

Definition at line 292 of file vDataFile.hh.

Here is the caller graph for this function:

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

Definition at line 315 of file vDataFile.hh.

int vDataFile::GetVerbose ( )
inline

Get the verbose level.

Returns
m_verbose

Definition at line 401 of file vDataFile.hh.

int vDataFile::InitializeFile ( )

Instantiate the fstream objets for input reading and check if the related datafile's existence and consistency.
Also init the char* buffers for event read directly from files.

Returns
0 if success, and positive value otherwise.

Definition at line 412 of file vDataFile.cc.

Here is the call graph for this function:

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 iDataFileSPECT, iDataFilePET, and iDataFileTransmission.

Here is the caller graph for this function:

int vDataFile::PROJ_DeleteTmpDatafile ( )

Delete temporary datafile used for multithreaded output writing if needed.

Definition at line 1008 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

vEvent * vDataFile::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 generation, and datafile converter scripts.

Parameters
idx_elt1: first ID of the event
idx_elt2: second ID of the event
a_th: index of the thread from which the function was called
Returns
the thread specific m2p_BufferEvent array containing the event

Definition at line 1056 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

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, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

int vDataFile::PROJ_WriteData ( )

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

Definition at line 928 of file vDataFile.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

vDataFile::PROJ_WriteEvent ( vEvent ap_Event,
int  a_th 
)
pure virtual

This function is implemented in child classes
Write event according to the chosen type of data.

Parameters
ap_Event: Event to write
a_th: index of the thread from which the function was called
Returns
0 if success, and positive value otherwise.

Implemented in iDataFilePET, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

vDataFile::PROJ_WriteHeader ( )
pure virtual

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

Returns
0 if success, and positive value otherwise.

Implemented in iDataFilePET, iDataFileSPECT, and iDataFileTransmission.

Here is the caller graph for this function:

int vDataFile::ReadInfoInHeader ( bool  a_affectQuantificationFlag = true)

Read and check general information from the header datafile
Call the ReadSpecificInformationInHeader() function implemented in child classes.

Parameters
boola_affectQuantificationFlag = true

If the parameter flag is on, then affect the quantification factors from the oImageDimensionsAndQuantification after reading relevant information

Returns
0 if success, and positive value otherwise.

Definition at line 134 of file vDataFile.cc.

Here is the call graph for this function:

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

This function is implemented in child classes
Read and check modality-specific information from the header datafile.

Parameters
boola_affectQuantificationFlag = true

If the parameter flag is on, then affect the quantification factors from the oImageDimensionsAndQuantification after reading relevant information

Returns
0 if success, and positive value otherwise.

Implemented in iDataFileSPECT, iDataFilePET, and iDataFileTransmission.

Here is the caller graph for this function:

void vDataFile::ResetBufferRange ( )

Simply set the m_1stIdxArrayEvents and m_lastIdxArrayEvents to -1 only if the percentage load is strictly between 0 and 100.

The purpose of this function is to be called at before a loop over the datafile so that any thread will have an event index always inside or above the buffer range when the GetEventWithAscendingOrderAssumption() is used to get events.

Definition at line 491 of file vDataFile.cc.

Here is the caller graph for this function:

void vDataFile::SetBedIndex ( int  a_bedIndex)
inline

set the bed index corresponding to this data file

Parameters
a_bedIndex

Definition at line 373 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetCalibrationFactor ( FLTNB  a_value)
inline

initialize the global calibration factor with a FLTNB value

Parameters
a_value

This function is dedicated to datafile conversion scripts

Definition at line 439 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetDataMode ( int  a_dataMode)
inline

set the data mode

Parameters
a_dataMode

Definition at line 359 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetDataType ( int  a_dataType)
inline

set the data type

Parameters
a_dataType

Definition at line 366 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetDuration ( FLTNB  a_value)
inline

Definition at line 463 of file vDataFile.hh.

Here is the caller graph for this function:

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

set the data header file name

Parameters
conststring& a_headerFileName

This function is dedicated to datafile conversion scripts

Definition at line 431 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetIgnorePOIFlag ( bool  a_ignorePOIFlag)
inline

Set a boolean that that if we ignore POI information or not.

Parameters
a_flag

Definition at line 423 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

set the pointer to the oImageDimensionsAndQuantification object

Parameters
ap_ImageDimensionsAndQuantification

Definition at line 408 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetNbEvents ( int64_t  a_value)
inline

initialize the number of events with a int64_t value

Parameters
a_value

This function is dedicated to datafile conversion scripts

Definition at line 447 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetPercentageLoad ( int  a_percentageLoad)
inline

Set the percentage of the data file that will be loaded in memory.

Parameters
a_percentageLoad

Definition at line 380 of file vDataFile.hh.

Here is the caller graph for this function:

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

initialize the POI resolution (for list-mode)

Parameters
ap_value: vector of 3 elements (x,y,z)

This function is dedicated to datafile conversion scripts

Definition at line 416 of file vDataFile.hh.

void vDataFile::SetStartTime ( FLTNB  a_value)
inline

Definition at line 455 of file vDataFile.hh.

Here is the caller graph for this function:

void vDataFile::SetVerbose ( int  a_verboseLevel)
inline

set verbosity

Parameters
a_verboseLevel

Definition at line 394 of file vDataFile.hh.

Here is the caller graph for this function:

int vDataFile::Shuffle ( int64_t  nb_events_to_load)
privatevirtual

Definition at line 568 of file vDataFile.cc.

Member Data Documentation

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 538 of file vDataFile.hh.

char** vDataFile::m2p_bufferEventFromFile
protected

Buffer used to recover one event from the datafile (multithreaded)

Definition at line 540 of file vDataFile.hh.

fstream** vDataFile::m2p_dataFile
protected

File associated to the raw data file (multithreaded)

Definition at line 518 of file vDataFile.hh.

int64_t vDataFile::m_1stIdxArrayEvents
protected

Index of the first event contained in the 'mp_arrayEvents' buffer

Definition at line 544 of file vDataFile.hh.

int vDataFile::m_bedIndex
protected

Bed position index corresponding to this data file

Definition at line 527 of file vDataFile.hh.

FLTNB vDataFile::m_calibrationFactor
protected

Calibration factor for the data. Default value =1.0

Definition at line 526 of file vDataFile.hh.

bool vDataFile::m_currentlyFillingBuffer
protected

File buffer is being filled by the first thread

Definition at line 549 of file vDataFile.hh.

string vDataFile::m_dataFileName
protected

String containing the path to the raw datafile

Definition at line 520 of file vDataFile.hh.

int vDataFile::m_dataMode
protected

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

Definition at line 522 of file vDataFile.hh.

int vDataFile::m_dataType
protected

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

Definition at line 523 of file vDataFile.hh.

FLTNB vDataFile::m_durationInSec
protected

Duration of the acquisition (s)

Definition at line 525 of file vDataFile.hh.

string vDataFile::m_headerFileName
protected

String containing the path to the header file

Definition at line 519 of file vDataFile.hh.

bool vDataFile::m_ignorePOIFlag
protected

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

Definition at line 533 of file vDataFile.hh.

int64_t vDataFile::m_lastIdxArrayEvents
protected

Index of the last event contained in the 'mp_arrayEvents' buffer

Definition at line 545 of file vDataFile.hh.

int64_t vDataFile::m_mpi1stEvent
protected

First index managed by this MPI instance

Definition at line 541 of file vDataFile.hh.

int64_t vDataFile::m_mpiLastEvent
protected

Last index (included) managed by this MPI instance

Definition at line 542 of file vDataFile.hh.

int64_t vDataFile::m_mpiNbEvents
protected

Number of events managed by this MPI instance

Definition at line 543 of file vDataFile.hh.

int vDataFile::m_percentageLoad
protected

Percentage of the data file that is loaded

Definition at line 547 of file vDataFile.hh.

bool vDataFile::m_POIInfoFlag
protected

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

Definition at line 532 of file vDataFile.hh.

bool vDataFile::m_requestBufferFilling
protected

The first thread is requesting and waiting to fill the buffer

Definition at line 548 of file vDataFile.hh.

string vDataFile::m_scannerName
protected

Scanner name

Definition at line 529 of file vDataFile.hh.

int64_t vDataFile::m_sizeArrayEvents
protected

Size of the 'mp_arrayEvents' buffer

Definition at line 546 of file vDataFile.hh.

int64_t vDataFile::m_sizeEvent
protected

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

Definition at line 528 of file vDataFile.hh.

FLTNB vDataFile::m_startTimeInSec
protected

Start time of the acquisition (s)

Definition at line 524 of file vDataFile.hh.

int64_t vDataFile::m_totalNbEvents
protected

Total number of events in the raw data

Definition at line 521 of file vDataFile.hh.

int vDataFile::m_verbose
protected

Verbosity

Definition at line 515 of file vDataFile.hh.

char* vDataFile::mp_arrayEvents
protected

Buffer used to store parts of, or the entire, raw data file. Its size depends of 'm_sizeArrayEvents'

Definition at line 539 of file vDataFile.hh.

bool* vDataFile::mp_currentlyReadingBuffer
protected

One bool per thread (except first thread), saying that the thread is currently reading from the file buffer

Definition at line 550 of file vDataFile.hh.

oImageDimensionsAndQuantification* vDataFile::mp_ID
protected

Pointer to the oImageDimensionsAndQuantification object

Definition at line 514 of file vDataFile.hh.

int64_t* vDataFile::mp_nbEventsReadFromFile
protected

Counters of how many events were read directly from file, one for each thread

Definition at line 552 of file vDataFile.hh.

bool* vDataFile::mp_overBufferRange
protected

One bool per thread (except first thread), saying that the thread is currently under the buffer range or not

Definition at line 551 of file vDataFile.hh.

bool vDataFile::mp_POIDirectionFlag[3]
protected

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

Definition at line 534 of file vDataFile.hh.

FLTNB vDataFile::mp_POIResolution[3]
protected

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

Definition at line 535 of file vDataFile.hh.


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