ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
itk::OptimizerParameters< TParametersValueType > Class Template Reference

#include <itkOptimizerParameters.h>

Detailed Description

template<typename TParametersValueType>
class itk::OptimizerParameters< TParametersValueType >

Class to hold and manage different parameter types used during optimization.

Definition at line 36 of file itkOptimizerParameters.h.

+ Inheritance diagram for itk::OptimizerParameters< TParametersValueType >:
+ Collaboration diagram for itk::OptimizerParameters< TParametersValueType >:

Public Types

using ArrayType = Superclass
 
using OptimizerParametersHelperType = OptimizerParametersHelper< TParametersValueType >
 
using Self = OptimizerParameters
 
using Superclass = Array< TParametersValueType >
 
using ValueType = TParametersValueType
 
using VnlVectorType = typename Superclass::VnlVectorType
 
- Public Types inherited from itk::Array< TParametersValueType >
using Self = Array
 
using SizeValueType = typename vnl_vector< TParametersValueType >::size_type
 
using ValueType = TParametersValueType
 
using VnlVectorType = vnl_vector< TParametersValueType >
 

Public Member Functions

OptimizerParametersHelperTypeGetHelper ()
 
void Initialize ()
 
Selfoperator= (const ArrayType &rhs)
 
Selfoperator= (const VnlVectorType &rhs)
 
 OptimizerParameters ()=default
 
 OptimizerParameters (const ArrayType &array)
 
 OptimizerParameters (const OptimizerParameters &rhs)
 
 OptimizerParameters (const SizeValueType dimension, const ValueType &value)
 
 OptimizerParameters (const ValueType *const inputData, const SizeValueType dimension)
 
 OptimizerParameters (SizeValueType dimension)
 
virtual void SetHelper (OptimizerParametersHelperType *helper)
 
 ~OptimizerParameters () override=default
 
virtual void MoveDataPointer (TParametersValueType *pointer)
 
virtual void SetParametersObject (LightObject *object)
 
Selfoperator= (const Self &rhs)
 
- Public Member Functions inherited from itk::Array< TParametersValueType >
 Array ()=default
 
 Array (const Array &)
 
 Array (const ValueType *datain, SizeValueType sz)
 
 Array (const VnlVectorType &)
 
 Array (SizeValueType dimension)
 
 Array (SizeValueType dimension, const ValueType &value)
 
 Array (ValueType *datain, SizeValueType sz, bool LetArrayManageMemory=false)
 
void Fill (const TParametersValueType &v)
 
const TParametersValueType & GetElement (SizeValueType i) const
 
SizeValueType GetSize () const
 
Selfoperator= (const Self &rhs)
 
Selfoperator= (const VnlVectorType &rhs)
 
void SetData (TParametersValueType *datain, SizeValueType sz, bool LetArrayManageMemory=false)
 
void SetDataSameSize (TParametersValueType *datain, bool LetArrayManageMemory=false)
 
void SetElement (SizeValueType i, const TParametersValueType &value)
 
void SetSize (SizeValueType sz)
 
void Swap (Array &other) noexcept
 
 ~Array () override
 
 Array (const Array< TArrayValue > &r)
 
SizeValueType Size () const
 
unsigned int GetNumberOfElements () const
 

Private Attributes

std::unique_ptr< OptimizerParametersHelperTypem_Helper { std::make_unique<OptimizerParametersHelperType>() }
 

Member Typedef Documentation

◆ ArrayType

template<typename TParametersValueType>
using itk::OptimizerParameters< TParametersValueType >::ArrayType = Superclass

Definition at line 43 of file itkOptimizerParameters.h.

◆ OptimizerParametersHelperType

template<typename TParametersValueType>
using itk::OptimizerParameters< TParametersValueType >::OptimizerParametersHelperType = OptimizerParametersHelper<TParametersValueType>

Helper class for managing different types of parameter data.

Definition at line 49 of file itkOptimizerParameters.h.

◆ Self

template<typename TParametersValueType>
using itk::OptimizerParameters< TParametersValueType >::Self = OptimizerParameters

Definition at line 41 of file itkOptimizerParameters.h.

◆ Superclass

template<typename TParametersValueType>
using itk::OptimizerParameters< TParametersValueType >::Superclass = Array<TParametersValueType>

Definition at line 42 of file itkOptimizerParameters.h.

◆ ValueType

template<typename TParametersValueType>
using itk::OptimizerParameters< TParametersValueType >::ValueType = TParametersValueType

The element type stored at each location in the Array.

Definition at line 40 of file itkOptimizerParameters.h.

◆ VnlVectorType

template<typename TParametersValueType>
using itk::OptimizerParameters< TParametersValueType >::VnlVectorType = typename Superclass::VnlVectorType

Definition at line 44 of file itkOptimizerParameters.h.

Constructor & Destructor Documentation

