CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
oImageSpace Class Reference

This class holds all the matrices in the image domain that can be used in the algorithm: image, forward-image, correction, additional image, sensitivity image. More...

#include <oImageSpace.hh>

Collaboration diagram for oImageSpace:
Collaboration graph

Public Member Functions

 oImageSpace ()
 oImageSpace constructor. Initialize the member variables to their default values. More...
 
 ~oImageSpace ()
 oImageSpace destructor. More...
 
void InstantiateImage ()
 Allocate memory for the main image matrices. More...
 
void DeallocateImage ()
 Free memory for the main image matrices. More...
 
void InstantiateForwardImage ()
 Allocate memory for the forward image matrices. More...
 
void DeallocateForwardImage ()
 Free memory for the forward image matrices. More...
 
void InstantiateBackwardImageFromDynamicBasis (int a_nbBackwardImages)
 Allocate memory for the backward image matrices and set the number of backward images for the whole class. More...
 
void DeallocateBackwardImageFromDynamicBasis ()
 Free memory for the backward image matrices. More...
 
void InstantiateBackwardImageFromDynamicBins ()
 Allocate memory for the backward image matrices and initialize them. More...
 
void DeallocateBackwardImageFromDynamicBins ()
 Free memory of the backward image matrices. More...
 
void InstantiateSensitivityImage (const string &a_pathToSensitivityImage)
 Allocate the sensitivity image matrices. More...
 
void DeallocateSensitivityImage ()
 Free memory for the sensitivity image matrices. More...
 
int InitAnatomicalImage (const string &a_pathToAnatomicalImage)
 Memory allocation and initialization for the anatomical image matrices. More...
 
void DeallocateAnatomicalImage ()
 Free memory for the anatomical image. More...
 
int InitMaskImage (const string &a_pathToImage)
 Memory allocation and initialization for the mask image. More...
 
void DeallocateMaskImage ()
 Free memory for the mask image. More...
 
void InstantiateOutputImage ()
 Instanciate Image matrices dedicated to output writing on disk. More...
 
void InstantiateBwdImageForDeformation ()
 Memory allocation for the buffer backward image required for image-based deformation. More...
 
void InstantiateSensImageForDeformation ()
 Memory allocation for the buffer sensitivity image required for image-based deformation (only for PET HISTOGRAM mode) More...
 
void InstantiateVisitedVoxelsImage ()
 Memory allocation and initialization for the image matrix containing binary information regarding which 3D voxels have been visited during the projection steps. More...
 
void DeallocateBwdImageForDeformation ()
 Free memory for the buffer backward image required for image-based deformation. More...
 
void DeallocateSensImageForDeformation ()
 
void DeallocateOutputImage ()
 Free memory for the Image matrices dedicated to output writing on disk. More...
 
void DeallocateVisitedVoxelsImage ()
 Free memory for the image matrix containing binary information regarding which 3D voxels have been visited during the projection steps. More...
 
int InitImage (const string &a_pathToInitialImage, FLTNB a_value)
 Initialize the main image, either using: More...
 
void InitBackwardImage ()
 Initialize each voxel of the backward images to 0, also for sensitivity if not loaded (estimated on the fly). More...
 
int InitSensitivityImage (const string &a_pathToSensitivityImage)
 Initialization for the sensitivity image matrices. More...
 
void InitBwdImageForDeformation ()
 Initialize the buffer backward image dedicated to image-based deformation. More...
 
void InitSensImageForDeformation ()
 Initialize the buffer sensitivity image dedicated to image-based deformation, if required (histogram mode, as sensitivity is not loaded) More...
 
int LoadInitialImage (const string &a_pathToImage)
 Load the initial image provided by the user in the corresponding matrix. More...
 
void ComputeOutputImage ()
 
int ApplyOutputFOVMasking ()
 Mask the outside of the transaxial FOV based on the m_fovOutPercent. More...
 
int ApplyOutputFlip ()
 Just flip the output image. More...
 
int SaveOutputImage (int a_iteration, int a_subset=-1)
 Call the interfile function to write output image on disk. More...
 
void SaveDebugImage (const string &a_name)
 Just a debug function dedicated to write any kind of image on disk in raw format, for debugging purposes. More...
 
