ITK  6.0.0
Insight Toolkit
itkIterativeInverseDisplacementFieldImageFilter.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 itkIterativeInverseDisplacementFieldImageFilter_h
19 #define itkIterativeInverseDisplacementFieldImageFilter_h
20 
21 
23 #include "itkImageRegionIterator.h"
24 #include "itkTimeProbe.h"
25 
26 namespace itk
27 {
51 template <typename TInputImage, typename TOutputImage>
53  : public ImageToImageFilter<TInputImage, TOutputImage>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(IterativeInverseDisplacementFieldImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
68  itkOverrideGetNameOfClassMacro(IterativeInverseDisplacementFieldImageFilter);
69 
71  using InputImageType = TInputImage;
76  using InputImageSpacingType = typename InputImageType::SpacingType;
77  using OutputImageType = TOutputImage;
79  using OutputImagePixelType = typename OutputImageType::PixelType;
82  using OutputImageValueType = typename OutputImagePixelType::ValueType;
83 
85 
89 
91 
95 
96  itkSetMacro(NumberOfIterations, unsigned int);
97  itkGetConstMacro(NumberOfIterations, unsigned int);
98 
99  // If the error (in mm) between forward and backward mapping is smaller than
100  // the StopValue,
101  // the algorithm stops.
102  // This value can be used to speed up the calculation.
103  itkSetMacro(StopValue, double);
104  itkGetConstMacro(StopValue, double);
105 
106 #ifdef ITK_USE_CONCEPT_CHECKING
107  // Begin concept checking
109 
110  itkConceptMacro(SameDimensionCheck,
112  // End concept checking
113 #endif
114 
115 protected:
117  ~IterativeInverseDisplacementFieldImageFilter() override = default;
118 
119  void
120  PrintSelf(std::ostream & os, Indent indent) const override;
121 
122  void
123  GenerateData() override;
124 
125  unsigned int m_NumberOfIterations{};
126 
127  double m_StopValue{};
128  double m_Time{};
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 # include "itkIterativeInverseDisplacementFieldImageFilter.hxx"
134 #endif
135 
136 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::IterativeInverseDisplacementFieldImageFilter
Computes the inverse of a displacement field.
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:52
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itkTimeProbe.h
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:716
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::IterativeInverseDisplacementFieldImageFilter::OutputImageIndexType
typename OutputImageType::IndexType OutputImageIndexType
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:81
itk::IterativeInverseDisplacementFieldImageFilter::FieldInterpolatorPointer
typename FieldInterpolatorType::Pointer FieldInterpolatorPointer
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:93
itkWarpVectorImageFilter.h
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::SmartPointer< Self >
itkImageRegionIterator.h
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, NumericTraits< TInputImage::PixelType >::RealType >::OutputType
NumericTraits< TInputImage::PixelType >::RealType OutputType
Definition: itkFunctionBase.h:62
itk::Concept::SameDimension
Definition: itkConceptChecking.h:696
itk::ImageRegionIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionIterator.h:80
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::TimeProbe
Computes the time passed between two points in code.
Definition: itkTimeProbe.h:44
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::IterativeInverseDisplacementFieldImageFilter::InputImagePointType
typename InputImageType::PointType InputImagePointType
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:74
itk::WarpVectorImageFilter
Warps an image using an input displacement field.
Definition: itkWarpVectorImageFilter.h:89
itk::IterativeInverseDisplacementFieldImageFilter::FieldInterpolatorOutputType
typename FieldInterpolatorType::OutputType FieldInterpolatorOutputType
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:94
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::IterativeInverseDisplacementFieldImageFilter::OutputImagePointType
typename OutputImageType::PointType OutputImagePointType
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:80
itk::IterativeInverseDisplacementFieldImageFilter::InputImageSpacingType
typename InputImageType::SpacingType InputImageSpacingType
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:76
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:109
itk::IterativeInverseDisplacementFieldImageFilter::OutputImageValueType
typename OutputImagePixelType::ValueType OutputImageValueType
Definition: itkIterativeInverseDisplacementFieldImageFilter.h:82
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ImageToImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToImageFilter.h:131
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::VectorLinearInterpolateImageFunction
Linearly interpolate a vector image at specified positions.
Definition: itkVectorLinearInterpolateImageFunction.h:43