![]() |
CASToR
3.2
Tomographic Reconstruction (PET/SPECT/CT)
|
RCP-GS : Random Clustering Prior - Gibbs Sampler. More...
#include <iRCPGSAlgorithm.hh>
Public Member Functions | |
iRCPGSAlgorithm () | |
~iRCPGSAlgorithm () | |
int | InitSpecificOptions (string a_specificOptions) |
void | ShowHelpSpecific () |
Show help for the child algorithm. More... | |
iRCPGSAlgorithm () | |
~iRCPGSAlgorithm () | |
int | InitSpecificOptions (string a_specificOptions) |
void | ShowHelpSpecific () |
Show help for the child algorithm. More... | |
![]() | |
vAlgorithm () | |
vAlgorithm constructor. Initialize the member variables to their default values. More... | |
virtual | ~vAlgorithm () |
vAlgorithm destructor. More... | |
int | Run () |
Just call either the RunCPU or the RunGPU function as asked for. More... | |
int | RunCPU () |
Perform the iterative loop of the algorithm. Function designed to be executed on the CPU only. More... | |
void | SetSaveSensitivityHistoFlag (bool a_saveSensitivityHistoFlag) |
void | SetSaveSubsetImageFlag (bool a_saveImageAfterSubsets) |
void | SetSaveDynamicBasisCoefficientImages (bool a_saveDynamicBasisCoefficients) |
void | SetOptimizerManager (oOptimizerManager *ap_OptimizerManager) |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
void | SetProjectorManager (oProjectorManager *ap_ProjectorManager) |
void | SetImageConvolverManager (oImageConvolverManager *ap_ImageConvolverManager) |
void | SetImageProcessingManager (oImageProcessingManager *ap_ImageProcessingManager) |
void | SetDynamicModelManager (oDynamicModelManager *ap_DynamicModelManager) |
void | SetDeformationManager (oDeformationManager *ap_DeformationManager) |
void | SetDataFile (vDataFile **a2p_DataFile) |
void | SetGPUflag (bool a_flagGPU) |
void | SetVerbose (int a_verboseLevel) |
void | SetNbBeds (int a_nbBeds) |
void | SetPathInitImage (string a_pathToInitialImage) |
void | SetPathToAttenuationImage (string a_pathToAttenuationImage) |
void | SetPathToSensitivityImage (string a_pathToSensitivityImage) |
void | SetPathToMultiModalImage (vector< string > a_pathToMultiModalImage) |
int | SetNbIterationsAndSubsets (const string &a_nbIterationsSubsets) |
int | SetOutputIterations (const string &a_outputIterations) |
vAlgorithm () | |
virtual | ~vAlgorithm () |
int | Run () |
int | RunCPU () |
void | SetSaveSensitivityHistoFlag (bool a_saveSensitivityHistoFlag) |
void | SetSaveSubsetImageFlag (bool a_saveImageAfterSubsets) |
void | SetSaveDynamicBasisCoefficientImages (bool a_saveDynamicBasisCoefficients) |
void | SetOptimizerManager (oOptimizerManager *ap_OptimizerManager) |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
void | SetProjectorManager (oProjectorManager *ap_ProjectorManager) |
void | SetImageConvolverManager (oImageConvolverManager *ap_ImageConvolverManager) |
void | SetImageProcessingManager (oImageProcessingManager *ap_ImageProcessingManager) |
void | SetDynamicModelManager (oDynamicModelManager *ap_DynamicModelManager) |
void | SetDeformationManager (oDeformationManager *ap_DeformationManager) |
void | SetDataFile (vDataFile **a2p_DataFile) |
void | SetGPUflag (bool a_flagGPU) |
void | SetVerbose (int a_verboseLevel) |
void | SetNbBeds (int a_nbBeds) |
void | SetPathInitImage (string a_pathToInitialImage) |
void | SetPathToAttenuationImage (string a_pathToAttenuationImage) |
void | SetPathToSensitivityImage (string a_pathToSensitivityImage) |
void | SetPathToMultiModalImage (vector< string > a_pathToMultiModalImage) |
int | SetNbIterationsAndSubsets (const string &a_nbIterationsSubsets) |
void | SetNbSkippedIterations (const string &a_skippedIterations) |
Set the number of first iterations to be skipped. More... | |
int | SetOutputIterations (const string &a_outputIterations) |
Protected Member Functions | |
int | StepBeforeIterationLoop () |
This function is called at the beginning of the RunCPU function. More... | |
int | StepAfterIterationLoop () |
This function is called at the end of the RunCPU function. More... | |
int | StepBeforeSubsetLoop (int a_iteration) |
int | StepAfterSubsetLoop (int a_iteration) |
int | StepPreProcessInsideSubsetLoop (int a_iteration, int a_subset) |
int | StepInnerLoopInsideSubsetLoop (int a_iteration, int a_subset, int a_bed) |
int | StepPostProcessInsideSubsetLoop (int a_iteration, int a_subset) |
int | StepImageOutput (int a_iteration, int a_subset=-1) |
int | ReadConfigurationFile (const string &a_configurationFile) |
int | StepBeforeIterationLoop () |
This function is called at the beginning of the RunCPU function. More... | |
int | StepAfterIterationLoop () |
This function is called at the end of the RunCPU function. More... | |
int | StepBeforeSubsetLoop (int a_iteration) |
int | StepAfterSubsetLoop (int a_iteration) |
int | StepPreProcessInsideSubsetLoop (int a_iteration, int a_subset) |
int | StepInnerLoopInsideSubsetLoop (int a_iteration, int a_subset, int a_bed) |
int | StepPostProcessInsideSubsetLoop (int a_iteration, int a_subset) |
int | StepImageOutput (int a_iteration, int a_subset=-1) |
int | ReadConfigurationFile (const string &a_configurationFile) |
Private Member Functions | |
int | SampleConditionalCompleteData (int a_iteration, int a_subset, int a_bed) |
int | SampleConditionalClustering (int a_iteration) |
int | SampleConditionalClusterIntensity () |
Gibbs sampler : third conditional probability (cluster intensity) More... | |
int | UpdateVisitedVoxels () |
Check for voxels which do not contribute to recorded observed data. More... | |
int | InitializeHelperVar () |
Allocate and initialize temporary variables, after the main variables have been initialized Assumption : the initial image and the sensitivity image have already been initialized. More... | |
int | ProcessMultiModalInfo () |
Check input multimodal images. More... | |
int | GenerateCurrentImage () |
Generate the current image estimation from the current sample of partition/clustering and cluster intensities. More... | |
int | ComputeFellowVoxelsList (vector< INTNB > &a_fellow_voxels, int a_current_voxel) |
int | ComputeSumsPerClusters (int a_iteration) |
int | SaveIntermediaryData (int a_iteration) |
int | SampleConditionalCompleteData (int a_iteration, int a_subset, int a_bed) |
int | SampleConditionalClustering (int a_iteration) |
int | SampleConditionalClusterIntensity () |
int | UpdateVisitedVoxels () |
int | InitializeHelperVar () |
int | ProcessMultiModalInfo () |
int | GenerateCurrentImage () |
int | ComputeFellowVoxelsList (vector< INTNB > &a_fellow_voxels, int a_current_voxel) |
int | ComputeSumsPerClusters (int a_iteration) |
int | SaveIntermediaryData (int a_iteration) |
Additional Inherited Members | |
![]() | |
int | m_nbIterations |
int * | mp_nbSubsets |
bool * | mp_outputIterations |
int | m_verbose |
bool | m_flagGPU |
oImageDimensionsAndQuantification * | mp_ID |
vDataFile ** | m2p_DataFile |
oProjectorManager * | mp_ProjectorManager |
oOptimizerManager * | mp_OptimizerManager |
oDeformationManager * | mp_DeformationManager |
oDynamicModelManager * | mp_DynamicModelManager |
oImageSpace * | mp_ImageSpace |
oImageConvolverManager * | mp_ImageConvolverManager |
oImageProcessingManager * | mp_ImageProcessingManager |
int | m_nbBeds |
string | m_pathToInitialImg |
string | m_pathToAtnImg |
string | m_pathToSensitivityImg |
vector< string > | m_pathToMultiModalImg |
bool | m_saveSensitivityHistoFlag |
bool | m_saveImageAfterSubsets |
bool | m_saveDynamicBasisCoefficients |
int | m_nbSkippedIterations |
RCP-GS : Random Clustering Prior - Gibbs Sampler.
Sampling of the posterior probability distribution (Bayesian inference) Image prior : ddCRP, with intensity ~ Gamma (conjugate prior for Poisson likelihood) Multinomial distribution for the backprojection from acquired data into (latent) emissions from voxel j into projection i
Definition at line 20 of file code/include/algorithm/iRCPGSAlgorithm.hh.
iRCPGSAlgorithm::iRCPGSAlgorithm | ( | ) |
Definition at line 12 of file code/src/algorithm/iRCPGSAlgorithm.cc.
iRCPGSAlgorithm::~iRCPGSAlgorithm | ( | ) |
Definition at line 45 of file code/src/algorithm/iRCPGSAlgorithm.cc.
iRCPGSAlgorithm::iRCPGSAlgorithm | ( | ) |
iRCPGSAlgorithm::~iRCPGSAlgorithm | ( | ) |
|
private |
Definition at line 1767 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
private |
Definition at line 1333 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
private |
|
private |
Generate the current image estimation from the current sample of partition/clustering and cluster intensities.
Definition at line 1829 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
Allocate and initialize temporary variables, after the main variables have been initialized Assumption : the initial image and the sensitivity image have already been initialized.
Definition at line 521 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
virtual |
Reimplemented from vAlgorithm.
Definition at line 136 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
virtual |
Reimplemented from vAlgorithm.
|
private |
|
private |
Check input multimodal images.
Definition at line 668 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protected |
Definition at line 441 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protected |
|
private |
|
private |
Definition at line 1418 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
private |
Gibbs sampler : third conditional probability (cluster intensity)
Definition at line 1715 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
private |
Definition at line 889 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
private |
|
virtual |
Show help for the child algorithm.
Reimplemented from vAlgorithm.
Definition at line 2008 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
virtual |
Show help for the child algorithm.
Reimplemented from vAlgorithm.
|
protectedvirtual |
This function is called at the end of the RunCPU function.
Reimplemented from vAlgorithm.
Definition at line 1856 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
This function is called at the end of the RunCPU function.
Reimplemented from vAlgorithm.
|
protectedvirtual |
Reimplemented from vAlgorithm.
|
protectedvirtual |
Reimplemented from vAlgorithm.
Definition at line 1887 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
This function is called at the beginning of the RunCPU function.
Reimplemented from vAlgorithm.
Definition at line 695 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
This function is called at the beginning of the RunCPU function.
Reimplemented from vAlgorithm.
|
protectedvirtual |
Reimplemented from vAlgorithm.
Definition at line 1876 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
Reimplemented from vAlgorithm.
|
protectedvirtual |
Implements vAlgorithm.
Definition at line 1915 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
Implements vAlgorithm.
|
protectedvirtual |
Implements vAlgorithm.
Definition at line 756 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
Implements vAlgorithm.
|
protectedvirtual |
Reimplemented from vAlgorithm.
Definition at line 772 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
protectedvirtual |
Reimplemented from vAlgorithm.
|
protectedvirtual |
Reimplemented from vAlgorithm.
|
protectedvirtual |
Reimplemented from vAlgorithm.
Definition at line 740 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
|
private |
Check for voxels which do not contribute to recorded observed data.
Definition at line 1397 of file code/src/algorithm/iRCPGSAlgorithm.cc.
|
private |
Trace of the backprojection destination for each observed count at previous iteration, Number of beds x Number of events x Number of TOF bins x Number of counts
Definition at line 136 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
flag describing the multinomial backprojection of the current iteration/subset data (sampling of conditional complete data): 0 = the previous backprojection state is cleared, as for ML-EM 1 = update of the previous backprojection state 2 = backprojection marginalized over cluster intensity, implies update of the previous backprojection state
Definition at line 111 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
helper variable for the average cluster volume after each iteration/subset
Definition at line 141 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
flag describing the ddCRP prior : 0 = no ddCRP, 1 = original ddCRP, 2 = modified ddCRP
Definition at line 110 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
ddCRP : the unnormalized probability of drawing a self link
Definition at line 118 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Multiplicative increment for optimizing the ddCRP alpha parameter through iterations
Definition at line 120 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
helper variable for precomputed log of ddCRP : the probability of drawing a self link (not normalized)
Definition at line 140 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Gamma prior distribution rate parameter
Definition at line 117 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Gamma prior distribution shape parameter
Definition at line 116 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Maximum threshold for average cluster volume (in mm3), used for adapting ddCRP alpha automatically through iterations
Definition at line 143 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Minimum threshold for average cluster volume (in mm3), used for adapting ddCRP alpha automatically through iterations
Definition at line 142 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Number of iterations after which the multimodal images start affecting voxels clustering
Definition at line 119 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Number of voxels in the neighbourhood
Definition at line 115 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Number of voxels per cluster
Definition at line 130 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Ns : sum over cluster voxels and all LORs of latent backprojected variable (complete data), requires HPFLTNB precision, can be threaded
Definition at line 127 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Sensitivity : sum over cluster voxels and all LORs of system matrix components, requires HPFLTNB precision
Definition at line 128 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Values (here voxel intensities) associated with each cluster
Definition at line 126 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
List of events indices, per bed, used for random shuffling
Definition at line 135 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Indices of voxels which will be taken into account in the algorithm; all the other voxels are regarded as background and set to 0
Definition at line 138 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
List of voxel indices, used for random shuffling
Definition at line 134 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Standard deviation of Gaussian noise in multimodal images
Definition at line 122 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Parameter for the standard deviation of the prior on multimodal images
Definition at line 123 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Mapping : voxel index -> next voxel index (link from this voxel to another voxel)
Definition at line 131 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
A buffer image used for holding the complete up-to-date backward image at any time. It is updated at each iteration/subset, and used in backprojection modes 1 and 2
Definition at line 144 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Mapping : voxel index -> cluster index
Definition at line 125 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Multimodal image(s) : sum over cluster voxels, requires HPFLTNB precision
Definition at line 129 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Mapping : voxel index -> list of previous voxels (links from other voxels to this voxel)
Definition at line 132 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
Indices of free available (empty) clusters (the number of clusters <= the number of voxels + 1)
Definition at line 133 of file code/include/algorithm/iRCPGSAlgorithm.hh.
|
private |
helper variable for the second sampling step, just to avoid allocating repeatedly >
Definition at line 139 of file code/include/algorithm/iRCPGSAlgorithm.hh.