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

Inherit from vDataFile. Class that manages the reading of a SPECT input file (header + data). More...

#include <iDataFileSPECT.hh>

Inheritance diagram for iDataFileSPECT:
Inheritance graph
Collaboration diagram for iDataFileSPECT:
Collaboration graph

Public Member Functions

 iDataFileSPECT ()
 iDataFileSPECT constructor. Initialize the member variables to their default values. More...
 
 ~iDataFileSPECT ()
 iDataFileSPECT destructor. More...
 
int ReadSpecificInfoInHeader (bool a_affectQuantificationFlag)
 
int WriteHeader ()
 Generate a header file according to the data output information. More...
 
int ComputeSizeEvent ()
 Computation of the size of each event according to the mandatory/optional correction fields. More...
 
int PrepareDataFile ()
 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 WriteEvent (vEvent *ap_Event, int a_th=0)
 
vEventGetEventSpecific (char *ap_buffer, int a_th)
 
int InitAngles (FLTNB *ap_angles)
 
int InitCorToDetectorDistance (FLTNB *ap_CORtoDetectorDistance)
 
void DescribeSpecific ()
 Implementation of the pure virtual eponym function that simply prints info about the datafile. More...
 
int PROJ_InitFile ()
 Initialize the fstream objets for output writing as well as some other variables specific to the Projection script (Event-based correction flags, Estimated size of data file) More...
 
int PROJ_GetScannerSpecificParameters ()
 Get SPECT specific parameters for projections from the scanner object, through the scannerManager. More...
 
uint16_t GetNbHeads ()
 
uint16_t GetNbProjections ()
 
FLTNBGetAngles ()
 
FLTNBGetCORtoDetectorDistance ()
 
uint16_t GetNbBins (int axis)
 
void SetEventKindFlagOn ()
 set to true the flag indicating the presence of the kind of a list-mode event in the datafile More...
 
void SetScatterCorrectionFlagOn ()
 set to true the flag indicating the presence of scatter correction factors in the datafile More...
 
void SetIsotope (string a_value)
 
string GetIsotope ()
 
void SetNbBins (uint16_t a_binTrs, uint16_t a_binAxl)
 initialize the bin values More...
 
void SetNbProjections (uint16_t a_nbProjections)
 initialize the number of projections More...
 
void SetNbHeads (uint16_t a_nbHeads)
 initialize the number of cameras More...
 
int GetHeadRotDirection ()
 Simply return m_headRotDirection. More...
 
void SetHeadRotDirection (int a_direction)
 
bool GetEventKindFlag ()
 Simply return m_eventKindFlag. More...
 
bool GetScatCorrectionFlag ()
 Simply return m_scatCorrectionFlag. More...
 
bool GetNormCorrectionFlag ()
 Simply return m_normCorrectionFlag. More...
 
 iDataFileSPECT ()
 iDataFileSPECT constructor. Initialize the member variables to their default values. More...
 
 ~iDataFileSPECT ()
 iDataFileSPECT destructor. More...
 
int ReadSpecificInfoInHeader (bool a_affectQuantificationFlag)
 
int WriteHeader ()
 This function is implemented in child classes.
Generate a header file according to the data output information. More...
 
int ComputeSizeEvent ()
 This function is implemented in child classes
Computation of the size of each event according to the mandatory/optional correction fields. More...
 
int PrepareDataFile ()
 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 WriteEvent (vEvent *ap_Event, int a_th=0)
 
vEventGetEventSpecific (char *ap_buffer, int a_th)
 
int InitAngles (FLTNB *ap_angles)
 
int InitCorToDetectorDistance (FLTNB *ap_CORtoDetectorDistance)
 
void DescribeSpecific ()
 A pure virtual function used to describe the specific parts of the datafile. More...
 
int PROJ_InitFile ()
 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...
 
int PROJ_GetScannerSpecificParameters ()
 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...
 
uint16_t GetNbHeads ()
 
uint16_t GetNbProjections ()
 
FLTNBGetAngles ()
 
FLTNBGetCORtoDetectorDistance ()
 
uint16_t GetNbBins (int axis)
 
void SetEventKindFlagOn ()
 
void SetScatterCorrectionFlagOn ()
 
void SetIsotope (string a_value)
 
string GetIsotope ()
 
void SetNbBins (uint16_t a_binTrs, uint16_t a_binAxl)
 
