SuPReMo  0.1.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CorrespondenceModel Class Reference

#include <CorrespondenceModel.h>

Public Types

typedef float PrecisionType
 
typedef std::vector< PrecisionTypeSurrogateSignalType
 

Public Member Functions

 CorrespondenceModel (unsigned int numberOfSurrogateSignalsIn, std::shared_ptr< Transformation > transformationIn)
 
 ~CorrespondenceModel ()
 
std::shared_ptr< TransformationGetTransformationFromSurrogateSignal (const SurrogateSignalType &surrogateSignalIn)
 
PrecisionTypeGetParameters ()
 
void SetParameters (const PrecisionType *parametersIn)
 
void SetParameters (const std::vector< nifti_image * > &parameterImagesIn)
 
PrecisionType GetMaxParameterLength (PrecisionType *parametersIn)
 
unsigned int GetNumberOfParameters ()
 
void GetTransformationParameterGradientWRTModelParameters (PrecisionType *transformationGradientIn, const SurrogateSignalType &surrogateSignalIn, PrecisionType *correspondenceModelGradientOut)
 
void InitialiseLevel (unsigned int levelIn)
 
std::shared_ptr< TransformationGetTransformation ()
 
std::vector< nifti_image * > GetCorrespondenceModelAsImage ()
 
void SaveCurrentModelParametersForRecovery ()
 
void RecoverSavedModelParameters ()
 

Private Member Functions

void ClearRecoveryModelParameters ()
 

Private Attributes

unsigned int numberOfSurrogateSignals
 The number of surrogate signals used. More...
 
unsigned int numberOfTransformationParameters
 The number of parameters to describe the transformation completely. More...
 
unsigned int numberOfModelParameters
 The total number of parameters describing the correspondence model. More...
 
std::shared_ptr< Transformationtransform
 The internal transformation object that is used to construct a transformation (copy) from a surrogate signal. More...
 
PrecisionTypemodelParameters
 Pointer to the model parameters. More...
 
PrecisionTyperecoveryModelParameters
 Pointer to model parameters that may be recovered. More...
 

Detailed Description

Class implementing the (respiratory) correspondence model.

Member Typedef Documentation

◆ PrecisionType

◆ SurrogateSignalType

Constructor & Destructor Documentation

◆ CorrespondenceModel()

CorrespondenceModel::CorrespondenceModel ( unsigned int  numberOfSurrogateSignalsIn,
std::shared_ptr< Transformation transformationIn 
)

Constructor.

Parameters
numberOfSurrogateSignalsInThe number of surrogate signals for this correspondence model.
transformationInThe base transformation that is internally used to generate a transformation from input surrogate signals

◆ ~CorrespondenceModel()

CorrespondenceModel::~CorrespondenceModel ( )

Destructor.

Member Function Documentation

◆ ClearRecoveryModelParameters()

void CorrespondenceModel::ClearRecoveryModelParameters ( )
private

Free the memory allocated to store the recovery model parameters and set the corresponding pointer to null.

◆ GetCorrespondenceModelAsImage()

std::vector< nifti_image * > CorrespondenceModel::GetCorrespondenceModelAsImage ( )

Generates a vector with nifti images which can be saved. The data of the images will be allocated for the images, so they are detached from the internal representation of the correspondence model. The transformations can have multiple images so each image returned by this function reflects the number of images of the underlying transformation.

◆ GetMaxParameterLength()

CorrespondenceModel::PrecisionType CorrespondenceModel::GetMaxParameterLength ( PrecisionType parametersIn)

Function used to calculate the gradient length, which in turn is used to normalise the gradient of the objective function. The correspondence model class defines the relationship between the respiratory correspondence model parameters and the transformation parameters. This is dependent on the number of surrogate signals. The maximum transformation parameter length will be calculated by the member transformation.

◆ GetNumberOfParameters()

unsigned int CorrespondenceModel::GetNumberOfParameters ( )
inline

Get the number of parameters.

◆ GetParameters()

CorrespondenceModel::PrecisionType * CorrespondenceModel::GetParameters ( )

Get access to the current parameters. A pointer to \( \mathbf{R} \) is returned.

◆ GetTransformation()

std::shared_ptr< Transformation > CorrespondenceModel::GetTransformation ( )

Get a pointer to the transformation. Allow other objects, such as the ObjectiveFunction to use methods provided by the transformation

◆ GetTransformationFromSurrogateSignal()

std::shared_ptr< Transformation > CorrespondenceModel::GetTransformationFromSurrogateSignal ( const SurrogateSignalType surrogateSignalIn)

Calculate the transformation parameters for a given surrogate signal on the basis of the current model parameters. \( \mathbf{M}_t(\mathbf{S}_t) \).

Parameters
surrogateSignalInPointer to the surrogate values \( \mathbf{S}_t \). Get a transformatinon object corresponding to a surrogate signal. Checks the size of the surrogate signal.

◆ GetTransformationParameterGradientWRTModelParameters()

void CorrespondenceModel::GetTransformationParameterGradientWRTModelParameters ( CorrespondenceModel::PrecisionType transformationGradientIn,
const SurrogateSignalType surrogateSignalIn,
CorrespondenceModel::PrecisionType correspondenceModelGradientOut 
)

Get the gradient of the transformation parametres with respect to the model parametres. This function implements \( \frac{\partial \mathbf{M}_t }{\partial \mathbf{R} } \). Adds calculates the correspondence model gradient

◆ InitialiseLevel()

void CorrespondenceModel::InitialiseLevel ( unsigned int  levelIn)

Initialise the given level. The transformation will be used to upsample the model parameters.

◆ RecoverSavedModelParameters()

void CorrespondenceModel::RecoverSavedModelParameters ( )

Recover correspondence model parameters that were previously saved. Parameters for recovery have to be saved previously using CorrespondenceModel::SaveCurrentModelParametersForRecovery().

◆ SaveCurrentModelParametersForRecovery()

void CorrespondenceModel::SaveCurrentModelParametersForRecovery ( )

Save the current model parameters to an internal variable such that they can be recovered if necessary by CorrespondenceModel::RecoverSavedModelParameters().

◆ SetParameters() [1/2]

void CorrespondenceModel::SetParameters ( const PrecisionType parametersIn)

Set the current parameters. The internal data of \( \mathbf{R} \) will be updated (i.e. copied).

◆ SetParameters() [2/2]

void CorrespondenceModel::SetParameters ( const std::vector< nifti_image * > &  parameterImagesIn)

Set the current parameters from the given input images. This function takes the image intensity and sets it as the correspondence model parameters. At the moment only the total number of parameters is tested.

Parameters
parameterImagesInVectore with images holding the correspondence model parameters.

Member Data Documentation

◆ modelParameters

PrecisionType* CorrespondenceModel::modelParameters
private

Pointer to the model parameters.

◆ numberOfModelParameters

unsigned int CorrespondenceModel::numberOfModelParameters
private

The total number of parameters describing the correspondence model.

◆ numberOfSurrogateSignals

unsigned int CorrespondenceModel::numberOfSurrogateSignals
private

The number of surrogate signals used.

◆ numberOfTransformationParameters

unsigned int CorrespondenceModel::numberOfTransformationParameters
private

The number of parameters to describe the transformation completely.

◆ recoveryModelParameters

PrecisionType* CorrespondenceModel::recoveryModelParameters
private

Pointer to model parameters that may be recovered.

◆ transform

std::shared_ptr<Transformation> CorrespondenceModel::transform
private

The internal transformation object that is used to construct a transformation (copy) from a surrogate signal.


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