int SaveSensitivityImage (const string &a_pathToSensitivityImage)
 Call the interfile function to write the sensitivity image on disk. More...
 
void PrepareForwardImage ()
 Copy current image matrix in the forward-image buffer matrix. More...
 
void Reduce ()
 Merge parallel results into the matrix of the backward image matrix of the first thread. Also for MPI. More...
 
void CleanNeverVisitedVoxels ()
 Based on the visitedVoxelsImage, clean the never visited voxels in the image. This function must be called at the end of each iteration. More...
 
void LMS_InstantiateImage ()
 Allocate memory for the main image matrices (for list-mode sensitivity generation) More...
 
void LMS_InstantiateForwardImage ()
 Allocate memory for the forward image matrices (for list-mode sensitivity generation) More...
 
void LMS_InstantiateSensitivityImage ()
 Allocate memory for the sensitivity image matrices (for list-mode sensitivity generation) More...
 
void LMS_DeallocateImage ()
 Free memory for the main image matrices (for list-mode sensitivity generation) More...
 
void LMS_DeallocateForwardImage ()
 Free memory for the forward image matrices (for list-mode sensitivity generation) More...
 
void LMS_DeallocateSensitivityImage ()
 Free memory for the sensitivity image matrices (for list-mode sensitivity generation) More...
 
void LMS_DeallocateAttenuationImage ()
 Free memory for the Attenuation image matrices (for analytical projection or list-mode sensitivity generation) More...
 
int InitAttenuationImage (const string &a_pathToAtnImage)
 Memory allocation and initialisation for the attenuation image using either : More...
 
int LoadAttenuationImage (const string &a_pathToImage)
 Load the attenuation image provided by the user in the m2p_attenuation matrix. More...
 
void LMS_CopyAtnToImage ()
 Copy the attenuation image contained in the 'm2p_attenuation' matrix inside the m2p_image matrix. More...
 
void LMS_CopyAtnToForwardImage ()
 Copy the attenuation image contained in the 'm2p_attenuation' matrix inside the m4p_forwardImage matrix. More...
 
void LMS_CopyBackwardToSensitivity ()
 
void LMS_PrepareForwardImage ()
 Copy current image in forward-image buffer (for list-mode sensitivity generation) More...
 
void ReduceBackwardImage (int a_imageIndex, int a_timeIndex, int a_respIndex, int a_cardIndex)
 Merge parallel results into the backward image matrix of the first thread for the specific image / time / respiratory / cardiac provided indices. More...
 
int LMS_SaveSensitivityImage (const string &a_pathToSensitivityImage, oDeformationManager *ap_DeformationManager)
 Call the interfile function to write the sensitivity image on disk. More...
 
void PROJ_InstantiateProjectionImage (int a_nbProjs, int a_nbPixels)
 Instanciate and initialize projection image for analytical projection. More...
 
void PROJ_DeallocateProjectionImage (int a_nbProjs)
 Free memory for the projection image for analytical projection. More...
 
int PROJ_InitImage (const string &a_pathToInitialImage)
 Load the initial image for the analytical projection. More...
 
int PROJ_LoadInitialImage (const string &a_pathToImage)
 Load the initial image for the analytical projection. More...
 
int PROJ_SaveProjectionImage ()
 Save an image of the projected data (for analytic projection) More...
 
void SetVerbose (int a_verboseLevel)
 set verbosity More...
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 set the pointer to the oImageDimensionsAndQuantification object More...
 
int GetNbBackwardImages ()
 
bool IsLoadedSensitivity ()
 
bool IsLoadedAnatomical ()
 
bool IsLoadedMask ()
 
bool Checked ()
 Simply check that the image dimensions and verbosity has been set. More...
 

Public Attributes

FLTNB **** m4p_image
 
FLTNB **** m4p_forwardImage
 
FLTNB ****** m6p_backwardImage
 
FLTNB ***** m5p_sensitivity
 
FLTNB **** m4p_anatomicalImage
 
FLTNBmp_maskImage
 
FLTNBmp_visitedVoxelsImage
 
FLTNB **** m4p_attenuation
 
FLTNB **** m4p_outputImage
 
