CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
vEvent Class Referenceabstract

Mother class for the Event objects. More...

#include <vEvent.hh>

Inheritance diagram for vEvent:
Inheritance graph
Collaboration diagram for vEvent:
Collaboration graph

Public Member Functions

 vEvent ()
 vEvent constructor. Initialize the member variables to their default values. More...
 
virtual ~vEvent ()
 vEvent destructor More...
 
int AllocateID ()
 Instantiate the mp_ID1 and mp_ID2 indices arrays. More...
 
virtual int AllocateSpecificData ()=0
 Pure virtual function implemented in the child classes, dedicated to the allocation of specific data in the child classes. More...
 
virtual void Describe ()=0
 This function can be used to get a description of the event printed out. More...
 
uint32_t GetTimeInMs ()
 
uint16_t GetNbLines ()
 
uint32_t GetID1 (int a_line)
 
uint32_t GetID2 (int a_line)
 
uint32_t * GetEventID1 ()
 
uint32_t * GetEventID2 ()
 
int GetDataType ()
 
int GetDataMode ()
 
void SetTimeInMs (uint32_t a_value)
 Set the timestamp of the Event. More...
 
virtual void SetEventValue (int a_bin, FLTNBDATA a_value)=0
 This function is implemented by child classes. More...
 
void SetNbLines (uint16_t a_value)
 Set the number of lines of the Event. More...
 
void SetID1 (int a_line, uint32_t a_value)
 Set the indice associated with the line index for the 1st ID of the Event. More...
 
void SetID2 (int a_line, uint32_t a_value)
 Set the indice associated with the line index for the 2nd ID of the Event. More...
 
void SetVerbose (int a_verbose)
 Set verbosity. More...
 
virtual FLTNB GetEventValue (int a_bin)=0
 Pure virtual function implemented in the child classes. More...
 
virtual FLTNB GetAdditiveCorrections (int a_bin)=0
 Pure virtual function implemented in the child classes. More...
 
virtual FLTNB GetBlankValue ()
 This is a pure virtual function implemented in the child classes. More...
 
virtual FLTNB GetMultiplicativeCorrections ()=0
 This is a pure virtual function implemented in the child classes. More...
 
virtual INTNB GetNbValueBins ()=0
 Get the number of event value bins. More...
 
virtual void MultiplyAdditiveCorrections (FLTNB a_factor)=0
 Divide additive corrections by the provided factor. More...
 

Protected Attributes

uint32_t m_timeInMs
 
uint16_t m_nbLines
 
uint32_t * mp_ID1
 
uint32_t * mp_ID2
 
FLTNB m_eventValue
 
int m_dataType
 
int m_dataMode
 
int m_dataSpec
 
int m_verbose
 

Detailed Description

Mother class for the Event objects.

This class is designed to be a mother virtual class that should not be used on its own; only its children are used.
The pure virtual GetEventIndices method is implemented in each children in order to get the number of lines included
in the event and the associated indices (two crystal indices for PET, one crystal index and one view index for SPECT, etc).

Definition at line 43 of file vEvent.hh.

Constructor & Destructor Documentation

vEvent::vEvent ( )

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

Definition at line 41 of file vEvent.cc.

vEvent::~vEvent ( )
virtual

vEvent destructor

Definition at line 58 of file vEvent.cc.

Member Function Documentation

int vEvent::AllocateID ( )

Instantiate the mp_ID1 and mp_ID2 indices arrays.

This function instantiate the mp_ID1 and mp_ID2 indices arrays using the m_nbLines filled (assuming it has been initialized before),
and call the AllocateSpecificData() function implemented in child classes

Returns
0 is success, positive value otherwise

Definition at line 69 of file vEvent.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int vEvent::AllocateSpecificData ( )
pure virtual

Pure virtual function implemented in the child classes, dedicated to the allocation of specific data in the child classes.

Returns
0 is success, positive value otherwise

Implemented in iEventListPET, iEventNorm, iEventCT, iEventHistoPET, iEventPET, iEventSPECT, iEventHistoCT, iEventHistoSPECT, iEventListCT, and iEventListSPECT.

Here is the caller graph for this function:

void vEvent::Describe ( )
pure virtual

This function can be used to get a description of the event printed out.

Implemented in iEventListPET, iEventNorm, iEventCT, iEventHistoCT, iEventHistoPET, iEventHistoSPECT, iEventListCT, iEventListSPECT, iEventPET, and iEventSPECT.

Here is the caller graph for this function:

FLTNB vEvent::GetAdditiveCorrections ( int  a_bin)
pure virtual

Pure virtual function implemented in the child classes.

Returns
the sum of the additive corrections terms for this event

Implemented in iEventListPET, iEventPET, iEventHistoPET, iEventNorm, iEventCT, and iEventSPECT.

Here is the caller graph for this function:

FLTNB vEvent::GetBlankValue ( )
inlinevirtual

This is a pure virtual function implemented in the child classes.

Returns
the blank measurement if relevant, 0. otherwise

Reimplemented in iEventCT.

Definition at line 197 of file vEvent.hh.

Here is the caller graph for this function:

int vEvent::GetDataMode ( )
inline
Returns
the mode of the event (PET, SPECT, Transmission)

Definition at line 132 of file vEvent.hh.

Here is the caller graph for this function:

int vEvent::GetDataType ( )
inline
Returns
the type of the event (PET, SPECT, Transmission)

Definition at line 126 of file vEvent.hh.

Here is the caller graph for this function:

int * vEvent::GetEventID1 ( )
inline
Returns
the pointer containing the indices of the 1st ID of the event

Definition at line 114 of file vEvent.hh.

Here is the caller graph for this function:

