ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkIterativeInverseDisplacementFieldImageFilter.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 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_ASSIGN(IterativeInverseDisplacementFieldImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
69 
71  using InputImageType = TInputImage;
72  using InputImageConstPointer = typename InputImageType::ConstPointer;
73  using InputImagePointer = typename InputImageType::Pointer;
76  using InputImageSpacingType = typename InputImageType::SpacingType;
77  using OutputImageType = TOutputImage;
78  using OutputImagePointer = typename OutputImageType::Pointer;
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
108  itkConceptMacro( OutputHasNumericTraitsCheck,
110 
111  itkConceptMacro( SameDimensionCheck,
113  // End concept checking
114 #endif
115 
116 protected:
118  ~IterativeInverseDisplacementFieldImageFilter() override = default;
119 
120  void PrintSelf(std::ostream & os, Indent indent) const override;
121 
122  void GenerateData() override;
123 
124  unsigned int m_NumberOfIterations;
125 
126  double m_StopValue;
127  double m_Time;
128 };
129 } // end namespace itk
130 
131 #ifndef ITK_MANUAL_INSTANTIATION
132 #include "itkIterativeInverseDisplacementFieldImageFilter.hxx"
133 #endif
134 
135 #endif
typename OutputImageType::Pointer OutputImagePointer
Computes the time passed between two points in code.
Definition: itkTimeProbe.h:44
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
Warps an image using an input displacement field.
typename InputImageType::Pointer InputImagePointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
Linearly interpolate a vector image at specified positions.