ITK  4.4.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 itkIterativeInverseDisplacementFieldImageFilter.h in ITKv4"
27 #endif
28 
29 namespace itk
30 {
55 template< class TInputImage, class 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;
76  typedef typename InputImageType::PointType InputImagePointType;
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;
82  typedef typename OutputImageType::PointType OutputImagePointType;
83  typedef typename OutputImageType::IndexType OutputImageIndexType;
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 
110  itkConceptMacro( OutputHasNumericTraitsCheck,
112 
114 #endif
115 
116 protected:
119 
120  void PrintSelf(std::ostream & os, Indent indent) const;
121 
122  void GenerateData();
123 
124  unsigned int m_NumberOfIterations;
125 
126  double m_StopValue;
127  double m_Time;
128 
129 private:
130  IterativeInverseDeformationFieldImageFilter(const Self &); //purposely not
131  // implemented
132  void operator=(const Self &); //purposely not
133 
134  // implemented
135 };
136 } // end namespace itk
137 
138 #include "itkIterativeInverseDeformationFieldImageFilter.hxx"
139 
140 #endif
141