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;
257 itkGetModifiableObjectMacro( Metric,
MetricType );
321 for(
unsigned int level = 0; level < factors.
Size(); ++level )
324 shrinkFactors.
Fill( factors[level] );
337 itkExceptionMacro(
"Requesting level greater than the number of levels." );
370 itkSetMacro( SmoothingSigmasAreSpecifiedInPhysicalUnits,
bool );
371 itkGetConstMacro( SmoothingSigmasAreSpecifiedInPhysicalUnits,
bool );
372 itkBooleanMacro( SmoothingSigmasAreSpecifiedInPhysicalUnits );
395 itkGetConstReferenceMacro( CurrentIteration,
SizeValueType );
398 itkGetConstReferenceMacro( CurrentMetricValue,
RealType );
401 itkGetConstReferenceMacro( CurrentConvergenceValue,
RealType );
404 itkGetConstReferenceMacro( IsConverged,
bool );
409 itkSetMacro( InPlace,
bool );
410 itkGetConstMacro( InPlace,
bool );
411 itkBooleanMacro( InPlace );
438 #ifdef ITKV3_COMPATIBILITY
454 void StartRegistration(
void) { this->
Update(); }
460 virtual void PrintSelf( std::ostream & os, Indent indent )
const ITK_OVERRIDE;
515 void operator=( const Self & );
522 template<typename TTransform>
525 ptr = TTransform::New();
536 #ifndef ITK_MANUAL_INSTANTIATION
537 #include "itkImageRegistrationMethodv4.hxx"
virtual void Update()
Bring this filter up-to-date.
virtual OutputTransformType * GetModifiableTransform()
Array< SizeValueType > ShrinkFactorsArrayType
SizeValueType m_NumberOfLevels
Transform< RealType, ImageDimension, ImageDimension > InitialTransformType
SizeValueType m_CurrentIteration
ImageMetricType::FixedSampledPointSetType MetricSamplePointSetType
Light weight base class for most itk classes.
virtual DecoratedOutputTransformType * GetTransformOutput()
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
virtual void SetMovingImage(const MovingImageType *image)
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetMovingPointSet(const PointSetType *pointSet)
VirtualImagePointer m_VirtualDomainImage
RealType m_CurrentConvergenceValue
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...
RealType m_CurrentMetricValue
DecoratedInitialTransformType::Pointer DecoratedInitialTransformPointer
CompositeTransformType::Pointer CompositeTransformPointer
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)
ImageRegistrationMethodv4()
OptimizerPointer m_Optimizer
MetricSamplingPercentageArrayType m_MetricSamplingPercentagePerLevel
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.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
ImageRegistrationMethodv4 Self
virtual void InitializeRegistrationAtEachLevel(const SizeValueType)
TOutputTransform OutputTransformType
virtual const FixedImageType * GetFixedImage() const
std::vector< TransformParametersAdaptorPointer > TransformParametersAdaptorsContainerType
MetricSamplingStrategyType
Decorates any subclass of itkObject with a DataObject API.
static void MakeOutputTransform(SmartPointer< InitialTransformType > &ptr)
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
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
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