ITK  5.2.0
Insight Toolkit
itkBSplineSyNImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBSplineSyNImageRegistrationMethod_h
19 #define itkBSplineSyNImageRegistrationMethod_h
20 
22 
24 
25 namespace itk
26 {
27 
45 template <typename TFixedImage,
46  typename TMovingImage,
47  typename TOutputTransform =
48  BSplineSmoothingOnUpdateDisplacementFieldTransform<double, TFixedImage::ImageDimension>,
49  typename TVirtualImage = TFixedImage,
50  typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
51 class ITK_TEMPLATE_EXPORT BSplineSyNImageRegistrationMethod
52  : public SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet>
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(BSplineSyNImageRegistrationMethod);
56 
62 
64  itkNewMacro(Self);
65 
67  static constexpr unsigned int ImageDimension = TFixedImage::ImageDimension;
68 
71 
73  using FixedImageType = TFixedImage;
74  using FixedImagePointer = typename FixedImageType::Pointer;
75  using FixedImagesContainerType = typename Superclass::FixedImagesContainerType;
76  using MovingImageType = TMovingImage;
77  using MovingImagePointer = typename MovingImageType::Pointer;
78  using MovingImagesContainerType = typename Superclass::MovingImagesContainerType;
79 
80  using PointSetType = typename Superclass::PointSetType;
81  using PointSetsContainerType = typename Superclass::PointSetsContainerType;
82 
84  using ImageMetricType = typename Superclass::ImageMetricType;
85  using ImageMetricPointer = typename ImageMetricType::Pointer;
86  using MeasureType = typename ImageMetricType::MeasureType;
87 
88  using ImageMaskSpatialObjectType = typename Superclass::ImageMaskSpatialObjectType;
89  using MaskImageType = typename ImageMaskSpatialObjectType::ImageType;
90  using FixedImageMaskType = typename Superclass::FixedImageMaskType;
91  using FixedMaskImageType = typename ImageMaskSpatialObjectType::ImageType;
92  using FixedImageMasksContainerType = typename Superclass::FixedImageMasksContainerType;
93  using MovingImageMaskType = typename Superclass::MovingImageMaskType;
94  using MovingMaskImageType = typename ImageMaskSpatialObjectType::ImageType;
95  using MovingImageMasksContainerType = typename Superclass::MovingImageMasksContainerType;
96 
97  using VirtualImageType = typename Superclass::VirtualImageType;
98  using VirtualImageBaseType = typename Superclass::VirtualImageBaseType;
99  using VirtualImageBaseConstPointer = typename Superclass::VirtualImageBaseConstPointer;
100 
101  using MultiMetricType = typename Superclass::MultiMetricType;
102  using MetricType = typename Superclass::MetricType;
103  using MetricPointer = typename MetricType::Pointer;
104  using PointSetMetricType = typename Superclass::PointSetMetricType;
105 
106  using NumberOfIterationsArrayType = typename Superclass::NumberOfIterationsArrayType;
107 
108  using InitialTransformType = typename Superclass::InitialTransformType;
109  using OutputTransformType = TOutputTransform;
110  using OutputTransformPointer = typename OutputTransformType::Pointer;
111  using RealType = typename OutputTransformType::ScalarType;
112  using DerivativeType = typename OutputTransformType::DerivativeType;
113  using DerivativeValueType = typename DerivativeType::ValueType;
114  using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
115  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
116  using DisplacementVectorType = typename DisplacementFieldType::PixelType;
117 
122 
123  using CompositeTransformType = typename Superclass::CompositeTransformType;
124  using DisplacementFieldTransformType = typename Superclass::DisplacementFieldTransformType;
125  using DisplacementFieldTransformPointer = typename Superclass::DisplacementFieldTransformPointer;
126  using TransformBaseType = typename CompositeTransformType::TransformType;
127 
128  using DecoratedOutputTransformType = typename Superclass::DecoratedOutputTransformType;
129  using DecoratedOutputTransformPointer = typename DecoratedOutputTransformType::Pointer;
130 
131 protected:
133  ~BSplineSyNImageRegistrationMethod() override = default;
134 
136  void
137  StartOptimization() override;
138 
139  void
140  InitializeRegistrationAtEachLevel(const SizeValueType) override;
141 
143  ComputeUpdateField(const FixedImagesContainerType,
145  const TransformBaseType *,
148  const TransformBaseType *,
151  MeasureType &) override;
153  BSplineSmoothDisplacementField(const DisplacementFieldType *,
154  const ArrayType &,
155  const WeightedMaskImageType *,
156  const BSplinePointSetType *);
157 };
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 # include "itkBSplineSyNImageRegistrationMethod.hxx"
162 #endif
163 
164 #endif
itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h
itk::BSplineSyNImageRegistrationMethod::OutputTransformType
TOutputTransform OutputTransformType
Definition: itkBSplineSyNImageRegistrationMethod.h:109
itk::BSplineSyNImageRegistrationMethod::DisplacementFieldType
typename OutputTransformType::DisplacementFieldType DisplacementFieldType
Definition: itkBSplineSyNImageRegistrationMethod.h:114
itk::BSplineSyNImageRegistrationMethod::TransformBaseType
typename CompositeTransformType::TransformType TransformBaseType
Definition: itkBSplineSyNImageRegistrationMethod.h:126
itk::BSplineSyNImageRegistrationMethod::ImageMetricType
typename Superclass::ImageMetricType ImageMetricType
Definition: itkBSplineSyNImageRegistrationMethod.h:84
itk::BSplineSyNImageRegistrationMethod::MovingMaskImageType
typename ImageMaskSpatialObjectType::ImageType MovingMaskImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:94
itk::BSplineSyNImageRegistrationMethod::FixedImageType
TFixedImage FixedImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:73
itkSyNImageRegistrationMethod.h
itk::BSplineSyNImageRegistrationMethod::BSplinePointSetType
typename BSplineFilterType::InputPointSetType BSplinePointSetType
Definition: itkBSplineSyNImageRegistrationMethod.h:121
itk::BSplineSyNImageRegistrationMethod::DecoratedOutputTransformType
typename Superclass::DecoratedOutputTransformType DecoratedOutputTransformType
Definition: itkBSplineSyNImageRegistrationMethod.h:128
itk::BSplineSyNImageRegistrationMethod::DisplacementFieldTransformType
typename Superclass::DisplacementFieldTransformType DisplacementFieldTransformType
Definition: itkBSplineSyNImageRegistrationMethod.h:124
itk::BSplineSyNImageRegistrationMethod::PointSetType
typename Superclass::PointSetType PointSetType
Definition: itkBSplineSyNImageRegistrationMethod.h:80
itk::BSplineSyNImageRegistrationMethod::MovingImageType
TMovingImage MovingImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:76
itk::DisplacementFieldToBSplineImageFilter
Class which takes a dense displacement field image and/or a set of points with associated displacemen...
Definition: itkDisplacementFieldToBSplineImageFilter.h:44
itk::BSplineSyNImageRegistrationMethod::MovingImageMaskType
typename Superclass::MovingImageMaskType MovingImageMaskType
Definition: itkBSplineSyNImageRegistrationMethod.h:93
itk::BSplineSyNImageRegistrationMethod::MultiMetricType
typename Superclass::MultiMetricType MultiMetricType
Definition: itkBSplineSyNImageRegistrationMethod.h:101
itk::BSplineSyNImageRegistrationMethod::VirtualImageBaseConstPointer
typename Superclass::VirtualImageBaseConstPointer VirtualImageBaseConstPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:99
itk::SmartPointer< Self >
itk::BSplineSyNImageRegistrationMethod::MetricPointer
typename MetricType::Pointer MetricPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:103
itk::BSplineSyNImageRegistrationMethod::CompositeTransformType
typename Superclass::CompositeTransformType CompositeTransformType
Definition: itkBSplineSyNImageRegistrationMethod.h:123
itk::BSplineSyNImageRegistrationMethod::InitialTransformType
typename Superclass::InitialTransformType InitialTransformType
Definition: itkBSplineSyNImageRegistrationMethod.h:108
itk::BSplineSyNImageRegistrationMethod::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:97
itk::BSplineSyNImageRegistrationMethod::ArrayType
typename BSplineFilterType::ArrayType ArrayType
Definition: itkBSplineSyNImageRegistrationMethod.h:119
itk::BSplineSyNImageRegistrationMethod::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition: itkBSplineSyNImageRegistrationMethod.h:113
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::BSplineSyNImageRegistrationMethod::MovingImagesContainerType
typename Superclass::MovingImagesContainerType MovingImagesContainerType
Definition: itkBSplineSyNImageRegistrationMethod.h:78
itk::BSplineSyNImageRegistrationMethod::DisplacementVectorType
typename DisplacementFieldType::PixelType DisplacementVectorType
Definition: itkBSplineSyNImageRegistrationMethod.h:116
itk::BSplineSyNImageRegistrationMethod::NumberOfIterationsArrayType
typename Superclass::NumberOfIterationsArrayType NumberOfIterationsArrayType
Definition: itkBSplineSyNImageRegistrationMethod.h:106
itk::BSplineSyNImageRegistrationMethod::ImageMaskSpatialObjectType
typename Superclass::ImageMaskSpatialObjectType ImageMaskSpatialObjectType
Definition: itkBSplineSyNImageRegistrationMethod.h:88
itk::BSplineSyNImageRegistrationMethod::DisplacementFieldTransformPointer
typename Superclass::DisplacementFieldTransformPointer DisplacementFieldTransformPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:125
itk::DisplacementFieldToBSplineImageFilter::InputPointSetType
TInputPointSet InputPointSetType
Definition: itkDisplacementFieldToBSplineImageFilter.h:61
itk::BSplineSyNImageRegistrationMethod::ImageMetricPointer
typename ImageMetricType::Pointer ImageMetricPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:85
itk::BSplineSyNImageRegistrationMethod::DecoratedOutputTransformPointer
typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:129
itk::BSplineSyNImageRegistrationMethod::FixedImagesContainerType
typename Superclass::FixedImagesContainerType FixedImagesContainerType
Definition: itkBSplineSyNImageRegistrationMethod.h:75
itk::BSplineSyNImageRegistrationMethod::MovingImagePointer
typename MovingImageType::Pointer MovingImagePointer
Definition: itkBSplineSyNImageRegistrationMethod.h:77
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::BSplineSyNImageRegistrationMethod::PointSetMetricType
typename Superclass::PointSetMetricType PointSetMetricType
Definition: itkBSplineSyNImageRegistrationMethod.h:104
itk::BSplineSyNImageRegistrationMethod::OutputTransformPointer
typename OutputTransformType::Pointer OutputTransformPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:110
itk::BSplineSyNImageRegistrationMethod::MovingImageMasksContainerType
typename Superclass::MovingImageMasksContainerType MovingImageMasksContainerType
Definition: itkBSplineSyNImageRegistrationMethod.h:95
itk::BSplineSyNImageRegistrationMethod::VirtualImageBaseType
typename Superclass::VirtualImageBaseType VirtualImageBaseType
Definition: itkBSplineSyNImageRegistrationMethod.h:98
itk::BSplineSyNImageRegistrationMethod::WeightedMaskImageType
typename BSplineFilterType::RealImageType WeightedMaskImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:120
itk::BSplineSyNImageRegistrationMethod::MaskImageType
typename ImageMaskSpatialObjectType::ImageType MaskImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:89
itk::BSplineSyNImageRegistrationMethod
Interface method for the performing greedy B-spline SyN image registration.
Definition: itkBSplineSyNImageRegistrationMethod.h:51
itk::BSplineSyNImageRegistrationMethod::FixedImagePointer
typename FixedImageType::Pointer FixedImagePointer
Definition: itkBSplineSyNImageRegistrationMethod.h:74
itk::BSplineSyNImageRegistrationMethod::MeasureType
typename ImageMetricType::MeasureType MeasureType
Definition: itkBSplineSyNImageRegistrationMethod.h:86
itk::BSplineSyNImageRegistrationMethod::DerivativeType
typename OutputTransformType::DerivativeType DerivativeType
Definition: itkBSplineSyNImageRegistrationMethod.h:112
itk::BSplineSyNImageRegistrationMethod::FixedImageMaskType
typename Superclass::FixedImageMaskType FixedImageMaskType
Definition: itkBSplineSyNImageRegistrationMethod.h:90
itk::BSplineSyNImageRegistrationMethod::FixedMaskImageType
typename ImageMaskSpatialObjectType::ImageType FixedMaskImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:91
itk::DisplacementFieldToBSplineImageFilter::ArrayType
typename BSplineFilterType::ArrayType ArrayType
Definition: itkDisplacementFieldToBSplineImageFilter.h:92
itk::BSplineSyNImageRegistrationMethod::MetricType
typename Superclass::MetricType MetricType
Definition: itkBSplineSyNImageRegistrationMethod.h:102
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::BSplineSyNImageRegistrationMethod::FixedImageMasksContainerType
typename Superclass::FixedImageMasksContainerType FixedImageMasksContainerType
Definition: itkBSplineSyNImageRegistrationMethod.h:92
itk::SyNImageRegistrationMethod
Interface method for the performing greedy SyN image registration.
Definition: itkSyNImageRegistrationMethod.h:71
itk::BSplineSyNImageRegistrationMethod::PointSetsContainerType
typename Superclass::PointSetsContainerType PointSetsContainerType
Definition: itkBSplineSyNImageRegistrationMethod.h:81
itk::BSplineSyNImageRegistrationMethod::RealType
typename OutputTransformType::ScalarType RealType
Definition: itkBSplineSyNImageRegistrationMethod.h:111
itk::BSplineSyNImageRegistrationMethod::DisplacementFieldPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:115
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83