18 #ifndef itkImageRegistrationMethodv4_h 19 #define itkImageRegistrationMethodv4_h 89 template<
typename TFixedImage,
90 typename TMovingImage,
91 typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>,
92 typename TVirtualImage = TFixedImage,
93 typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension> >
108 itkStaticConstMacro(
ImageDimension,
unsigned int, TFixedImage::ImageDimension );
128 typedef typename OutputTransformType::ScalarType
RealType;
246 itkSetObjectMacro(
Optimizer, OptimizerType );
247 itkGetModifiableObjectMacro(
Optimizer, OptimizerType );
259 itkGetConstMacro( OptimizerWeights, OptimizerWeightsType );
263 itkSetObjectMacro( Metric, MetricType );
264 itkGetModifiableObjectMacro( Metric, MetricType );
276 itkSetMacro( MetricSamplingPercentagePerLevel, MetricSamplingPercentageArrayType );
277 itkGetConstMacro( MetricSamplingPercentagePerLevel, MetricSamplingPercentageArrayType );
281 itkSetGetDecoratedObjectInputMacro( FixedInitialTransform, InitialTransformType );
284 itkSetGetDecoratedObjectInputMacro( MovingInitialTransform, InitialTransformType );
301 itkSetGetDecoratedObjectInputMacro(InitialTransform, InitialTransformType);
328 for(
unsigned int level = 0; level < factors.
Size(); ++level )
330 ShrinkFactorsPerDimensionContainerType shrinkFactors;
331 shrinkFactors.
Fill( factors[level] );
344 itkExceptionMacro(
"Requesting level greater than the number of levels." );
369 itkSetMacro( SmoothingSigmasPerLevel, SmoothingSigmasArrayType );
370 itkGetConstMacro( SmoothingSigmasPerLevel, SmoothingSigmasArrayType );
377 itkSetMacro( SmoothingSigmasAreSpecifiedInPhysicalUnits,
bool );
378 itkGetConstMacro( SmoothingSigmasAreSpecifiedInPhysicalUnits,
bool );
379 itkBooleanMacro( SmoothingSigmasAreSpecifiedInPhysicalUnits );
388 virtual DecoratedOutputTransformType *
GetOutput();
389 virtual const DecoratedOutputTransformType * GetOutput() const;
396 virtual const OutputTransformType *
GetTransform()
const;
402 itkGetConstReferenceMacro( CurrentIteration,
SizeValueType );
405 itkGetConstReferenceMacro( CurrentMetricValue, RealType );
408 itkGetConstReferenceMacro( CurrentConvergenceValue, RealType );
411 itkGetConstReferenceMacro( IsConverged,
bool );
416 itkSetMacro( InPlace,
bool );
417 itkGetConstMacro( InPlace,
bool );
418 itkBooleanMacro( InPlace );
445 #ifdef ITKV3_COMPATIBILITY 461 void StartRegistration(
void) { this->
Update(); }
467 virtual void PrintSelf( std::ostream & os,
Indent indent )
const ITK_OVERRIDE;
524 void operator=( const Self & ) ITK_DELETE_FUNCTION;
531 template<typename TTransform>
534 ptr = TTransform::New();
545 #ifndef ITK_MANUAL_INSTANTIATION 546 #include "itkImageRegistrationMethodv4.hxx" virtual void Update()
Bring this filter up-to-date.
virtual OutputTransformType * GetModifiableTransform()
Array< SizeValueType > ShrinkFactorsArrayType
SizeValueType m_NumberOfLevels
FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Transform< RealType, ImageDimension, ImageDimension > InitialTransformType
SizeValueType m_CurrentIteration
ImageMetricType::FixedSampledPointSetType MetricSamplePointSetType
virtual DecoratedOutputTransformType * GetTransformOutput()
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
virtual void SetMovingImage(const MovingImageType *image)
virtual void SetMovingPointSet(const PointSetType *pointSet)
VirtualImagePointer m_VirtualDomainImage
RealType m_CurrentConvergenceValue
MovingImageMasksContainerType m_MovingImageMasks
DerivativeType::ValueType DerivativeValueType
This class takes one ore more ObjectToObject metrics and assigns weights to their derivatives to comp...
TMovingImage MovingImageType
void InitializeCenterOfLinearOutputTransform()
virtual const PointSetType * GetFixedPointSet() const
bool m_InitializeCenterOfLinearOutputTransform
ShrinkFilterType::ShrinkFactorsType ShrinkFactorsPerDimensionContainerType
TVirtualImage VirtualImageType
OutputTransformPointer m_OutputTransform
Computes similarity between two point sets.
FixedImageType::Pointer FixedImagePointer
Array< RealType > SmoothingSigmasArrayType
Array< RealType > MetricSamplingPercentageArrayType
MovingImageType::Pointer MovingImagePointer
bool m_SmoothingSigmasAreSpecifiedInPhysicalUnits
TransformParametersAdaptorType::Pointer TransformParametersAdaptorPointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
RealType m_CurrentMetricValue
MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
DecoratedInitialTransformType::Pointer DecoratedInitialTransformPointer
CompositeTransformType::Pointer CompositeTransformPointer
ImageMetricType::FixedImageMaskType FixedImageMaskType
ObjectType * GetPointer() const
SizeValueType m_NumberOfMovingObjects
Vector< RealType, ImageDimension > VectorType
Base class for all object-to-object similarlity metrics added in ITKv4.
unsigned long SizeValueType
SmartPointer< Self > Pointer
void Fill(const ValueType &)
static const unsigned int ImageDimension
std::vector< ShrinkFactorsPerDimensionContainerType > m_ShrinkFactorsPerLevel
void SetShrinkFactorsPerLevel(ShrinkFactorsArrayType factors)
virtual void PrintSelf(std::ostream &os, Indent indent) const override
ImageRegistrationMethodv4()
OptimizerPointer m_Optimizer
MetricSamplingPercentageArrayType m_MetricSamplingPercentagePerLevel
std::vector< MovingImageMaskConstPointer > MovingImageMasksContainerType
ImageToImageMetricv4< FixedImageType, MovingImageType, VirtualImageType, RealType > ImageMetricType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override
Make a DataObject of the correct type to used as the specified output.
void SetMetricSamplingPercentage(const RealType)
virtual void SetFixedPointSet(const PointSetType *pointSet)
virtual void GenerateData() override
OptimizerWeightsType m_OptimizerWeights
MovingImagesContainerType m_MovingSmoothImages
virtual void SetMetricSamplePoints()
PointSetsContainerType m_MovingPointSets
static void MakeOutputTransform(SmartPointer< TTransform > &ptr)
ShrinkFactorsPerDimensionContainerType GetShrinkFactorsPerDimension(const unsigned int level) const
bool m_OptimizerWeightsAreIdentity
A templated class holding a n-Dimensional vector.
std::vector< FixedImageMaskConstPointer > FixedImageMasksContainerType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
ImageRegistrationMethodv4 Self
virtual void InitializeRegistrationAtEachLevel(const SizeValueType)
TOutputTransform OutputTransformType
virtual const FixedImageType * GetFixedImage() const
std::vector< TransformParametersAdaptorPointer > TransformParametersAdaptorsContainerType
MetricSamplingStrategyType
ImageMetricType::MovingImageMaskType MovingImageMaskType
Decorates any subclass of itkObject with a DataObject API.
static void MakeOutputTransform(SmartPointer< InitialTransformType > &ptr)
Implementation of the composite pattern.
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
InitialTransformType::Pointer InitialTransformPointer
Generic representation for an optimization method.
OptimizerType::ScalesType OptimizerWeightsType
DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
void SetOptimizerWeights(OptimizerWeightsType &)
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
ObjectToObjectOptimizerBaseTemplate< RealType > OptimizerType
PointSetsContainerType m_FixedPointSets
virtual ~ImageRegistrationMethodv4()
void SetTransformParametersAdaptorsPerLevel(TransformParametersAdaptorsContainerType &)
OutputTransformType::DerivativeType DerivativeType
virtual void Modified() const
MetricType::Pointer MetricPointer
TransformParametersAdaptorsContainerType m_TransformParametersAdaptorsPerLevel
CompositeTransformPointer m_CompositeTransform
virtual void SetFixedImage(const FixedImageType *image)
void SetShrinkFactorsPerDimension(unsigned int level, ShrinkFactorsPerDimensionContainerType factors)
PointSetType::ConstPointer PointSetConstPointer
TransformParametersAdaptorBase< InitialTransformType > TransformParametersAdaptorType
std::vector< MovingImagePointer > MovingImagesContainerType
SizeValueType m_NumberOfMetrics
ObjectToObjectMetricBaseTemplate< RealType > MetricType
MetricSamplingStrategyType m_MetricSamplingStrategy
Base class for templated image classes.
const TransformParametersAdaptorsContainerType & GetTransformParametersAdaptorsPerLevel() const
SizeValueType m_NumberOfFixedObjects
DataObjectDecorator< InitialTransformType > DecoratedInitialTransformType
virtual const DecoratedOutputTransformType * GetTransformOutput() const
int m_FirstImageMetricIndex
DataObjectDecorator< OutputTransformType > DecoratedOutputTransformType
ShrinkImageFilter< FixedImageType, VirtualImageType > ShrinkFilterType
Control indentation during Print() invocation.
Reduce the size of an image by an integer factor in each dimension.
SmartPointer< const Self > ConstPointer
SmoothingSigmasArrayType m_SmoothingSigmasPerLevel
SizeValueType Size(void) const
virtual const PointSetType * GetMovingPointSet() const
std::vector< FixedImagePointer > FixedImagesContainerType
VirtualImageBaseType::ConstPointer VirtualImageBaseConstPointer
FixedImageMasksContainerType m_FixedImageMasks
SizeValueType m_CurrentLevel
OptimizerType::Pointer OptimizerPointer
Interface method for the current registration framework.
virtual DecoratedOutputTransformType * GetOutput()
PointSetToPointSetMetricv4< PointSetType, PointSetType, RealType > PointSetMetricType
Abstract base for object-to-object optimizers.
CompositeTransform< RealType, ImageDimension > CompositeTransformType
void SetNumberOfLevels(const SizeValueType)
FixedImagesContainerType m_FixedSmoothImages
OutputTransformType::ScalarType RealType
std::vector< PointSetConstPointer > PointSetsContainerType
OutputTransformType::Pointer OutputTransformPointer
ObjectToObjectMultiMetricv4< ImageDimension, ImageDimension, VirtualImageType, RealType > MultiMetricType
ImageBase< ImageDimension > VirtualImageBaseType
virtual const MovingImageType * GetMovingImage() const
virtual const OutputTransformType * GetTransform() const
VirtualImageType::Pointer VirtualImagePointer
virtual void AllocateOutputs()
virtual VirtualImageBaseConstPointer GetCurrentLevelVirtualDomainImage()
TFixedImage FixedImageType