ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBSplineSyNImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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, typename TMovingImage, typename TOutputTransform =
46  BSplineSmoothingOnUpdateDisplacementFieldTransform<double, TFixedImage::ImageDimension>,
47  typename TVirtualImage = TFixedImage,
48  typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension> >
49 class ITK_TEMPLATE_EXPORT BSplineSyNImageRegistrationMethod
50 : public SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet>
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineSyNImageRegistrationMethod);
54 
57  using Superclass = SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform,
58  TVirtualImage, TPointSet>;
61 
63  itkNewMacro( Self );
64 
66  static constexpr unsigned int ImageDimension = TFixedImage::ImageDimension;
67 
70 
72  using FixedImageType = TFixedImage;
73  using FixedImagePointer = typename FixedImageType::Pointer;
74  using FixedImagesContainerType = typename Superclass::FixedImagesContainerType;
75  using MovingImageType = TMovingImage;
76  using MovingImagePointer = typename MovingImageType::Pointer;
77  using MovingImagesContainerType = typename Superclass::MovingImagesContainerType;
78 
79  using PointSetType = typename Superclass::PointSetType;
80  using PointSetsContainerType = typename Superclass::PointSetsContainerType;
81 
83  using ImageMetricType = typename Superclass::ImageMetricType;
84  using ImageMetricPointer = typename ImageMetricType::Pointer;
85  using MeasureType = typename ImageMetricType::MeasureType;
86 
87  using ImageMaskSpatialObjectType = typename Superclass::ImageMaskSpatialObjectType;
88  using MaskImageType = typename ImageMaskSpatialObjectType::ImageType;
89  using FixedImageMaskType = typename Superclass::FixedImageMaskType;
90  using FixedMaskImageType = typename ImageMaskSpatialObjectType::ImageType;
91  using FixedImageMasksContainerType = typename Superclass::FixedImageMasksContainerType;
92  using MovingImageMaskType = typename Superclass::MovingImageMaskType;
93  using MovingMaskImageType = typename ImageMaskSpatialObjectType::ImageType;
94  using MovingImageMasksContainerType = typename Superclass::MovingImageMasksContainerType;
95 
96  using VirtualImageType = typename Superclass::VirtualImageType;
97  using VirtualImageBaseType = typename Superclass::VirtualImageBaseType;
98  using VirtualImageBaseConstPointer = typename Superclass::VirtualImageBaseConstPointer;
99 
100  using MultiMetricType = typename Superclass::MultiMetricType;
101  using MetricType = typename Superclass::MetricType;
102  using MetricPointer = typename MetricType::Pointer;
103  using PointSetMetricType = typename Superclass::PointSetMetricType;
104 
105  using NumberOfIterationsArrayType = typename Superclass::NumberOfIterationsArrayType;
106 
107  using InitialTransformType = typename Superclass::InitialTransformType;
108  using OutputTransformType = TOutputTransform;
109  using OutputTransformPointer = typename OutputTransformType::Pointer;
110  using RealType = typename OutputTransformType::ScalarType;
111  using DerivativeType = typename OutputTransformType::DerivativeType;
112  using DerivativeValueType = typename DerivativeType::ValueType;
113  using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
114  using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
115  using DisplacementVectorType = typename DisplacementFieldType::PixelType;
116 
121 
122  using CompositeTransformType = typename Superclass::CompositeTransformType;
123  using DisplacementFieldTransformType = typename Superclass::DisplacementFieldTransformType;
124  using DisplacementFieldTransformPointer = typename Superclass::DisplacementFieldTransformPointer;
125  using TransformBaseType = typename CompositeTransformType::TransformType;
126 
127  using DecoratedOutputTransformType = typename Superclass::DecoratedOutputTransformType;
128  using DecoratedOutputTransformPointer = typename DecoratedOutputTransformType::Pointer;
129 
130 protected:
132  ~BSplineSyNImageRegistrationMethod() override = default;
133 
135  void StartOptimization() override;
136 
137  void InitializeRegistrationAtEachLevel( const SizeValueType ) override;
138 
142  MeasureType & ) override;
143  virtual DisplacementFieldPointer BSplineSmoothDisplacementField( const DisplacementFieldType *,
144  const ArrayType &, const WeightedMaskImageType *, const BSplinePointSetType * );
145 };
146 } // end namespace itk
147 
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkBSplineSyNImageRegistrationMethod.hxx"
150 #endif
151 
152 #endif
typename Superclass::MovingImageMasksContainerType MovingImageMasksContainerType
typename Superclass::FixedImageMasksContainerType FixedImageMasksContainerType
typename DisplacementFieldType::PixelType DisplacementVectorType
Light weight base class for most itk classes.
typename Superclass::PointSetsContainerType PointSetsContainerType
typename Superclass::DisplacementFieldTransformType DisplacementFieldTransformType
typename BSplineFilterType::RealImageType WeightedMaskImageType
typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
unsigned long SizeValueType
Definition: itkIntTypes.h:83
typename Superclass::FixedImageMaskType FixedImageMaskType
typename OutputTransformType::DerivativeType DerivativeType
typename OutputTransformType::DisplacementFieldType DisplacementFieldType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
typename ImageMaskSpatialObjectType::ImageType MovingMaskImageType
typename CompositeTransformType::TransformType TransformBaseType
typename ImageMaskSpatialObjectType::ImageType MaskImageType
Interface method for the performing greedy SyN image registration.
typename OutputTransformType::ScalarType RealType
typename Superclass::DecoratedOutputTransformType DecoratedOutputTransformType
typename Superclass::FixedImagesContainerType FixedImagesContainerType
typename Superclass::InitialTransformType InitialTransformType
typename OutputTransformType::Pointer OutputTransformPointer
typename ImageMaskSpatialObjectType::ImageType FixedMaskImageType
typename Superclass::PointSetMetricType PointSetMetricType
typename Superclass::NumberOfIterationsArrayType NumberOfIterationsArrayType
typename BSplineFilterType::InputPointSetType BSplinePointSetType
typename Superclass::CompositeTransformType CompositeTransformType
typename Superclass::VirtualImageBaseConstPointer VirtualImageBaseConstPointer
typename Superclass::VirtualImageType VirtualImageType
Interface method for the performing greedy B-spline SyN image registration.
typename Superclass::ImageMaskSpatialObjectType ImageMaskSpatialObjectType
Class which takes a dense displacement field image and/or a set of points with associated displacemen...
typename Superclass::DisplacementFieldTransformPointer DisplacementFieldTransformPointer
typename Superclass::VirtualImageBaseType VirtualImageBaseType
typename Superclass::ImageMetricType ImageMetricType
typename Superclass::MovingImagesContainerType MovingImagesContainerType
typename Superclass::MovingImageMaskType MovingImageMaskType
Templated n-dimensional image class.
Definition: itkImage.h:75