CASToR  2.0
Tomographic Reconstruction (PET/SPECT/CT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator 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...
 
FLTNBAllocateMiscellaneousImage ()
 Allocate a new miscellaneous image on m2p_miscellaneousImages and return the pointer to this image. More...
 
void DeallocateMiscellaneousImage ()
 Deallocate all allocated miscellaneous images. More...
 
int InitMultiModalImage (const vector< string > &a_pathToMultiModalImage)
 Memory allocation and initialization for the multimodal image matrices. More...
 
void DeallocateMultiModalImage ()
 Free memory for the multimodal 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 InstantiateRefImagesForDeformation ()
 Allocate memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager. 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 DeallocateRefImagesForDeformation ()
 Free memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager. More...
 
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 InitRefImagesForDeformation ()
 
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 ApplyOutputMaskImage ()
 Mask the outside of the provided input mask image. More...
 
int ApplyMaskToSensitivity ()
 Apply the mask to the sensitivity image (only for the first thread, the image must be reduced beforehand) 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...
 
void LMS_CopyAtnToImage ()
 Copy the attenuation image contained in the 'm2p_attenuation' matrix inside the m2p_image matrix. More...
 
void LMS_CopyAtnToForwardImage (bool a_use1stMotion, bool a_use2ndMotion)
 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 ApplyMaskToBackwardImage (int a_imageIndex, int a_timeIndex, int a_respIndex, int a_cardIndex)
 Apply the mask to 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 IsLoadedMultiModal ()
 
bool IsLoadedMask ()
 
bool Checked ()
 Simply check that the image dimensions and verbosity has been set. More...
 
int GetNbMiscellaneousImages ()
 

Public Attributes

FLTNB **** m4p_image
 
FLTNB **** m4p_forwardImage
 
FLTNB ****** m6p_backwardImage
 
FLTNB ***** m5p_sensitivity
 
FLTNB ***** m5p_multiModalImage
 
FLTNBmp_maskImage
 
FLTNB **** m4p_visitedVoxelsImage
 
FLTNB ** m2p_miscellaneousImage
 
FLTNB **** m4p_attenuation
 
FLTNB **** m4p_outputImage
 
FLTNB **** m4p_refDynForwardImage
 
FLTNB ***** m5p_refDynBackwardImage
 
FLTNB **** m4p_refDynSensitivityImage
 
FLTNB ** m2p_projectionImage
 

Private Attributes

oImageDimensionsAndQuantificationmp_ID
 
int m_verbose
 
bool m_loadedSensitivity
 
bool m_loadedMultiModal
 
bool m_loadedMask
 
int m_nbBackwardImages
 
int m_nbMiscellaneousImages
 

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 :
MultiModalImage: 5 pointers: 1: number of multimodal images, 2: dynamic frames, 3: respiratory gates, 4: cardiac gates, 5: 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 61 of file oImageSpace.hh.

Constructor & Destructor Documentation

oImageSpace::oImageSpace ( )

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

Definition at line 39 of file oImageSpace.cc.

oImageSpace::~oImageSpace ( )

oImageSpace destructor.

Definition at line 71 of file oImageSpace.cc.

Here is the call graph for this function:

Member Function Documentation

FLTNB * oImageSpace::AllocateMiscellaneousImage ( )

Allocate a new miscellaneous image on m2p_miscellaneousImages and return the pointer to this image.

Returns
The pointer to the newly allocated image

Definition at line 529 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::ApplyMaskToBackwardImage ( int  a_imageIndex,
int  a_timeIndex,
int  a_respIndex,
int  a_cardIndex 
)

Apply the mask to the backward image matrix of the first thread for the specific image / time / respiratory / cardiac provided indices.

Do this on m6p_backwardImage

Definition at line 1975 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::ApplyMaskToSensitivity ( )

Apply the mask to the sensitivity image (only for the first thread, the image must be reduced beforehand)

Do this on m5p_sensitivityImage

Definition at line 1937 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::ApplyOutputFlip ( )

Just flip the output image.

Do this on m4p_outputImage

Definition at line 1664 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 1789 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::ApplyOutputMaskImage ( )

Mask the outside of the provided input mask image.

Do this on m4p_outputImage

Definition at line 1901 of file oImageSpace.cc.

Here is the call 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 654 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 2248 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 1605 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 266 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 345 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 187 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 118 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 716 of file oImageSpace.cc.

Here is the caller graph for this function:

void oImageSpace::DeallocateMiscellaneousImage ( )

Deallocate all allocated miscellaneous images.

Definition at line 559 of file oImageSpace.cc.

Here is the caller graph for this function:

void oImageSpace::DeallocateMultiModalImage ( )

Free memory for the multimodal image.

Definition at line 641 of file oImageSpace.cc.

Here is the call graph for this function:

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 792 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::DeallocateRefImagesForDeformation ( )

Free memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager.

Definition at line 984 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 463 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 1165 of file oImageSpace.cc.

Here is the call graph for this function:

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 630 of file oImageSpace.hh.

Here is the caller graph for this function:

oImageSpace::GetNbMiscellaneousImages ( )
inline
Returns
The number of allocated miscellaneous images

Definition at line 660 of file oImageSpace.hh.

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 1230 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 1414 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 1294 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 675 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int oImageSpace::InitMultiModalImage ( const vector< string > &  a_pathToMultiModalImage)

Memory allocation and initialization for the multimodal image matrices.

Parameters
a_pathToMultiModalImage: path to multimodal 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 582 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InitRefImagesForDeformation ( )

Definition at line 1536 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 1466 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 221 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 309 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 151 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 82 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 745 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void oImageSpace::InstantiateRefImagesForDeformation ( )

Allocate memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager.

Definition at line 872 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 388 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 1121 of file oImageSpace.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 647 of file oImageSpace.hh.

Here is the caller graph for this function:

oImageSpace::IsLoadedMultiModal ( )
inline
Returns
boolean indicating if one or several multimodal images have been loaded (true) or not (false)

Definition at line 641 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 636 of file oImageSpace.hh.

Here is the caller graph for this function:

void oImageSpace::LMS_CopyAtnToForwardImage ( bool  a_use1stMotion,
bool  a_use2ndMotion 
)

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

Parameters
a_use1stMotion
a_use2ndMotion

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

Definition at line 2536 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 2501 of file oImageSpace.cc.

Here is the call graph for this function:

void oImageSpace::LMS_CopyBackwardToSensitivity ( )

Definition at line 2573 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 1200 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 2405 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 2340 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 2467 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 2371 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 2308 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 2437 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 2593 of file oImageSpace.cc.

Here is the call 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 2661 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 1376 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 2106 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 2785 of file oImageSpace.cc.

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 2811 of file oImageSpace.cc.

Here is the call 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 2757 of file oImageSpace.cc.

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 2846 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 2887 of file oImageSpace.cc.

Here is the call 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 2129 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 2612 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 2073 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 2019 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 2728 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 624 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 617 of file oImageSpace.hh.

Here is the caller graph for this function:

Member Data Documentation

FLTNB** oImageSpace::m2p_miscellaneousImage

A bunch of images that can be allocated on demand using the AllocateMiscellaneousImage() function which return a pointer to the newly created image. They can thus be used anywhere in the code for any purpose.

Definition at line 134 of file oImageSpace.hh.

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 183 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 137 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 88 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 81 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 144 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_refDynForwardImage

Buffer dynamic array for the forward image (image-based correction factors computed after the projection/backprojection steps), containing a 5-vectors voxellized image matrix. Required for image-based deformation, in order to store the forward image of the reference position from which deformation are performed 5 pointers: 1: number of images (dedicated to the optimization algorithm) 2: dynamic frames, 3: respiratory gates, 4: cardiac gates, 5: 3D voxels

Definition at line 153 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_refDynSensitivityImage

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

Definition at line 174 of file oImageSpace.hh.

FLTNB**** oImageSpace::m4p_visitedVoxelsImage

Dynamic array, containing binary information regarding which 3D voxels have been visited during the projection steps. 4 pointers: 1: dynamic frames, 2: respiratory gates, 3: cardiac gates, 4: 3D voxels

Definition at line 128 of file oImageSpace.hh.

FLTNB***** oImageSpace::m5p_multiModalImage

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

Definition at line 113 of file oImageSpace.hh.

FLTNB***** oImageSpace::m5p_refDynBackwardImage

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, in order to store the correction factors in the reference position 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 163 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 105 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 95 of file oImageSpace.hh.

bool oImageSpace::m_loadedMask
private

Flag indicating if a mask image has been loaded

Definition at line 671 of file oImageSpace.hh.

bool oImageSpace::m_loadedMultiModal
private

Flag indicating if multimodal images have been loaded

Definition at line 670 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 669 of file oImageSpace.hh.

int oImageSpace::m_nbBackwardImages
private

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

Definition at line 672 of file oImageSpace.hh.

int oImageSpace::m_nbMiscellaneousImages
private

Number of allocated miscellaneous images

Definition at line 673 of file oImageSpace.hh.

int oImageSpace::m_verbose
private

Verbosity

Definition at line 668 of file oImageSpace.hh.

oImageDimensionsAndQuantification* oImageSpace::mp_ID
private

Pointer to the oImageDimensionsAndQuantification object

Definition at line 667 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 121 of file oImageSpace.hh.


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