int * vEvent::GetEventID2 ( )
inline
Returns
the pointer containing the indices of the 2nd ID of the event

Definition at line 120 of file vEvent.hh.

Here is the caller graph for this function:

FLTNB vEvent::GetEventValue ( int  a_bin)
pure virtual

Pure virtual function implemented in the child classes.

Parameters
abin
Returns
the value of the event

Implemented in iEventListPET, iEventPET, iEventCT, iEventSPECT, iEventNorm, iEventListSPECT, iEventHistoPET, iEventListCT, iEventHistoCT, and iEventHistoSPECT.

Here is the caller graph for this function:

int vEvent::GetID1 ( int  a_line)
inline
Parameters
aline index (0 if the event contains one line, any number if the events contains several lines as in PET compression)
Returns
the indice of the 1st ID of the Event corresponding to the line index passed as parameter

Definition at line 101 of file vEvent.hh.

Here is the caller graph for this function:

int vEvent::GetID2 ( int  a_line)
inline
Parameters
aline index (0 if the event contains one line, any number if the events contains several lines as in PET compression)
Returns
the indice of the 2nd ID of the Event corresponding to the line index passed as parameter

Definition at line 108 of file vEvent.hh.

Here is the caller graph for this function:

FLTNB vEvent::GetMultiplicativeCorrections ( )
pure virtual

This is a pure virtual function implemented in the child classes.

Returns
the product of the multiplicative corrections terms for this event

Implemented in iEventPET, iEventCT, iEventSPECT, and iEventNorm.

Here is the caller graph for this function:

uint16_t vEvent::GetNbLines ( )
inline
Returns
the number of lines in the Event

Definition at line 94 of file vEvent.hh.

Here is the caller graph for this function:

INTNB vEvent::GetNbValueBins ( )
pure virtual

Get the number of event value bins.

Returns
the number of value bins

Implemented in iEventListPET, iEventPET, iEventNorm, iEventCT, iEventSPECT, iEventListSPECT, iEventHistoPET, iEventListCT, iEventHistoCT, and iEventHistoSPECT.

Here is the caller graph for this function:

uint32_t vEvent::GetTimeInMs ( )
inline
Returns
the timestamp of the Event

Definition at line 88 of file vEvent.hh.

Here is the caller graph for this function:

void vEvent::MultiplyAdditiveCorrections ( FLTNB  a_factor)
pure virtual

Divide additive corrections by the provided factor.

Parameters
FLTNBa_factor

Implemented in iEventListPET, iEventNorm, iEventCT, iEventSPECT, and iEventHistoPET.

void vEvent::SetEventValue ( int  a_bin,
FLTNBDATA  a_value 
)
pure virtual

This function is implemented by child classes.

Parameters
a_bin
a_value

Cast the FLTNBDATA value passed in parameters in FLTNB, and use it to set the event value of the specific TOF bin

Implemented in iEventListPET, iEventPET, iEventNorm, iEventCT, iEventSPECT, iEventListSPECT, iEventHistoPET, iEventListCT, iEventHistoCT, and iEventHistoSPECT.

Definition at line 140 of file vEvent.hh.

Here is the caller graph for this function:

void vEvent::SetID1 ( int  a_line,
uint32_t  a_value 
)
inline

Set the indice associated with the line index for the 1st ID of the Event.

Parameters
aline index
avalue for the ID

Definition at line 162 of file vEvent.hh.

Here is the caller graph for this function:

void vEvent::SetID2 ( int  a_line,
uint32_t  a_value 
)
inline

Set the indice associated with the line index for the 2nd ID of the Event.

Parameters
aline index
avalue for the ID

Definition at line 170 of file vEvent.hh.

Here is the caller graph for this function:

void vEvent::SetNbLines ( uint16_t  a_value)
inline

Set the number of lines of the Event.

Parameters
anumber of lines

Definition at line 154 of file vEvent.hh.

Here is the caller graph for this function:

void vEvent::SetTimeInMs ( uint32_t  a_value)
inline

Set the timestamp of the Event.

Parameters
atime value in ms

Definition at line 139 of file vEvent.hh.

Here is the caller graph for this function:

void vEvent::SetVerbose ( int  a_verbose)
inline

Set verbosity.

Parameters
averbose level

Definition at line 177 of file vEvent.hh.

Member Data Documentation

int vEvent::m_dataMode
protected

This integer is used to specify the mode of the event as in the vDataFile; LIST or HISTO. Default value =Unknown

Definition at line 231 of file vEvent.hh.

int vEvent::m_dataSpec
protected

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

Definition at line 232 of file vEvent.hh.

int vEvent::m_dataType
protected

This integer is used to specify the type of the event as in the vDataFile; PET, SPECT or CT. Default value =Unknown

Definition at line 230 of file vEvent.hh.

FLTNB vEvent::m_eventValue
protected

Amount of data in the bin. Default value =0.0 (or 1. for list-mode event)

Definition at line 229 of file vEvent.hh.

uint16_t vEvent::m_nbLines
protected

Number of lines in the event. Default value =0

Definition at line 226 of file vEvent.hh.

uint32_t vEvent::m_timeInMs
protected

Timestamp of the event in ms. Default value =0

Definition at line 225 of file vEvent.hh.

int vEvent::m_verbose
protected

Verbosity. Default value =-1

Definition at line 233 of file vEvent.hh.

uint32_t* vEvent::mp_ID1
protected

Pointer containing the indice(s) of the 1st ID of the Event. Default value =NULL

Definition at line 227 of file vEvent.hh.

uint32_t* vEvent::mp_ID2
protected

Pointer containing the indice(s) of the 2nd ID of the Event. Default value =0

Definition at line 228 of file vEvent.hh.


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