◆ OptimizerParameters() [1/6]

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::OptimizerParameters ( )
default

Default constructor. It is created with an empty array it has to be allocated later by assignment

◆ OptimizerParameters() [2/6]

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::OptimizerParameters ( const OptimizerParameters< TParametersValueType > &  rhs)
inline

Copy constructor. Uses VNL copy constructor with correct setting for memory management. The vnl vector copy constructor creates new memory no matter the setting of let array manage memory of rhs.

Definition at line 60 of file itkOptimizerParameters.h.

◆ OptimizerParameters() [3/6]

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::OptimizerParameters ( SizeValueType  dimension)
inlineexplicit

Constructor with size. Size can only be changed by assignment.

Note
This constructor may not initialize its elements.

Definition at line 73 of file itkOptimizerParameters.h.

◆ OptimizerParameters() [4/6]

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::OptimizerParameters ( const ArrayType array)
inline

Constructor with Array assignment

Definition at line 78 of file itkOptimizerParameters.h.

◆ OptimizerParameters() [5/6]

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::OptimizerParameters ( const SizeValueType  dimension,
const ValueType value 
)
inlineexplicit

Constructor with size and initial value for each element.

Definition at line 83 of file itkOptimizerParameters.h.

◆ OptimizerParameters() [6/6]

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::OptimizerParameters ( const ValueType *const  inputData,
const SizeValueType  dimension 
)
inlineexplicit

Constructor with input data and size (number of elements).

Definition at line 89 of file itkOptimizerParameters.h.

◆ ~OptimizerParameters()

template<typename TParametersValueType>
itk::OptimizerParameters< TParametersValueType >::~OptimizerParameters ( )
overridedefault

Member Function Documentation

◆ GetHelper()

template<typename TParametersValueType>
OptimizerParametersHelperType* itk::OptimizerParameters< TParametersValueType >::GetHelper ( )
inline

Get the helper in use.

Definition at line 149 of file itkOptimizerParameters.h.

◆ Initialize()

template<typename TParametersValueType>
void itk::OptimizerParameters< TParametersValueType >::Initialize ( )
inline

Initialize. Initialization called by constructors.

Definition at line 96 of file itkOptimizerParameters.h.

◆ MoveDataPointer()

template<typename TParametersValueType>
virtual void itk::OptimizerParameters< TParametersValueType >::MoveDataPointer ( TParametersValueType *  pointer)
inlinevirtual

Set a new data pointer for the parameter data, pointing it to a different memory block. The size of the new memory block must equal the current size, in elements of TParametersValueType. This call is passed to the assigned OptimizerParametersHelper.

Warning
Memory must be managed by caller after this call.

Definition at line 109 of file itkOptimizerParameters.h.

◆ operator=() [1/3]

template<typename TParametersValueType>
Self& itk::OptimizerParameters< TParametersValueType >::operator= ( const ArrayType rhs)
inline

Definition at line 170 of file itkOptimizerParameters.h.

◆ operator=() [2/3]

template<typename TParametersValueType>
Self& itk::OptimizerParameters< TParametersValueType >::operator= ( const Self rhs)
inline

Copy operators

TODO Determine behavior when copying from obj pointing to image parameters.
 By default should copy image param data into Array portion of new object,
 i.e. into data_block. Is that what we want? 

Definition at line 160 of file itkOptimizerParameters.h.

◆ operator=() [3/3]

template<typename TParametersValueType>
Self& itk::OptimizerParameters< TParametersValueType >::operator= ( const VnlVectorType rhs)
inline

Definition at line 178 of file itkOptimizerParameters.h.

◆ SetHelper()

template<typename TParametersValueType>
virtual void itk::OptimizerParameters< TParametersValueType >::SetHelper ( OptimizerParametersHelperType helper)
inlinevirtual

Assign a helper. OptimizerParameters manages the helper once its been assigned. The generic helper, OptimizerParametersHelper, is set in constructor. Classes that need a specialized helper should allocate one themselves and assign it with this method.

Definition at line 142 of file itkOptimizerParameters.h.

◆ SetParametersObject()

template<typename TParametersValueType>
virtual void itk::OptimizerParameters< TParametersValueType >::SetParametersObject ( LightObject object)
inlinevirtual

Set an object that holds the parameters. Used by the helper of derived classes that use an object other than itkArray to hold parameter data. The helper class must check that the object is the correct type. The call is passed to the assigned OptimizerParametersHelper.

Definition at line 125 of file itkOptimizerParameters.h.

Member Data Documentation

◆ m_Helper

template<typename TParametersValueType>
std::unique_ptr<OptimizerParametersHelperType> itk::OptimizerParameters< TParametersValueType >::m_Helper { std::make_unique<OptimizerParametersHelperType>() }
private

Definition at line 188 of file itkOptimizerParameters.h.


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