ITK  6.0.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  * https://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 
70  itkOverrideGetNameOfClassMacro(BSplineSyNImageRegistrationMethod);
71 
73  using FixedImageType = TFixedImage;
75  using typename Superclass::FixedImagesContainerType;
76  using MovingImageType = TMovingImage;
78  using typename Superclass::MovingImagesContainerType;
79 
80  using typename Superclass::PointSetType;
81  using typename Superclass::PointSetsContainerType;
82 
84  using typename Superclass::ImageMetricType;
87 
88  using typename Superclass::ImageMaskSpatialObjectType;
90  using typename Superclass::FixedImageMaskType;
92  using typename Superclass::FixedImageMasksContainerType;
93  using typename Superclass::MovingImageMaskType;
95  using typename Superclass::MovingImageMasksContainerType;
96 
97  using VirtualImageType = typename Superclass::VirtualImageType;
98  using typename Superclass::VirtualImageBaseType;
99  using typename Superclass::VirtualImageBaseConstPointer;
100 
101  using typename Superclass::MultiMetricType;
102  using typename Superclass::MetricType;
104  using typename Superclass::PointSetMetricType;
105 
106  using typename Superclass::NumberOfIterationsArrayType;
107 
108  using typename Superclass::InitialTransformType;
109  using OutputTransformType = TOutputTransform;
111  using RealType = typename OutputTransformType::ScalarType;
112  using DerivativeType = typename OutputTransformType::DerivativeType;
113  using DerivativeValueType = typename DerivativeType::ValueType;
114  using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
116  using DisplacementVectorType = typename DisplacementFieldType::PixelType;
117 
122 
123  using typename Superclass::CompositeTransformType;
124  using typename Superclass::DisplacementFieldTransformType;
125  using typename Superclass::DisplacementFieldTransformPointer;
127 
128  using typename Superclass::DecoratedOutputTransformType;
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
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
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::ImageRegistrationMethodv4::PointSetsContainerType
std::vector< PointSetConstPointer > PointSetsContainerType
Definition: itkImageRegistrationMethodv4.h:149
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::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::ImageRegistrationMethodv4::MovingImagesContainerType
std::vector< MovingImageConstPointer > MovingImagesContainerType
Definition: itkImageRegistrationMethodv4.h:145
itk::SmartPointer< Self >
itk::BSplineSyNImageRegistrationMethod::MetricPointer
typename MetricType::Pointer MetricPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:103
itk::BSplineSyNImageRegistrationMethod::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:97
itk::SingleValuedCostFunctionv4Template::MeasureType
TInternalComputationValueType MeasureType
Definition: itkSingleValuedCostFunctionv4.h:67
itk::ImageRegistrationMethodv4::MovingImageMasksContainerType
std::vector< MovingImageMaskConstPointer > MovingImageMasksContainerType
Definition: itkImageRegistrationMethodv4.h:183
itk::ImageRegistrationMethodv4::FixedImageMasksContainerType
std::vector< FixedImageMaskConstPointer > FixedImageMasksContainerType
Definition: itkImageRegistrationMethodv4.h:180
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:55
itk::BSplineSyNImageRegistrationMethod::DisplacementVectorType
typename DisplacementFieldType::PixelType DisplacementVectorType
Definition: itkBSplineSyNImageRegistrationMethod.h:116
itk::DisplacementFieldToBSplineImageFilter::InputPointSetType
TInputPointSet InputPointSetType
Definition: itkDisplacementFieldToBSplineImageFilter.h:64
itk::BSplineSyNImageRegistrationMethod::ImageMetricPointer
typename ImageMetricType::Pointer ImageMetricPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:85
itk::BSplineSyNImageRegistrationMethod::DecoratedOutputTransformPointer
typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:129
itk::CompositeTransform::TransformType
typename Superclass::TransformType TransformType
Definition: itkCompositeTransform.h:105
itk::BSplineSyNImageRegistrationMethod::MovingImagePointer
typename MovingImageType::Pointer MovingImagePointer
Definition: itkBSplineSyNImageRegistrationMethod.h:77
itk::ImageRegistrationMethodv4::FixedImagesContainerType
std::vector< FixedImageConstPointer > FixedImagesContainerType
Definition: itkImageRegistrationMethodv4.h:141
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::BSplineSyNImageRegistrationMethod::OutputTransformPointer
typename OutputTransformType::Pointer OutputTransformPointer
Definition: itkBSplineSyNImageRegistrationMethod.h:110
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::FixedMaskImageType
typename ImageMaskSpatialObjectType::ImageType FixedMaskImageType
Definition: itkBSplineSyNImageRegistrationMethod.h:91
itk::DisplacementFieldToBSplineImageFilter::ArrayType
typename BSplineFilterType::ArrayType ArrayType
Definition: itkDisplacementFieldToBSplineImageFilter.h:95
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::SyNImageRegistrationMethod
Interface method for the performing greedy SyN image registration.
Definition: itkSyNImageRegistrationMethod.h:71
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:86