template<typename TFixedImage, typename TMovingImage, typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
class itk::ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet >
Interface method for the current registration framework.
This interface method class encapsulates typical registration usage by incorporating all the necessary elements for performing a simple image registration between two images. This method also allows for multistage registration whereby each stage is characterize by possibly different transforms of and different image metrics. For example, many users will want to perform a linear registration followed by deformable registration where both stages are performed in multiple levels. Each level can be characterized by:
- the resolution of the virtual domain image (see below)
- smoothing of the fixed and moving images
- the coarseness of the current transform via transform adaptors (see below)
Multiple stages are handled by linking multiple instantiations of this class where the output transform is added to the optional composite transform input.
Transform adaptors: To accommodate new changes to the current ITK registration framework, we introduced the concept of transform adaptors. Whereas each stage is associated with a moving and, possibly, fixed transform, each level of each stage is defined by a transform adaptor which describes how to adapt the transform to the current level. For example, if one were to use the B-spline transform during a deformable registration stage, common practice is to increase the resolution of the B-spline mesh (or, analogously, the control point grid size) at each level. At each level, one would define the parameters of the B-spline transform adaptor at that level which increases the resolution from the previous level. For many transforms, such as affine, this concept of an adaptor may be nonsensical. For this reason, the base transform adaptor class does not do anything to the transform but merely passes it through. Each level of each stage must define a transform adaptor but, by default, the base adaptor class is assigned which, again, does not do anything to the transform. A special mention should be made of the transform adaptor at level 0 of any stage. Most likely, the user will not want to do anything to the transform as it enters into the given stage so typical use will be to assign the base adaptor class to level 0 of all stages but we leave that open to the user.
Output: The output is the updated transform.
- Author
- Nick Tustison
-
Brian Avants
- Examples
- Examples/RegistrationITKv4/DeformableRegistration12.cxx, Examples/RegistrationITKv4/DeformableRegistration4.cxx, Examples/RegistrationITKv4/DeformableRegistration6.cxx, Examples/RegistrationITKv4/DeformableRegistration7.cxx, Examples/RegistrationITKv4/DeformableRegistration8.cxx, Examples/RegistrationITKv4/ImageRegistration11.cxx, Examples/RegistrationITKv4/ImageRegistration6.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration1.cxx, Examples/RegistrationITKv4/MultiStageImageRegistration2.cxx, SphinxExamples/src/Numerics/Optimizers/ExhaustiveOptimizer/Code.cxx, and SphinxExamples/src/Registration/Common/Perform2DTranslationRegistrationWithMeanSquares/Code.cxx.
Definition at line 117 of file itkImageRegistrationMethodv4.h.
|
using | CompositeTransformPointer = typename CompositeTransformType::Pointer |
|
using | CompositeTransformType = CompositeTransform< RealType, ImageDimension > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType |
|
using | DecoratedInitialTransformPointer = typename DecoratedInitialTransformType::Pointer |
|
using | DecoratedInitialTransformType = DataObjectDecorator< InitialTransformType > |
|
using | DecoratedOutputTransformPointer = typename DecoratedOutputTransformType::Pointer |
|
using | DecoratedOutputTransformType = DataObjectDecorator< OutputTransformType > |
|
using | DerivativeType = typename OutputTransformType::DerivativeType |
|
using | DerivativeValueType = typename DerivativeType::ValueType |
|
using | FixedImageConstPointer = typename FixedImageType::ConstPointer |
|
using | FixedImageMaskConstPointer = typename FixedImageMaskType::ConstPointer |
|
using | FixedImageMasksContainerType = std::vector< FixedImageMaskConstPointer > |
|
using | FixedImageMaskType = typename ImageMetricType::FixedImageMaskType |
|
using | FixedImagePointer = typename FixedImageType::Pointer |
|
using | FixedImagesContainerType = std::vector< FixedImageConstPointer > |
|
using | FixedImageType = TFixedImage |
|
using | ImageMetricType = ImageToImageMetricv4< FixedImageType, MovingImageType, VirtualImageType, RealType > |
|
using | InitialTransformPointer = typename InitialTransformType::Pointer |
|
using | InitialTransformType = Transform< RealType, ImageDimension, ImageDimension > |
|
using | MetricPointer = typename MetricType::Pointer |
|
using | MetricSamplePointSetType = typename ImageMetricType::FixedSampledPointSetType |
|
using | MetricSamplingPercentageArrayType = Array< RealType > |
|
using | MetricSamplingStrategyEnum = ImageRegistrationMethodv4Enums::MetricSamplingStrategy |
|
using | MetricType = ObjectToObjectMetricBaseTemplate< RealType > |
|
using | MovingImageConstPointer = typename MovingImageType::ConstPointer |
|
using | MovingImageMaskConstPointer = typename MovingImageMaskType::ConstPointer |
|
using | MovingImageMasksContainerType = std::vector< MovingImageMaskConstPointer > |
|
using | MovingImageMaskType = typename ImageMetricType::MovingImageMaskType |
|
using | MovingImagePointer = typename MovingImageType::Pointer |
|
using | MovingImagesContainerType = std::vector< MovingImageConstPointer > |
|
using | MovingImageType = TMovingImage |
|
using | MultiMetricType = ObjectToObjectMultiMetricv4< ImageDimension, ImageDimension, VirtualImageType, RealType > |
|
using | OptimizerPointer = typename OptimizerType::Pointer |
|
using | OptimizerType = ObjectToObjectOptimizerBaseTemplate< RealType > |
|
using | OptimizerWeightsType = typename OptimizerType::ScalesType |
|
using | OutputTransformPointer = typename OutputTransformType::Pointer |
|
using | OutputTransformType = TOutputTransform |
|
using | Pointer = SmartPointer< Self > |
|
using | PointSetConstPointer = typename PointSetType::ConstPointer |
|
using | PointSetMetricType = PointSetToPointSetMetricWithIndexv4< PointSetType, PointSetType, RealType > |
|
using | PointSetsContainerType = std::vector< PointSetConstPointer > |
|
using | PointSetType = TPointSet |
|
using | RealType = typename OutputTransformType::ScalarType |
|
using | Self = ImageRegistrationMethodv4 |
|
using | ShrinkFactorsArrayType = Array< SizeValueType > |
|
using | ShrinkFactorsPerDimensionContainerType = typename ShrinkFilterType::ShrinkFactorsType |
|
using | ShrinkFilterType = ShrinkImageFilter< FixedImageType, VirtualImageType > |
|
using | SmoothingSigmasArrayType = Array< RealType > |
|
using | Superclass = ProcessObject |
|
using | TransformParametersAdaptorPointer = typename TransformParametersAdaptorType::Pointer |
|
using | TransformParametersAdaptorsContainerType = std::vector< TransformParametersAdaptorPointer > |
|
using | TransformParametersAdaptorType = TransformParametersAdaptorBase< InitialTransformType > |
|
using | VectorType = Vector< RealType, ImageDimension > |
|
using | VirtualImageBaseConstPointer = typename VirtualImageBaseType::ConstPointer |
|
using | VirtualImageBaseType = ImageBase< ImageDimension > |
|
using | VirtualImagePointer = typename VirtualImageType::Pointer |
|
using | VirtualImageType = TVirtualImage |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | DataObjectIdentifierType = DataObject::DataObjectIdentifierType |
|
using | DataObjectPointer = DataObject::Pointer |
|
using | DataObjectPointerArray = std::vector< DataObjectPointer > |
|
using | DataObjectPointerArraySizeType = DataObjectPointerArray::size_type |
|
using | MultiThreaderType = MultiThreaderBase |
|
using | NameArray = std::vector< DataObjectIdentifierType > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = ProcessObject |
|
using | Superclass = Object |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = Object |
|
using | Superclass = LightObject |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = LightObject |
|
|
virtual void | AllocateOutputs () |
|
void | GenerateData () override |
|
virtual VirtualImageBaseConstPointer | GetCurrentLevelVirtualDomainImage () |
|
| ImageRegistrationMethodv4 () |
|
virtual void | InitializeRegistrationAtEachLevel (const SizeValueType) |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
virtual void | SetMetricSamplePoints () |
|
| ~ImageRegistrationMethodv4 () override=default |
|
virtual void | AddInput (DataObject *input) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | AddOutput (DataObject *output) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | GenerateInputRequestedRegion () |
|
virtual void | GenerateOutputInformation () |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
virtual void | PopBackInput () |
|
virtual void | PopFrontInput () |
|
| ProcessObject () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | ReleaseInputs () |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
void | SetRequiredInputNames (const NameArray &) |
|
virtual void | VerifyInputInformation () const |
|
virtual void | VerifyPreconditions () const |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
| ~Object () override |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Set/Get the optimizer weights. Allows setting of a per-local-parameter weighting array. If unset, the weights are treated as identity. Weights are used to mask out a particular parameter during optimization to hold it constant. Or they may be used to apply another kind of prior knowledge. The size of the weights must be equal to the number of the local transformation parameters.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Set/Get the smoothing sigmas for each level. At each resolution level, a gaussian smoothing filter (specifically, the itkDiscreteGaussianImageFilter
) is applied. Sigma values are specified according to the option m_SmoothingSigmasAreSpecifiedInPhysicalUnits
.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
void itk::ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet >::InitializeCenterOfLinearOutputTransform |
( |
| ) |
|
We try to initialize the center of a linear transform (specifically those derived from itk::MatrixOffsetTransformBase). There are a number of checks that we need to make to account for all possible scenarios: 1) we check to make sure the m_OutputTransform is of the appropriate type such that it makes sense to try to center the transform. Local transforms such as SyN and B-spline do not need to be "centered", 2) we check to make sure the composite transform (to which we'll add the m_OutputTransform) is not empty, 3) we look for the first previous transform which has a center parameter, (which, presumably, been optimized beforehand), and
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Reinitialize the seed for the random number generators that select the samples for some metric sampling strategies.
By initializing the random number generator seed to a value the same deterministic sampling will be used each Update execution. On the other hand, calling the method MetricSamplingReinitializeSeed() without arguments will use the wall clock in order to have pseudo-random initialization of the seeds. This will indeed increase the non-deterministic behavior of the metric.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
void itk::ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet >::MetricSamplingReinitializeSeed |
( |
int |
seed | ) |
|
Reinitialize the seed for the random number generators that select the samples for some metric sampling strategies.
By initializing the random number generator seed to a value the same deterministic sampling will be used each Update execution. On the other hand, calling the method MetricSamplingReinitializeSeed() without arguments will use the wall clock in order to have pseudo-random initialization of the seeds. This will indeed increase the non-deterministic behavior of the metric.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::TimeVaryingBSplineVelocityFieldImageRegistrationMethod< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet >, itk::SyNImageRegistrationMethod< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet >, and itk::TimeVaryingVelocityFieldImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet >.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Set/Get the initial transform to be optimized
This transform is composed with the MovingInitialTransform to specify the initial transformation from the moving image to the virtual image. It is used for the default parameters, and can be use to specify the transform type.
If the filter has "InPlace" set then this transform will be the output transform object or "grafted" to the output. Otherwise, this InitialTransform will be deep copied or "cloned" to the output.
If this parameter is not set then a default constructed output transform is used.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Set/Get the optimizer weights. Allows setting of a per-local-parameter weighting array. If unset, the weights are treated as identity. Weights are used to mask out a particular parameter during optimization to hold it constant. Or they may be used to apply another kind of prior knowledge. The size of the weights must be equal to the number of the local transformation parameters.
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Set the shrink factors for each level where each level has a constant shrink factor for each dimension. For example, input to the function of factors = [4,2,1] will shrink the image in every dimension by 4 the first level, then by 2 at the second level, then the original resolution for the final level (uses the itkShrinkImageFilter
).
Definition at line 395 of file itkImageRegistrationMethodv4.h.
References itk::Array< TValue >::Size().
template<typename TFixedImage , typename TMovingImage , typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>, typename TVirtualImage = TFixedImage, typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
Set/Get the smoothing sigmas for each level. At each resolution level, a gaussian smoothing filter (specifically, the itkDiscreteGaussianImageFilter
) is applied. Sigma values are specified according to the option m_SmoothingSigmasAreSpecifiedInPhysicalUnits
.