ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkIterativeInverseDeformationFieldImageFilter.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 itkIterativeInverseDeformationFieldImageFilter_h
19 #define itkIterativeInverseDeformationFieldImageFilter_h
20 
22 #include "itkImageRegionIterator.h"
23 #include "itkTimeProbe.h"
24 
25 #ifndef ITKV3_COMPATIBILITY
26 #error "This file is only valid when ITKV3_COMPATIBILITY is turned on. Users are encouraged to convert to itk::IterativeInverseDisplacementFieldImageFilter in ITKv4"
27 #endif
28 
29 namespace itk
30 {
55 template< typename TInputImage, typename TOutputImage >
57  public ImageToImageFilter< TInputImage, TOutputImage >
58 {
59 public:
65 
67  itkNewMacro(Self);
68 
71 
73  typedef TInputImage InputImageType;
74  typedef typename InputImageType::ConstPointer InputImageConstPointer;
75  typedef typename InputImageType::Pointer InputImagePointer;
77  typedef typename InputImageType::RegionType InputImageRegionType;
78  typedef typename InputImageType::SpacingType InputImageSpacingType;
79  typedef TOutputImage OutputImageType;
80  typedef typename OutputImageType::Pointer OutputImagePointer;
81  typedef typename OutputImageType::PixelType OutputImagePixelType;
84  typedef typename OutputImagePixelType::ValueType OutputImageValueType;
85 
87 
91 
93 
97 
98  itkSetMacro(NumberOfIterations, unsigned int);
99  itkGetConstMacro(NumberOfIterations, unsigned int);
100 
101  // If the error (in mm) between forward and backward mapping is smaller than
102  // the StopValue,
103  // the algorithm stops.
104  // This value can be used to speed up the calculation.
105  itkSetMacro(StopValue, double);
106  itkGetConstMacro(StopValue, double);
107 
108 #ifdef ITK_USE_CONCEPT_CHECKING
109  // Begin concept checking
110  itkConceptMacro( OutputHasNumericTraitsCheck,
112  itkConceptMacro( SameDimensionCheck,
114  // End concept checking
115 #endif
116 
117 protected:
120 
121  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
122 
123  void GenerateData() ITK_OVERRIDE;
124 
125  unsigned int m_NumberOfIterations;
126 
127  double m_StopValue;
128  double m_Time;
129 
130 private:
131  ITK_DISALLOW_COPY_AND_ASSIGN(IterativeInverseDeformationFieldImageFilter);
132 };
133 } // end namespace itk
134 
135 #include "itkIterativeInverseDeformationFieldImageFilter.hxx"
136 
137 #endif
VectorLinearInterpolateImageFunction< TInputImage, double > FieldInterpolatorType
Computes the time passed between two points in code.
Definition: itkTimeProbe.h:44
WarpVectorImageFilter< TOutputImage, TInputImage, TOutputImage > VectorWarperType
Base class for all process objects that output image data.
Warps an image using an input displacement field.
A multi-dimensional iterator templated over image type that walks a region of pixels.
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)
A multi-dimensional iterator templated over image type that walks a region of pixels.
Linearly interpolate a vector image at specified positions.