void SetNbProjections (uint16_t a_nbProjections)
 
void SetNbHeads (uint16_t a_nbHeads)
 
int GetHeadRotDirection ()
 
void SetHeadRotDirection (int a_direction)
 
bool GetEventKindFlag ()
 
bool GetScatCorrectionFlag ()
 
bool GetNormCorrectionFlag ()
 
- Public Member Functions inherited from vDataFile
 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...
 
int OpenFileForWriting (string a_suffix="")
 
int CloseFile ()
 Close as many binary file stream for writing. More...
 
vEventGetEvent (int64_t a_eventIndex, 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...
 
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...
 
int OpenFileForWriting (string a_suffix="")
 
int CloseFile ()
 
vEventGetEvent (int64_t a_eventIndex, 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 ()
 
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)
 

Private Member Functions

int SetSpecificParametersFrom (vDataFile *ap_DataFile)
 
int CheckSpecificParameters ()
 Check parameters specific to SPECT data. More...
 
int CheckFileSizeConsistency ()
 This function is implemented in child classes
Check if file size is consistent. More...
 
int WriteHistoEvent (iEventHistoSPECT *ap_Event, int a_th)
 
int WriteListEvent (iEventListSPECT *ap_Event, int a_th)
 
int CheckSpecificConsistencyWithAnotherDataFile (vDataFile *ap_DataFile)
 
int SetSpecificParametersFrom (vDataFile *ap_DataFile)
 
int CheckSpecificParameters ()
 This function is implemented in child classes
Check specific parameters of child classes. More...
 
int CheckFileSizeConsistency ()
 
int WriteHistoEvent (iEventHistoSPECT *ap_Event, int a_th)
 
int WriteListEvent (iEventListSPECT *ap_Event, int a_th)
 
int CheckSpecificConsistencyWithAnotherDataFile (vDataFile *ap_DataFile)
 

Private Attributes

string m_isotope
 
bool m_eventKindFlag
 
bool m_normCorrectionFlag
 
bool m_ignoreNormCorrectionFlag
 
bool m_scatCorrectionFlag
 
bool m_ignoreScatCorrectionFlag
 
uint16_t mp_nbOfBins [2]
 
FLTNB m_acquisitionZoom
 
uint16_t m_nbOfProjections
 
FLTNBmp_angles
 
uint16_t m_nbHeads
 
FLTNBmp_CORtoDetectorDistance
 
int m_headRotDirection
 

Additional Inherited Members

- Public Attributes inherited from vDataFile
FLTNB ** m2p_additionalData
 
- Protected Attributes inherited from vDataFile
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
 

Detailed Description

Inherit from vDataFile. Class that manages the reading of a SPECT input file (header + data).

It contains several arrays corresponding to the different kind of informations the data file could contain.
As many booleans as arrays say if the data are here or not. The data file can be either completely loaded, or read event by event during reconstruction.
MPI is coming here to cut the data file into peaces (also either can be loaded or read on-the-fly).

Definition at line 24 of file code/include/datafile/iDataFileSPECT.hh.

Constructor & Destructor Documentation

◆ iDataFileSPECT() [1/2]

iDataFileSPECT::iDataFileSPECT ( )

iDataFileSPECT constructor. Initialize the member variables to their default values.

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

◆ ~iDataFileSPECT() [1/2]

iDataFileSPECT::~iDataFileSPECT ( )

iDataFileSPECT destructor.

Definition at line 42 of file code/src/datafile/iDataFileSPECT.cc.

◆ iDataFileSPECT() [2/2]

iDataFileSPECT::iDataFileSPECT ( )

iDataFileSPECT constructor. Initialize the member variables to their default values.

◆ ~iDataFileSPECT() [2/2]

iDataFileSPECT::~iDataFileSPECT ( )

iDataFileSPECT destructor.

Member Function Documentation

◆ CheckFileSizeConsistency() [1/2]

int iDataFileSPECT::CheckFileSizeConsistency ( )
privatevirtual

This function is implemented in child classes
Check if file size is consistent.

Returns
0 if success, and positive value otherwise.

Implements vDataFile.

Definition at line 430 of file code/src/datafile/iDataFileSPECT.cc.

Here is the caller graph for this function:

◆ CheckFileSizeConsistency() [2/2]

int iDataFileSPECT::CheckFileSizeConsistency ( )
privatevirtual

Implements vDataFile.

◆ CheckSpecificConsistencyWithAnotherDataFile() [1/2]

int iDataFileSPECT::CheckSpecificConsistencyWithAnotherDataFile ( vDataFile ap_DataFile)
privatevirtual

Implements vDataFile.

Definition at line 483 of file code/src/datafile/iDataFileSPECT.cc.

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

◆ CheckSpecificConsistencyWithAnotherDataFile() [2/2]

int iDataFileSPECT::CheckSpecificConsistencyWithAnotherDataFile ( vDataFile ap_DataFile)
privatevirtual

Implements vDataFile.

◆ CheckSpecificParameters() [1/2]

int iDataFileSPECT::CheckSpecificParameters ( )
privatevirtual

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

Returns
0 if success, and positive value otherwise.

Implements vDataFile.

◆ CheckSpecificParameters() [2/2]

int iDataFileSPECT::CheckSpecificParameters ( )
privatevirtual

Check parameters specific to SPECT data.

Returns
0 if success, and positive value otherwise.

Implements vDataFile.

Definition at line 400 of file code/src/datafile/iDataFileSPECT.cc.

Here is the caller graph for this function:

◆ ComputeSizeEvent() [1/2]

int iDataFileSPECT::ComputeSizeEvent ( )
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

Implements vDataFile.

◆ ComputeSizeEvent() [2/2]

int iDataFileSPECT::ComputeSizeEvent ( )
virtual

Computation of the size of each event according to the mandatory/optional correction fields.

Returns
0 is success, positive value otherwise

Implements vDataFile.

Definition at line 150 of file code/src/datafile/iDataFileSPECT.cc.

◆ DescribeSpecific() [1/2]

void iDataFileSPECT::DescribeSpecific ( )
virtual

Implementation of the pure virtual eponym function that simply prints info about the datafile.

Implements vDataFile.

Definition at line 373 of file code/src/datafile/iDataFileSPECT.cc.

◆ DescribeSpecific() [2/2]

void iDataFileSPECT::DescribeSpecific ( )
virtual

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

Implements vDataFile.

◆ GetAngles() [1/2]

FLTNB* iDataFileSPECT::GetAngles ( )
inline

Definition at line 144 of file include/datafile/iDataFileSPECT.hh.

◆ GetAngles() [2/2]

iDataFileSPECT::GetAngles ( )
inline
Returns
pointers to angles of projections

Definition at line 144 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetCORtoDetectorDistance() [1/2]

FLTNB* iDataFileSPECT::GetCORtoDetectorDistance ( )
inline

Definition at line 150 of file include/datafile/iDataFileSPECT.hh.

◆ GetCORtoDetectorDistance() [2/2]

iDataFileSPECT::GetCORtoDetectorDistance ( )
inline
Returns
pointers to the COR to detector distances for each projection

Definition at line 150 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetEventKindFlag() [1/2]

iDataFileSPECT::GetEventKindFlag ( )
inline

Simply return m_eventKindFlag.

Returns
m_eventKindFlag

Definition at line 229 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetEventKindFlag() [2/2]

bool iDataFileSPECT::GetEventKindFlag ( )
inline

Definition at line 229 of file include/datafile/iDataFileSPECT.hh.

◆ GetEventSpecific() [1/2]

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

Implements vDataFile.

Definition at line 283 of file code/src/datafile/iDataFileSPECT.cc.

Here is the call graph for this function:

◆ GetEventSpecific() [2/2]

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

Implements vDataFile.

◆ GetHeadRotDirection() [1/2]

iDataFileSPECT::GetHeadRotDirection ( )
inline

Simply return m_headRotDirection.

Returns
m_headRotDirection

Definition at line 215 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetHeadRotDirection() [2/2]

int iDataFileSPECT::GetHeadRotDirection ( )
inline

Definition at line 215 of file include/datafile/iDataFileSPECT.hh.

◆ GetIsotope() [1/2]

iDataFileSPECT::GetIsotope ( )
inline
Returns
the isotope string value

Definition at line 186 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetIsotope() [2/2]

string iDataFileSPECT::GetIsotope ( )
inline

Definition at line 186 of file include/datafile/iDataFileSPECT.hh.

◆ GetNbBins() [1/2]

uint16_t iDataFileSPECT::GetNbBins ( int  axis)
inline

Definition at line 157 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetNbBins() [2/2]

uint16_t iDataFileSPECT::GetNbBins ( int  axis)
inline

Definition at line 157 of file include/datafile/iDataFileSPECT.hh.

◆ GetNbHeads() [1/2]

uint16_t iDataFileSPECT::GetNbHeads ( )
inline

Definition at line 132 of file include/datafile/iDataFileSPECT.hh.

◆ GetNbHeads() [2/2]

iDataFileSPECT::GetNbHeads ( )
inline
Returns
the number of heads

Definition at line 132 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetNbProjections() [1/2]

uint16_t iDataFileSPECT::GetNbProjections ( )
inline

Definition at line 138 of file include/datafile/iDataFileSPECT.hh.

◆ GetNbProjections() [2/2]

iDataFileSPECT::GetNbProjections ( )
inline
Returns
total number of projections in the SPECT acquisition

Definition at line 138 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ GetNormCorrectionFlag() [1/2]

iDataFileSPECT::GetNormCorrectionFlag ( )
inline

Simply return m_normCorrectionFlag.

Returns
m_normCorrectionFlag

Definition at line 243 of file code/include/datafile/iDataFileSPECT.hh.

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

◆ GetNormCorrectionFlag() [2/2]

bool iDataFileSPECT::GetNormCorrectionFlag ( )
inline

Definition at line 243 of file include/datafile/iDataFileSPECT.hh.

Here is the call graph for this function:

◆ GetScatCorrectionFlag() [1/2]

bool iDataFileSPECT::GetScatCorrectionFlag ( )
inline

Definition at line 236 of file include/datafile/iDataFileSPECT.hh.

◆ GetScatCorrectionFlag() [2/2]

iDataFileSPECT::GetScatCorrectionFlag ( )
inline

Simply return m_scatCorrectionFlag.

Returns
m_scatCorrectionFlag

Definition at line 236 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ InitAngles() [1/2]

int iDataFileSPECT::InitAngles ( FLTNB ap_angles)

◆ InitAngles() [2/2]

int iDataFileSPECT::InitAngles ( FLTNB ap_angles)

Definition at line 527 of file code/src/datafile/iDataFileSPECT.cc.

◆ InitCorToDetectorDistance() [1/2]

int iDataFileSPECT::InitCorToDetectorDistance ( FLTNB ap_CORtoDetectorDistance)

Definition at line 549 of file code/src/datafile/iDataFileSPECT.cc.

◆ InitCorToDetectorDistance() [2/2]

int iDataFileSPECT::InitCorToDetectorDistance ( FLTNB ap_CORtoDetectorDistance)

◆ PrepareDataFile() [1/2]

int iDataFileSPECT::PrepareDataFile ( )
virtual

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

Implements vDataFile.

Definition at line 205 of file code/src/datafile/iDataFileSPECT.cc.

Here is the call graph for this function:

◆ PrepareDataFile() [2/2]

int iDataFileSPECT::PrepareDataFile ( )
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

Implements vDataFile.

◆ PROJ_GetScannerSpecificParameters() [1/2]

int iDataFileSPECT::PROJ_GetScannerSpecificParameters ( )
virtual

Get SPECT specific parameters for projections from the scanner object, through the scannerManager.

Returns
0 if success, positive value otherwise

Implements vDataFile.

Definition at line 831 of file code/src/datafile/iDataFileSPECT.cc.

Here is the call graph for this function:

◆ PROJ_GetScannerSpecificParameters() [2/2]

int iDataFileSPECT::PROJ_GetScannerSpecificParameters ( )
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

Implements vDataFile.

◆ PROJ_InitFile() [1/2]

int iDataFileSPECT::PROJ_InitFile ( )
virtual

Initialize the fstream objets for output writing as well as some other variables specific to the Projection script (Event-based correction flags, Estimated size of data file)

Returns
0 if success, and positive value otherwise.

Implements vDataFile.

Definition at line 571 of file code/src/datafile/iDataFileSPECT.cc.

Here is the call graph for this function:

◆ PROJ_InitFile() [2/2]

int iDataFileSPECT::PROJ_InitFile ( )
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.

Implements vDataFile.

◆ ReadSpecificInfoInHeader() [1/2]

int iDataFileSPECT::ReadSpecificInfoInHeader ( bool  a_affectQuantificationFlag)
virtual

Implements vDataFile.

◆ ReadSpecificInfoInHeader() [2/2]

int iDataFileSPECT::ReadSpecificInfoInHeader ( bool  a_affectQuantificationFlag)
virtual

Implements vDataFile.

Definition at line 53 of file code/src/datafile/iDataFileSPECT.cc.

Here is the call graph for this function:

◆ SetEventKindFlagOn() [1/2]

iDataFileSPECT::SetEventKindFlagOn ( )
inline

set to true the flag indicating the presence of the kind of a list-mode event in the datafile

This function is dedicated to datafile conversion scripts

Definition at line 164 of file code/include/datafile/iDataFileSPECT.hh.

◆ SetEventKindFlagOn() [2/2]

void iDataFileSPECT::SetEventKindFlagOn ( )
inline

Definition at line 164 of file include/datafile/iDataFileSPECT.hh.

◆ SetHeadRotDirection() [1/2]

void iDataFileSPECT::SetHeadRotDirection ( int  a_direction)
inline

Definition at line 222 of file code/include/datafile/iDataFileSPECT.hh.

◆ SetHeadRotDirection() [2/2]

void iDataFileSPECT::SetHeadRotDirection ( int  a_direction)
inline

Definition at line 222 of file include/datafile/iDataFileSPECT.hh.

◆ SetIsotope() [1/2]

void iDataFileSPECT::SetIsotope ( string  a_value)
inline

Definition at line 180 of file include/datafile/iDataFileSPECT.hh.

◆ SetIsotope() [2/2]

void iDataFileSPECT::SetIsotope ( string  a_value)
inline

Definition at line 180 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ SetNbBins() [1/2]

void iDataFileSPECT::SetNbBins ( uint16_t  a_binTrs,
uint16_t  a_binAxl 
)
inline

Definition at line 194 of file include/datafile/iDataFileSPECT.hh.

◆ SetNbBins() [2/2]

iDataFileSPECT::SetNbBins ( uint16_t  a_binTrs,
uint16_t  a_binAxl 
)
inline

initialize the bin values

Parameters
a_binTrs
a_binAxl

Definition at line 194 of file code/include/datafile/iDataFileSPECT.hh.

◆ SetNbHeads() [1/2]

iDataFileSPECT::SetNbHeads ( uint16_t  a_nbHeads)
inline

initialize the number of cameras

Parameters
a_nbHeads

Definition at line 208 of file code/include/datafile/iDataFileSPECT.hh.

◆ SetNbHeads() [2/2]

void iDataFileSPECT::SetNbHeads ( uint16_t  a_nbHeads)
inline

Definition at line 208 of file include/datafile/iDataFileSPECT.hh.

◆ SetNbProjections() [1/2]

void iDataFileSPECT::SetNbProjections ( uint16_t  a_nbProjections)
inline

Definition at line 201 of file include/datafile/iDataFileSPECT.hh.

◆ SetNbProjections() [2/2]

iDataFileSPECT::SetNbProjections ( uint16_t  a_nbProjections)
inline

initialize the number of projections

Parameters
a_nbProjections

Definition at line 201 of file code/include/datafile/iDataFileSPECT.hh.

◆ SetScatterCorrectionFlagOn() [1/2]

void iDataFileSPECT::SetScatterCorrectionFlagOn ( )
inline

Definition at line 171 of file include/datafile/iDataFileSPECT.hh.

◆ SetScatterCorrectionFlagOn() [2/2]

iDataFileSPECT::SetScatterCorrectionFlagOn ( )
inline

set to true the flag indicating the presence of scatter correction factors in the datafile

This function is dedicated to datafile conversion scripts

Definition at line 171 of file code/include/datafile/iDataFileSPECT.hh.

Here is the caller graph for this function:

◆ SetSpecificParametersFrom() [1/2]

int iDataFileSPECT::SetSpecificParametersFrom ( vDataFile ap_DataFile)
privatevirtual

Implements vDataFile.

Definition at line 127 of file code/src/datafile/iDataFileSPECT.cc.

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

◆ SetSpecificParametersFrom() [2/2]

int iDataFileSPECT::SetSpecificParametersFrom ( vDataFile ap_DataFile)
privatevirtual

Implements vDataFile.

◆ WriteEvent() [1/2]

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

Implements vDataFile.

Definition at line 624 of file code/src/datafile/iDataFileSPECT.cc.

Here is the call graph for this function:

◆ WriteEvent() [2/2]

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

Implements vDataFile.

◆ WriteHeader() [1/2]

int iDataFileSPECT::WriteHeader ( )
virtual

Generate a header file according to the data output information.

Returns
0 if success, and positive value otherwise.

Implements vDataFile.

Definition at line 752 of file code/src/datafile/iDataFileSPECT.cc.

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

◆ WriteHeader() [2/2]

int iDataFileSPECT::WriteHeader ( )
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.

Implements vDataFile.

◆ WriteHistoEvent() [1/2]

int iDataFileSPECT::WriteHistoEvent ( iEventHistoSPECT ap_Event,
int  a_th 
)
private

◆ WriteHistoEvent() [2/2]

int iDataFileSPECT::WriteHistoEvent ( iEventHistoSPECT ap_Event,
int  a_th 
)
private

Definition at line 655 of file code/src/datafile/iDataFileSPECT.cc.

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

◆ WriteListEvent() [1/2]

int iDataFileSPECT::WriteListEvent ( iEventListSPECT ap_Event,
int  a_th 
)
private

Definition at line 693 of file code/src/datafile/iDataFileSPECT.cc.

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

◆ WriteListEvent() [2/2]

int iDataFileSPECT::WriteListEvent ( iEventListSPECT ap_Event,
int  a_th 
)
private

Member Data Documentation

◆ m_acquisitionZoom

FLTNB iDataFileSPECT::m_acquisitionZoom
private

Zoom used during the acquisition to limit the area of detection for monolithic detectors

Definition at line 303 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_eventKindFlag

bool iDataFileSPECT::m_eventKindFlag
private

Flag for informations about the event nature (true, scatter) in the data. Default value = false

Definition at line 297 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_headRotDirection

int iDataFileSPECT::m_headRotDirection
private

Head rotation direction (0=clockwise, 1=counterclockwise)

Definition at line 313 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_ignoreNormCorrectionFlag

bool iDataFileSPECT::m_ignoreNormCorrectionFlag
private

Flag to say if we ignore the normalization correction even if present. Default = false

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

◆ m_ignoreScatCorrectionFlag

bool iDataFileSPECT::m_ignoreScatCorrectionFlag
private

Flag to say if we ignore the scatter correction even if present. Default = false

Definition at line 301 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_isotope

string iDataFileSPECT::m_isotope
private

Isotope. Default value =unknown

Definition at line 296 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_nbHeads

uint16_t iDataFileSPECT::m_nbHeads
private

Number of heads in the SPECT systems. Default =1

Definition at line 307 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_nbOfProjections

uint16_t iDataFileSPECT::m_nbOfProjections
private

Total number of projections during the acquisition(for all the heads). No Default

Definition at line 304 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_normCorrectionFlag

bool iDataFileSPECT::m_normCorrectionFlag
private

Flag that says if normalization correction terms are included in the data. Default = false

Definition at line 298 of file code/include/datafile/iDataFileSPECT.hh.

◆ m_scatCorrectionFlag

bool iDataFileSPECT::m_scatCorrectionFlag
private

Flag that says if scatter correction terms are included in the data. Default = false

Definition at line 300 of file code/include/datafile/iDataFileSPECT.hh.

◆ mp_angles

FLTNB * iDataFileSPECT::mp_angles
private

Angle [for each projection] in degrees. If SPECT system contains several heads, first head angles should be entered first, followed by 2nd head angles, etc.. No Default

Definition at line 305 of file code/include/datafile/iDataFileSPECT.hh.

◆ mp_CORtoDetectorDistance

FLTNB * iDataFileSPECT::mp_CORtoDetectorDistance
private

Distance camera surface to COR (mm) [for each projection].
if not provided, the distance given for each heads in the camera description file is taken and considered constant for each projections related to each head
if provided then: if positive value (either a constant value, or a value specific to each projection) then it overwrites the one given in the camera file
if negative, the distance given for each heads in the camera description file is taken and considered constant for each projections related to each head
Default value = Recovered from the camera description file

Definition at line 308 of file code/include/datafile/iDataFileSPECT.hh.

◆ mp_nbOfBins

uint16_t iDataFileSPECT::mp_nbOfBins
private

Transaxial/Axial number of bins. Default value =1,1

Definition at line 302 of file code/include/datafile/iDataFileSPECT.hh.


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