FLTNB ***** m5p_defTmpBackwardImage
 
FLTNB **** m4p_defTmpSensitivityImage
 
FLTNB ** m2p_projectionImage
 

Private Attributes

oImageDimensionsAndQuantificationmp_ID
 
int m_verbose
 
bool m_loadedSensitivity
 
bool m_loadedAnatomical
 
bool m_loadedMask
 
int m_nbBackwardImages
 

Detailed Description

This class holds all the matrices in the image domain that can be used in the algorithm: image, forward-image, correction, additional image, sensitivity image.

Image matrices are public and can be directly accessed from each classes.
It also includes many functions for initializating, reseting, or deforming the images.
Mandatory Reconstruction image matrices :
Image: 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels
ForwardImage: 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels
BackwardImage: 6 pointers: 1: number of images (for optimizer), 2: threads, 3: dynamic frames, 4: respiratory gates, 5: cardiac gates, 6: 3D voxels
SensitivityImage: 5 pointers: 1: threads, 2: dynamic frames, 3: respiratory gates, 4: cardiac gates, 5: 3D voxels
OutputImage: 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels
VisitedVoxelsImage: 1 pointer: 1: 3D voxels
Optional Reconstruction image matrices :
AnatomicalImage: 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels
DefTmpBackwardImage: 6 pointers: 1: number of images (for optimizer), 2: threads, 3: dynamic frames, 4: respiratory gates, 5: cardiac gates, 6: 3D voxels
DefTmpSensitivityImage: 5 pointers: 1: threads, 2: dynamic frames, 3: respiratory gates, 4: cardiac gates, 5: 3D voxels
Projection image matrices :
Attenuation: 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels:
ProjectionImage: 2 pointers: 1: number of projections, 2: 2D pixels

Definition at line 41 of file oImageSpace.hh.

Constructor & Destructor Documentation

oImageSpace::oImageSpace ( )

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

Definition at line 28 of file oImageSpace.cc.

oImageSpace::~oImageSpace ( )

oImageSpace destructor.

Definition at line 57 of file oImageSpace.cc.

Member Function Documentation

int oImageSpace::ApplyOutputFlip ( )

Just flip the output image.

Do this on m4p_outputImage

Definition at line 1372 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::ApplyOutputFOVMasking ( )

Mask the outside of the transaxial FOV based on the m_fovOutPercent.

Do this on m4p_outputImage

Definition at line 1497 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

oImageSpace::Checked ( )
inline

Simply check that the image dimensions and verbosity has been set.

Returns
true if image dimensions and verbosity are set

Definition at line 584 of file oImageSpace.hh.

Here is the caller graph for this function:

void oImageSpace::CleanNeverVisitedVoxels ( )

Based on the visitedVoxelsImage, clean the never visited voxels in the image. This function must be called at the end of each iteration.

Definition at line 1845 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::ComputeOutputImage ( )

Definition at line 1313 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateAnatomicalImage ( )

Free memory for the anatomical image.

Definition at line 563 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateBackwardImageFromDynamicBasis ( )

Free memory for the backward image matrices.

The dimensions are taken from the dynamic basis (number of time basis, respiratory and cardiac basis functions, as opposed to the number of frames/gates)

Definition at line 247 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateBackwardImageFromDynamicBins ( )

Free memory of the backward image matrices.

The dimensions are taken from the dynamic bins (number of times frames, respiratory and cardiac gates, as opposed to the number of basis functions)

Definition at line 326 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateBwdImageForDeformation ( )

Free memory for the buffer backward image required for image-based deformation.

Free memory for the buffer sensitivity image required for image-based deformation.

Definition at line 794 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateForwardImage ( )

Free memory for the forward image matrices.

The dimensions are taken from the dynamic basis (number of time basis, respiratory and cardiac basis functions, as opposed to the number of frames/gates)

Definition at line 169 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateImage ( )

Free memory for the main image matrices.

Definition at line 100 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateMaskImage ( )

Free memory for the mask image.

Definition at line 634 of file oImageSpace.cc.

Here is the caller graph for this function:

void oImageSpace::DeallocateOutputImage ( )

