SuPReMo  0.1.1
Loading...
Searching...
No Matches
MoCoRecon.h
1// ====================================================================================================
2//
3// SuPReMo: Surrogate Parameterised Respiratory Motion Model
4// An implementation of the generalised motion modelling and image registration framework
5//
6// Copyright (c) University College London (UCL). All rights reserved.
7//
8// This software is distributed WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10// PURPOSE.
11//
12// See LICENSE.txt in the top level directory for details.
13//
14// ====================================================================================================
15
16
17
18#pragma once
19
20//----------
21// includes
22//----------
23#include <memory>
24#include <vector>
25#include "nifti1_io.h"
26#include "SupremoUtils.h"
27
28
29
30//----------------------
31// forward declarations
32//----------------------
35
36
37
38
42{
43public:
44 typedef float PrecisionType;
45 typedef std::vector< std::vector<PrecisionType> > SurrogateSignalType;
46
49 MoCoRecon();
50
53 virtual ~MoCoRecon();
54
58 void SetCorrespondenceModel( const std::shared_ptr<CorrespondenceModel>& correspondenceModelIn );
59
63 void SetImageAcquisition( const std::shared_ptr<ImageAcquisition>& imageAcquisitionIn );
64
68 void SetSurrogateSignals( const SurrogateSignalType & surrSignalsIn );
69
73 void SetDynamicImages( const std::vector<nifti_image*>& dynamicImagesIn );
74
78 void SetReconstructionGeometryImage( nifti_image* reconstructionGeometryImageIn );
79
82 virtual void Update() = 0;
83
86 nifti_image* GetReconstructedImage();
87
88
94
98 void CopyReconstructedImageContentsToImage( nifti_image* destinationImage );
99
100protected:
104
108
109 std::shared_ptr<CorrespondenceModel> correspondenceModel;
110 std::shared_ptr<ImageAcquisition> imageAcquisition;
112 std::vector<nifti_image*> dynamicImages;
115 nifti_image* reconstructedImage;
118};
Definition: CorrespondenceModel.h:31
Definition: ImageAcquisition.h:25
Definition: MoCoRecon.h:42
PrecisionType paddingValue
The padding value used if no data available to reconstruct an image intensity value.
Definition: MoCoRecon.h:116
bool repeatedUpdateChangesMCRImage
Indicates wether a repeated call of the update function cahgnes the MCR result.
Definition: MoCoRecon.h:117
nifti_image * reconstructionGeometryImage
Pointer to the image that defines the reconstruction geometry, think of it as a reference image.
Definition: MoCoRecon.h:114
size_t numberOfDynamicImages
The number of the dynamic images - will be derived from the vector dynamicImages.
Definition: MoCoRecon.h:113
void CopyReconstructedImageContentsToImage(nifti_image *destinationImage)
Definition: MoCoRecon.cpp:124
void SetReconstructionGeometryImage(nifti_image *reconstructionGeometryImageIn)
Definition: MoCoRecon.cpp:102
nifti_image * reconstructedImage
Pointer to the reconstructed image.
Definition: MoCoRecon.h:115
std::vector< nifti_image * > dynamicImages
Vector holding the dynamic images.
Definition: MoCoRecon.h:112
bool GetRepeatedUpdateChangesMCR()
Definition: MoCoRecon.h:93
void SetSurrogateSignals(const SurrogateSignalType &surrSignalsIn)
Definition: MoCoRecon.cpp:79
std::shared_ptr< CorrespondenceModel > correspondenceModel
Pointer to the correspondence model.
Definition: MoCoRecon.h:109
void SetDynamicImages(const std::vector< nifti_image * > &dynamicImagesIn)
Definition: MoCoRecon.cpp:90
virtual ~MoCoRecon()
Definition: MoCoRecon.cpp:44
nifti_image * GetReconstructedImage()
Definition: MoCoRecon.cpp:113
void AllocateReconstructedImage()
Definition: MoCoRecon.cpp:152
void ClearReconstructedImage()
Definition: MoCoRecon.cpp:182
SurrogateSignalType surrogateSignals
Vector holding the surrogate signals.
Definition: MoCoRecon.h:111
std::vector< std::vector< PrecisionType > > SurrogateSignalType
Definition: MoCoRecon.h:45
float PrecisionType
Definition: MoCoRecon.h:44
void SetCorrespondenceModel(const std::shared_ptr< CorrespondenceModel > &correspondenceModelIn)
Definition: MoCoRecon.cpp:57
void SetImageAcquisition(const std::shared_ptr< ImageAcquisition > &imageAcquisitionIn)
Definition: MoCoRecon.cpp:68
MoCoRecon()
Definition: MoCoRecon.cpp:30
virtual void Update()=0
std::shared_ptr< ImageAcquisition > imageAcquisition
Pointer to the image acquisition opbject.
Definition: MoCoRecon.h:110