24#include "ImagePyramid.h"
25#include "ImageSimilarity.h"
26#include "SSDImageSimilarity.h"
27#include "CorrespondenceModel.h"
28#include "Transformation.h"
29#include "BSplineTransformation.h"
30#include "SlidingTransformation.h"
32#include "ObjectiveFunction.h"
34#include "ConjugateGradientOptimiser.h"
35#include "ImageAcquisition.h"
36#include "NoImageAcquisition.h"
37#include "LowResolutionImageAcquisition.h"
43inline void supremo_exit(
int Val,
const char* fileName,
int lineNumber)
45 fprintf(stderr,
"[Supremo] Exit here. File: %s:%i\n", fileName, lineNumber);
49inline void supremo_print_debug(
const char* message){ printf(
"[Supremo DEBUG] Message: %s\n", message); };
50inline void supremo_print_warning(
const char* message){ printf(
"[Supremo WARNING] Message: %s\n", message); };
51inline void supremo_print_error(
const char* message){ fprintf(stderr,
"[Supremo ERROR] Message: %s\n", message); };
78 void SetDynamicImages(nifti_image** dynamicImagesIn,
int numberOfDynamicImagesIn);
Definition: CorrespondenceModel.h:31
nifti_image ** allDynamicImages
Pointer to all dynamic nifti images available.
Definition: Supremo.h:258
std::vector< nifti_image * > GenerateDVFsFromCorrespondenceModel()
Definition: Supremo.cpp:538
unsigned int currentLevel
The current level that is being processed.
Definition: Supremo.h:273
void SetMaxModelFittingIterationNumber(unsigned int maxModelFittingIterations)
Definition: Supremo.h:179
std::shared_ptr< MoCoRecon > mocoReconstructor
The motion-compensated image reconstruction object.
Definition: Supremo.h:300
std::shared_ptr< ImageSimilarity > similarityMeasure
Pointer to the image similarity measure used.
Definition: Supremo.h:298
Supremo()
Definition: Supremo.cpp:37
std::string outputInterGradientFolder
Folder to which intermediate objective function gradients will be saved.
Definition: Supremo.h:285
void SetInputRCMImages(const std::vector< nifti_image * > &inputRCMImgs)
Definition: Supremo.h:199
float slidingGapOverlapConstraintWeight
The weight with which the gaps and overlaps will be constrained.
Definition: Supremo.h:282
void SetBSplineCPGSpacing(float sx, float sy, float sz)
Definition: Supremo.cpp:213
void SetMaxSwitchIterationNumber(unsigned int maxSwitchIterations)
Definition: Supremo.h:189
float bSplineBendingEnergyWeight
Bending energy weight to constrain a b-spline transformation.
Definition: Supremo.h:278
void SetNumberOfPyramidLevels(unsigned int numberOfLevelsIn)
Definition: Supremo.h:163
float VoxelType
Definition: Supremo.h:61
float bSplineLinearEnergyWeight
Linear energy weight to constrain a b-spline transformation.
Definition: Supremo.h:279
std::vector< nifti_image * > inputRCMImages
The vector holding the pointer to the respiratory correspondence model images. Will be used as a star...
Definition: Supremo.h:266
nifti_image * referenceStateImage
Pointer to the reference state image .
Definition: Supremo.h:259
void SaveInterMCRToImage(nifti_image *mcrImage)
Definition: Supremo.cpp:849
std::vector< nifti_image * > GetCorrespondenceModelAsImage()
Definition: Supremo.cpp:443
void Initialise()
Definition: Supremo.cpp:588
nifti_image * finalMoCoReconImage
Pointer holding the final motion-compensated reconstruction image after fit and reconstruct.
Definition: Supremo.h:260
void SetInterMCROutputFolder(const std::string &outputFolder)
Definition: Supremo.cpp:179
void SetDynamicImages(nifti_image **dynamicImagesIn, int numberOfDynamicImagesIn)
Definition: Supremo.cpp:89
void SetInterGradOutputFolder(const std::string &outputFolder)
Definition: Supremo.cpp:190
nifti_image * currentReferenceStateImage
Definition: Supremo.h:294
nifti_image * GetMotionCompensatedReconstructedImage()
Definition: Supremo.h:216
std::string levelID
String holding an ID to differentiate file output from various multi-resolution levels and MCR iterat...
Definition: Supremo.h:302
t_transformationType transformationType
The transformation type used to deform the reference-state image.
Definition: Supremo.h:275
std::vector< std::shared_ptr< ImagePyramid< VoxelType > > > allDynamicPyramids
Vector of pointers holding all the dynamic image pyramids.
Definition: Supremo.h:291
void DisplayCurrentLevelParameters(unsigned int level)
Definition: Supremo.cpp:789
std::vector< std::vector< float > > surrogateSignals
Vector of vector containing the the surrogate signals. First index for time point,...
Definition: Supremo.h:262
nifti_image * slidingSignedDistanceMapImage
Image required by the sliding transformation to determine the regions involved.
Definition: Supremo.h:281
void SetBSplineBendingEnergy(float be)
Definition: Supremo.cpp:226
std::shared_ptr< Transformation > transform
Pointer to the transformation used (e.g. b-spline)
Definition: Supremo.h:296
void FitMotionModelAndReconstruct()
Definition: Supremo.cpp:273
void SetReferenceStateImage(nifti_image *referenceStateImageIn)
Definition: Supremo.cpp:102
void SetMotionCompensatedReconstruction(std::shared_ptr< MoCoRecon > mocoReconstructionIn)
Definition: Supremo.cpp:167
void CheckParameters()
Definition: Supremo.cpp:695
std::string outputInterMCRFolder
Folder to which intermediate MCRs will be saved.
Definition: Supremo.h:284
std::vector< nifti_image * > SimulateDynamicImages()
Definition: Supremo.cpp:471
unsigned int maxModelFitIterationNumber
Maximum number of respiratory correspondence model fitting iterations.
Definition: Supremo.h:269
float bSplineCPGSpacing[3]
B-spline control point spacing (used if b-spline transformation is used)
Definition: Supremo.h:277
void SetSlidingGapOverlapConstraintWeight(float gapOverlapConstraintWeightIn)
Definition: Supremo.cpp:250
std::shared_ptr< ImagePyramid< VoxelType > > referenceStatePyramid
Pointer holding the reference state image pyramid.
Definition: Supremo.h:290
void SetSurrogateSignals(float *surrogateSignalsIn, int numberOfSurrogateSignalsIn)
Definition: Supremo.cpp:125
void SetBSplineLinearEnergy(float le)
Definition: Supremo.cpp:238
void SetDefSpaceImage(nifti_image *defSpaceImageIn)
Definition: Supremo.cpp:114
unsigned int numberOfLevels
The total number of levels.
Definition: Supremo.h:271
~Supremo()
Definition: Supremo.cpp:77
bool initialised
Control parameter indicating if the fit-and-reconstruct method was initialised.
Definition: Supremo.h:287
unsigned int numberOfSurrogateSignals
Number of surrogate signals (per dynamic image)
Definition: Supremo.h:255
void SetSlidingTrafoDistanceMap(nifti_image *slidingTrafoDistanceMapIn)
Definition: Supremo.cpp:262
void SetImageAcquisition(std::shared_ptr< ImageAcquisition > imageAcquisitionIn)
Definition: Supremo.cpp:156
std::shared_ptr< ImageAcquisition > imageAcquisition
Pointer to the image acquisition used.
Definition: Supremo.h:299
void SetNumberOfPyramidLevelsToPerform(unsigned int numberOfLevelsToPerformIn)
Definition: Supremo.h:171
std::shared_ptr< CorrespondenceModel > correspondenceModel
Pointer to the correspondence model.
Definition: Supremo.h:297
nifti_image * defSpaceImage
Pointer to image that defines the space of the deformed images.
Definition: Supremo.h:264
unsigned int numberOfDynamicImages
Total number of dynamic images.
Definition: Supremo.h:256
unsigned int numberOfLevelsToPerform
The number of levels that are used in the fitting/reconstruction process.
Definition: Supremo.h:272
void SetTransformationType(t_transformationType transformationTypeIn)
Definition: Supremo.cpp:202
unsigned int maxSwitchIterationNumber
Maximum number of times to iterate between motion compensated reconstruction and fitting the respirat...
Definition: Supremo.h:268