Free memory for the Image matrices dedicated to output writing on disk.

Definition at line 708 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateSensImageForDeformation ( )

Definition at line 859 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateSensitivityImage ( )

Free memory for the sensitivity image matrices.

Sensitivity image deallocation depends on the reconstruction mode (multithreaded in histogram but not in list-mode)

Definition at line 444 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateVisitedVoxelsImage ( )

Free memory for the image matrix containing binary information regarding which 3D voxels have been visited during the projection steps.

Definition at line 909 of file oImageSpace.cc.

Here is the caller graph for this function:

oImageSpace::GetNbBackwardImages ( )
inline
Returns
the number of backward images required for the selected optimizer

Definition at line 559 of file oImageSpace.hh.

Here is the caller graph for this function:

int oImageSpace::InitAnatomicalImage ( const string &  a_pathToAnatomicalImage)

Memory allocation and initialization for the anatomical image matrices.

Parameters
a_pathToAnatomicalImage: path to the anatomical image

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

Returns
0 if success, positive value otherwise

Definition at line 510 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::InitAttenuationImage ( const string &  a_pathToAtnImage)

Memory allocation and initialisation for the attenuation image using either :

Parameters
a_pathToAtnImage: path to an existing image
  • an image provided by the user (a_pathToAtnImage or a_pathToCTImage)
  • the default value (=a_value)
Returns
0 if success, positive value otherwise

Definition at line 966 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InitBackwardImage ( )

Initialize each voxel of the backward images to 0, also for sensitivity if not loaded (estimated on the fly).

Definition at line 1140 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InitBwdImageForDeformation ( )

Initialize the buffer backward image dedicated to image-based deformation.

this function is used by the vDeformation class, in order to reset the backward image after its content has been recovered in the buffer backward image (typically, after a deformation step)

Definition at line 1262 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::InitImage ( const string &  a_pathToInitialImage,
FLTNB  a_value 
)

Initialize the main image, either using:

Parameters
a_pathToInitialImage: path to an existing image
a_value: value to initialize each voxel with, if an input image is not provided
  • an existing image at path 'a_pathToInitialImage'
  • initialize each voxel with 'a_value'.
Returns
0 if success, positive value otherwise

Definition at line 1064 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::InitMaskImage ( const string &  a_pathToImage)

Memory allocation and initialization for the mask image.

Parameters
a_pathToImage: path to the mask image

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

Returns
0 if success, positive value otherwise

Definition at line 593 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InitSensImageForDeformation ( )

Initialize the buffer sensitivity image dedicated to image-based deformation, if required (histogram mode, as sensitivity is not loaded)

Definition at line 1286 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::InitSensitivityImage ( const string &  a_pathToSensitivityImage)

Initialization for the sensitivity image matrices.

Parameters
a_pathToSensitivityImage: path to the sensitivity image (should be provided only in list-mode reconstruction)

Sensitivity image initialization depends on the reconstruction mode :

  • list-mode: Sensitivity image has been computed before reconstruction, it is loaded from the path provided in parameter
  • histogram: Sensitivity image is calculated on the fly during reconstruction. First dimension (thread) is only used in histogram mode, as the on-the-fly sensitivity image computation must be thread safe
    Returns
    0 if success, positive value otherwise

Definition at line 1192 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateBackwardImageFromDynamicBasis ( int  a_nbBackwardImages)

Allocate memory for the backward image matrices and set the number of backward images for the whole class.

Parameters
a_nbBackwardImages: number of backward images required for the optimization algorithm

The dimensions are taken from the dynamic basis (number of time basis, respiratory and cardiac basis functions, as opposed to the number of frames/gates)

Definition at line 202 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateBackwardImageFromDynamicBins ( )

Allocate memory for the backward image matrices and initialize them.

The dimensions are taken from the dynamic bins (number of times frames, respiratory and cardiac gates, as opposed to the number of basis functions)

Definition at line 290 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateBwdImageForDeformation ( )

Memory allocation for the buffer backward image required for image-based deformation.

Definition at line 755 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateForwardImage ( )

Allocate memory for the forward image matrices.

The dimensions are taken from the dynamic basis (number of time basis, respiratory and cardiac basis functions, as opposed to the number of frames/gates)

