9 #define OIMAGESPACE_HH 1 11 #include "gVariables.hh" 524 void ReduceBackwardImage(
int a_imageIndex,
int a_timeIndex,
int a_respIndex,
int a_cardIndex);
602 {
mp_ID = ap_ImageDimensionsAndQuantification;}
int ApplyMaskToBackwardImage(int a_imageIndex, int a_timeIndex, int a_respIndex, int a_cardIndex)
void LMS_InstantiateImage()
Allocate memory for the main image matrices (for list-mode sensitivity generation) ...
FLTNB * mp_visitedVoxelsImage
void DeallocateMiscellaneousImage()
Deallocate all allocated miscellaneous images.
This group of functions manages Interfile image file format.
void DeallocateBackwardImageFromDynamicBasis()
Free memory for the backward image matrices.
FLTNB **** m4p_refDynForwardImage
void LMS_CopyAtnToForwardImage(bool a_use1stMotion, bool a_use2ndMotion)
int InitMaskImage(const string &a_pathToImage)
int PROJ_InitImage(const string &a_pathToInitialImage)
int ApplyOutputMaskImage()
Mask the outside of the provided input mask image.
void DeallocateImage()
Free memory for the main image matrices.
int LMS_SaveSensitivityImage(const string &a_pathToSensitivityImage, oDeformationManager *ap_DeformationManager)
void LMS_PrepareForwardImage()
Copy current image in forward-image buffer (for list-mode sensitivity generation) ...
void Reduce()
Merge parallel results into the matrix of the backward image matrix of the first thread. Also for MPI.
int InitMultiModalImage(const vector< string > &a_pathToMultiModalImage)
bool IsLoadedSensitivity()
FLTNB ** m2p_projectionImage
int ApplyOutputFOVMasking()
Mask the outside of the transaxial FOV based on the m_fovOutPercent.
void DeallocateMultiModalImage()
Free memory for the multimodal image.
~oImageSpace()
oImageSpace destructor.
void DeallocateSensitivityImage()
Free memory for the sensitivity image matrices.
void InstantiateImage()
Allocate memory for the main image matrices.
int PROJ_SaveProjectionImage()
Save an image of the projected data (for analytic projection)
void InstantiateBackwardImageFromDynamicBasis(int a_nbBackwardImages)
FLTNB **** m4p_refDynSensitivityImage
int GetNbMiscellaneousImages()
int ApplyMaskToSensitivity()
Apply the mask to the sensitivity image (only for the first thread, the image must be reduced beforeh...
void LMS_InstantiateForwardImage()
Allocate memory for the forward image matrices (for list-mode sensitivity generation) ...
void InstantiateSensitivityImage(const string &a_pathToSensitivityImage)
void LMS_CopyAtnToImage()
Copy the attenuation image contained in the 'm2p_attenuation' matrix inside the m2p_image matrix...
int InitAttenuationImage(const string &a_pathToAtnImage)
int InitImage(const string &a_pathToInitialImage, FLTNB a_value)
void DeallocateVisitedVoxelsImage()
Free memory for the image matrix containing binary information regarding which 3D voxels have been vi...
void SaveDebugImage(const string &a_name)
void DeallocateMaskImage()
Free memory for the mask image.
FLTNB ***** m5p_refDynBackwardImage
int PROJ_LoadInitialImage(const string &a_pathToImage)
FLTNB ****** m6p_backwardImage
void PROJ_DeallocateProjectionImage(int a_nbProjs)
void PrepareForwardImage()
Copy current image matrix in the forward-image buffer matrix.
int SaveOutputBasisCoefficientImage(int a_iteration, int a_subset=-1)
FLTNB **** m4p_outputImage
void InstantiateVisitedVoxelsImage()
Memory allocation and initialization for the image matrix containing binary information regarding whi...
void InitRefImagesForDeformation()
void CleanNeverVisitedVoxels()
Based on the visitedVoxelsImage, clean the never visited voxels in the image. This function must be c...
void LMS_DeallocateSensitivityImage()
Free memory for the sensitivity image matrices (for list-mode sensitivity generation) ...
int SaveOutputImage(int a_iteration, int a_subset=-1)
void LMS_DeallocateImage()
Free memory for the main image matrices (for list-mode sensitivity generation)
void ComputeOutputImage()
int LoadInitialImage(const string &a_pathToImage)
void DeallocateRefImagesForDeformation()
Free memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
int GetNbBackwardImages()
bool IsLoadedMultiModal()
FLTNB ** m2p_multiModalImage
void InstantiateForwardImage()
Allocate memory for the forward image matrices.
FLTNB **** m4p_attenuation
FLTNB ***** m5p_sensitivity
FLTNB ** m2p_miscellaneousImage
void PROJ_InstantiateProjectionImage(int a_nbProjs, int a_nbPixels)
FLTNB **** m4p_forwardImage
void ReduceBackwardImage(int a_imageIndex, int a_timeIndex, int a_respIndex, int a_cardIndex)
This class is designed to generically described any iterative optimizer.
int ApplyOutputFlip()
Just flip the output image.
void InstantiateBackwardImageFromDynamicBins()
Allocate memory for the backward image matrices and initialize them.
void LMS_DeallocateAttenuationImage()
Free memory for the Attenuation image matrices (for analytical projection or list-mode sensitivity ge...
void DeallocateOutputImage()
Free memory for the Image matrices dedicated to output writing on disk.
This class holds all the matrices in the image domain that can be used in the algorithm: image...
FLTNB * AllocateMiscellaneousImage()
Allocate a new miscellaneous image on m2p_miscellaneousImages and return the pointer to this image...
This class is designed to manage all dimensions and quantification related stuff. ...
Declaration of class oImageDimensionsAndQuantification.
oImageSpace()
oImageSpace constructor. Initialize the member variables to their default values. ...
bool Checked()
Simply check that the image dimensions and verbosity has been set.
void InstantiateRefImagesForDeformation()
Allocate memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager.
int m_nbMiscellaneousImages
int SaveSensitivityImage(const string &a_pathToSensitivityImage)
void DeallocateBackwardImageFromDynamicBins()
Free memory of the backward image matrices.
oImageDimensionsAndQuantification * mp_ID
void InitBackwardImage()
Initialize each voxel of the backward images to 0, also for sensitivity if not loaded (estimated on t...
int InitSensitivityImage(const string &a_pathToSensitivityImage)
void LMS_InstantiateSensitivityImage()
Allocate memory for the sensitivity image matrices (for list-mode sensitivity generation) ...
void DeallocateForwardImage()
Free memory for the forward image matrices.
void LMS_CopyBackwardToSensitivity()
void SetVerbose(int a_verboseLevel)
void InstantiateOutputImage()
Instanciate Image matrices dedicated to output writing on disk.
void LMS_DeallocateForwardImage()
Free memory for the forward image matrices (for list-mode sensitivity generation) ...