CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs 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 GetMultiplicativeCorrections ()=0
 This is a pure virtual function implemented in the child classes. 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_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 23 of file vEvent.hh.

Constructor & Destructor Documentation

vEvent::vEvent ( )

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

Definition at line 32 of file vEvent.cc.

vEvent::~vEvent ( )
virtual

vEvent destructor

Definition at line 53 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 71 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, iEventPET, iEventHistoPET, iEventHistoSPECT, iEventListSPECT, iEventSPECT, and iEventTransmission.

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, iEventHistoSPECT, iEventListSPECT, iEventPET, iEventHistoPET, iEventSPECT, and iEventTransmission.

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, iEventNorm, iEventHistoPET, iEventSPECT, and iEventTransmission.

Here is the caller graph for this function:

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

Definition at line 112 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 106 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 94 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 100 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, iEventNorm, iEventSPECT, iEventListSPECT, iEventHistoPET, iEventHistoSPECT, and iEventTransmission.

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 81 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 88 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, iEventSPECT, iEventNorm, and iEventTransmission.

Here is the caller graph for this function:

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

Definition at line 74 of file vEvent.hh.

Here is the caller graph for this function:

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

Definition at line 68 of file vEvent.hh.

Here is the caller graph for this function:

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, iEventSPECT, iEventListSPECT, iEventHistoPET, iEventHistoSPECT, and iEventTransmission.

Definition at line 120 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 142 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 150 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 134 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 119 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 157 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 195 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 TRANSMISSION. Default value =Unknown

Definition at line 194 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 193 of file vEvent.hh.

uint16_t vEvent::m_nbLines
protected

Number of lines in the event. Default value =0

Definition at line 190 of file vEvent.hh.

uint32_t vEvent::m_timeInMs
protected

Timestamp of the event in ms. Default value =0

Definition at line 189 of file vEvent.hh.

int vEvent::m_verbose
protected

Verbosity. Default value =-1

Definition at line 196 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 191 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 192 of file vEvent.hh.


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