Definition at line 133 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateImage ( )

Allocate memory for the main image matrices.

Definition at line 64 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateOutputImage ( )

Instanciate Image matrices dedicated to output writing on disk.

Compute output image using the m4p_image matrix and the time/respiratory/cardiac basis functions. Store the result in the m4p_outputImage matrix.

Additionnal output image matrix is needed if the reconstruction uses intrinsic temporal basis functions In this case, the image matrices are defined in the temporal image basis functions space, therefore requiring an additional step to recover the images in the regular image-space. If no intrinsic temporal basis functions are used, m4p_outputImage just refers to the address of the image matrix containing the regular image.

If time/respiratory/cardiac basis functions have been initialized, this function has no effect.

Definition at line 661 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateSensImageForDeformation ( )

Memory allocation for the buffer sensitivity image required for image-based deformation (only for PET HISTOGRAM mode)

Definition at line 830 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateSensitivityImage ( const string &  a_pathToSensitivityImage)

Allocate the sensitivity image matrices.

Parameters
a_pathToSensitivityImage: path to the sensitivity image

Sensitivity image initialization depends on the reconstruction mode :

  • list-mode: Sensitivity image has been computed before reconstruction, it is loaded from the path provided in parameter
  • histogram: Sensitivity image is calculated on the fly during reconstruction. First dimension (thread) is only used in histogram mode, as the on-the-fly sensitivity image computation must be thread safe

Definition at line 369 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateVisitedVoxelsImage ( )

Memory allocation and initialization for the image matrix containing binary information regarding which 3D voxels have been visited during the projection steps.

Definition at line 889 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

oImageSpace::IsLoadedAnatomical ( )
inline
Returns
boolean indicating if an anatomical image has been loaded (true) or not (false)

Definition at line 571 of file oImageSpace.hh.

oImageSpace::IsLoadedMask ( )
inline
Returns
boolean indicating if a mask image has been loaded (true) or not (false)

Definition at line 577 of file oImageSpace.hh.

oImageSpace::IsLoadedSensitivity ( )
inline
Returns
boolean indicating if the sensitivity is preloaded for the reconstruction (true) or computed on the fly (false)

Definition at line 565 of file oImageSpace.hh.

Here is the caller graph for this function:

void oImageSpace::LMS_CopyAtnToForwardImage ( )

Copy the attenuation image contained in the 'm2p_attenuation' matrix inside the m4p_forwardImage matrix.

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 2112 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_CopyAtnToImage ( )

Copy the attenuation image contained in the 'm2p_attenuation' matrix inside the m2p_image matrix.

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 2079 of file oImageSpace.cc.

Here is the call graph for this function:

void oImageSpace::LMS_CopyBackwardToSensitivity ( )

Definition at line 2143 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_DeallocateAttenuationImage ( )

Free memory for the Attenuation image matrices (for analytical projection or list-mode sensitivity generation)

Definition at line 928 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_DeallocateForwardImage ( )

Free memory for the forward image matrices (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 1983 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_DeallocateImage ( )

Free memory for the main image matrices (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 1918 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_DeallocateSensitivityImage ( )

Free memory for the sensitivity image matrices (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 2045 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_InstantiateForwardImage ( )

Allocate memory for the forward image matrices (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 1949 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_InstantiateImage ( )

Allocate memory for the main image matrices (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 1886 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_InstantiateSensitivityImage ( )

Allocate memory for the sensitivity image matrices (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 2015 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::LMS_PrepareForwardImage ( )

Copy current image in forward-image buffer (for list-mode sensitivity generation)

This function is dedicated to list-mode sensitivity (LMS) generation.

Definition at line 2163 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::LMS_SaveSensitivityImage ( const string &  a_pathToSensitivityImage,
oDeformationManager ap_DeformationManager 
)

Call the interfile function to write the sensitivity image on disk.

Parameters
a_pathToSensitivityImage: path to the sensitivity image (should be provided only in list-mode reconstruction)
ap_DeformationManager: Pointer to the deformation manager objet (required to retrieve the number of gates in the sensitivity image)

If image deformation is enabled for respiratory/cardiac gated data, the gated images are summed up into one image and normalize

Returns
0 if success, positive value otherwise

Definition at line 2231 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::LoadAttenuationImage ( const string &  a_pathToImage)

Load the attenuation image provided by the user in the m2p_attenuation matrix.

Parameters
a_pathToAtnImage: path to an existing image

Definition at line 1020 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::LoadInitialImage ( const string &  a_pathToImage)

Load the initial image provided by the user in the corresponding matrix.

Parameters
a_pathToImage: path to an existing image
Returns
0 if success, positive value otherwise

Definition at line 1102 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::PrepareForwardImage ( )

Copy current image matrix in the forward-image buffer matrix.

Definition at line 1703 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::PROJ_DeallocateProjectionImage ( int  a_nbProjs)

Free memory for the projection image for analytical projection.

Parameters
a_nbProjs: a number of projection slices in the projection

This function is currently only dedicated to SPECT projection, and used by the analytical projection script

Definition at line 2350 of file oImageSpace.cc.

Here is the caller graph for this function:

int oImageSpace::PROJ_InitImage ( const string &  a_pathToInitialImage)

Load the initial image for the analytical projection.

Parameters
a_pathToInitialImage: path to the image to project
Returns
0 if success, positive value otherwise

Definition at line 2376 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::PROJ_InstantiateProjectionImage ( int  a_nbProjs,
int  a_nbPixels 
)

Instanciate and initialize projection image for analytical projection.

Parameters
a_nbProjs: a number of projection slices in the projection
a_nbPixels: a total number of pixels in the projection slices

This function is currently only dedicated to SPECT projection, and used by the analytical projection script

Definition at line 2322 of file oImageSpace.cc.

Here is the caller graph for this function:

int oImageSpace::PROJ_LoadInitialImage ( const string &  a_pathToImage)

Load the initial image for the analytical projection.

Parameters
a_pathToImage: path to the image to project
Returns
0 if success, positive value otherwise

Definition at line 2411 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::PROJ_SaveProjectionImage ( )

Save an image of the projected data (for analytic projection)

Returns
0 if success, positive value otherwise

Definition at line 2452 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::Reduce ( )

Merge parallel results into the matrix of the backward image matrix of the first thread. Also for MPI.

Definition at line 1726 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::ReduceBackwardImage ( int  a_imageIndex,
int  a_timeIndex,
int  a_respIndex,
int  a_cardIndex 
)

Merge parallel results into the backward image matrix of the first thread for the specific image / time / respiratory / cardiac provided indices.

Parameters
a_imageIndex
a_timeIndex
a_respIndex
a_cardIndex

Definition at line 2182 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::SaveDebugImage ( const string &  a_name)

Just a debug function dedicated to write any kind of image on disk in raw format, for debugging purposes.

Parameters
a_name: output name of the image

Definition at line 1670 of file oImageSpace.cc.

Here is the call graph for this function:

int oImageSpace::SaveOutputImage ( int  a_iteration,
int  a_subset = -1 
)

Call the interfile function to write output image on disk.

Parameters
a_iteration: current iteration index
a_subset: current number of subsets (or -1 by default)
Returns
0 if success, positive value otherwise

Definition at line 1616 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::SaveSensitivityImage ( const string &  a_pathToSensitivityImage)

Call the interfile function to write the sensitivity image on disk.

Parameters
a_pathToSensitivityImage: path to the sensitivity image (should be provided only in list-mode reconstruction)
Returns
0 if success, positive value otherwise

Definition at line 2293 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

oImageSpace::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

set the pointer to the oImageDimensionsAndQuantification object

Parameters
ap_ImageDimensionsAndQuantification

Definition at line 553 of file oImageSpace.hh.

Here is the caller graph for this function:

oImageSpace::SetVerbose ( int  a_verboseLevel)
inline

set verbosity

Parameters
a_verboseLevel

Definition at line 546 of file oImageSpace.hh.

Here is the caller graph for this function:

Member Data Documentation

FLTNB** oImageSpace::m2p_projectionImage

Dynamic array for a projection image (currently dedicated to SPECT analytical projection), containing a 2-vectors voxellized image matrix Required in the case the reconstruction uses intrinsic temporal basis functions. In any other case, m4p_outputImage just refers to the address of the image matrix containing the regular image. 2 pointers: 1: number of projections 2: 2D pixels

Definition at line 144 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_anatomicalImage

Dynamic array for anatomical images to be used in reconstruction, containing a 4-vectors voxellized image matrix. 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels

Definition at line 93 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_attenuation

Dynamic array for the attenuation images, used in analytical projection or sensitivity list-mode generation, containing a 4-vectors voxellized image matrix. 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels

Definition at line 108 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_defTmpSensitivityImage

Buffer dynamic array for the sensitivity image (image-based normalization factors), containing a 5-vectors voxellized image matrix. Required when image-based deformation is enabled during histogram-based reconstruction 5 pointers: 1: threads, 2: dynamic frames, 3: respiratory gates, 4: cardiac gates, 5: 3D voxels

Definition at line 135 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_forwardImage

Dynamic array for the forward image (image data before the projection step), containing a 4-vectors voxellized image matrix. 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels

Definition at line 68 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_image

Dynamic array for the reconstructed image, containing a 4-vectors voxellized image matrix. 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels

Definition at line 61 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_outputImage

Dynamic array for the output image to be written on disk, containing a 4-vectors voxellized image matrix Required in the case the reconstruction uses intrinsic temporal basis functions. In any other case, m4p_outputImage just refers to the address of the image matrix containing the regular image. 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels

Definition at line 115 of file oImageSpace.hh.

FLTNB***** oImageSpace::m5p_defTmpBackwardImage

Buffer dynamic array for the backward image (image-based correction factors computed after the projection/backprojection steps), containing a 6-vectors voxellized image matrix. Required when image-based deformation is enabled during reconstruction 6 pointers: 1: number of images (dedicated to the optimization algorithm) 2: threads, 3: dynamic frames, 4: respiratory gates, 5: cardiac gates, 6: 3D voxels

Definition at line 124 of file oImageSpace.hh.

FLTNB***** oImageSpace::m5p_sensitivity

Dynamic array for the sensitivity image (image-based normalization factors), containing a 5-vectors voxellized image matrix. 5 pointers: 1: threads, 2: dynamic frames, 3: respiratory gates, 4: cardiac gates, 5: 3D voxels

Definition at line 85 of file oImageSpace.hh.

FLTNB****** oImageSpace::m6p_backwardImage

Dynamic array for the backward image (image-based correction factors computed after the projection/backprojection steps), containing a 6-vectors voxellized image matrix. 6 pointers: 1: number of images (dedicated to the optimization algorithm) 2: threads, 3: dynamic frames, 4: respiratory gates, 5: cardiac gates, 6: 3D voxels

Definition at line 75 of file oImageSpace.hh.

bool oImageSpace::m_loadedAnatomical
private

Flag indicating if an anatomical image has been loaded

Definition at line 594 of file oImageSpace.hh.

bool oImageSpace::m_loadedMask
private

Flag indicating if a mask image has been loaded

Definition at line 595 of file oImageSpace.hh.

bool oImageSpace::m_loadedSensitivity
private

Flag indicating if reconstruction is listmode, otherwise histogram because sensitivity is computed on-the-fly

Definition at line 593 of file oImageSpace.hh.

int oImageSpace::m_nbBackwardImages
private

Number of backward images in the related image matrix (for the optimizer)

Definition at line 596 of file oImageSpace.hh.

int oImageSpace::m_verbose
private

Verbosity

Definition at line 592 of file oImageSpace.hh.

oImageDimensionsAndQuantification* oImageSpace::mp_ID
private

Pointer to the oImageDimensionsAndQuantification object

Definition at line 591 of file oImageSpace.hh.

FLTNB* oImageSpace::mp_maskImage

Array for a mask image to be used in reconstruction, for instance a background mask. 1 pointer: 1: 3D voxels

Definition at line 100 of file oImageSpace.hh.

FLTNB* oImageSpace::mp_visitedVoxelsImage

1-D Dynamic array, containing binary information regarding which 3D voxels have been visited during the projection steps. 1 pointer: 3D voxels

Definition at line 104 of file oImageSpace.hh.


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