ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkExponentialDisplacementFieldImageFilter.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 itkExponentialDisplacementFieldImageFilter_h
19 #define itkExponentialDisplacementFieldImageFilter_h
20 
21 #include "itkDivideImageFilter.h"
22 #include "itkCastImageFilter.h"
25 #include "itkAddImageFilter.h"
26 
27 namespace itk
28 {
61 template< typename TInputImage, typename TOutputImage >
62 class ITK_TEMPLATE_EXPORT ExponentialDisplacementFieldImageFilter:
63  public ImageToImageFilter< TInputImage, TOutputImage >
64 {
65 public:
71 
73  itkNewMacro(Self);
74 
77 
79  typedef TInputImage InputImageType;
80  typedef typename InputImageType::Pointer InputImagePointer;
81  typedef typename InputImageType::ConstPointer InputImageConstPointer;
82  typedef typename InputImageType::PixelType InputPixelType;
83  typedef typename InputPixelType::RealValueType InputPixelRealValueType;
84 
85  typedef TOutputImage OutputImageType;
86  typedef typename OutputImageType::Pointer OutputImagePointer;
87  typedef typename OutputImageType::PixelType OutputPixelType;
88 
90  itkSetMacro(MaximumNumberOfIterations, unsigned int);
91  itkGetConstMacro(MaximumNumberOfIterations, unsigned int);
93 
98  itkSetMacro(AutomaticNumberOfIterations, bool);
99  itkGetConstMacro(AutomaticNumberOfIterations, bool);
100  itkBooleanMacro(AutomaticNumberOfIterations);
102 
108  itkSetMacro(ComputeInverse, bool);
109  itkGetConstMacro(ComputeInverse, bool);
110  itkBooleanMacro(ComputeInverse);
112 
114  itkStaticConstMacro(ImageDimension, unsigned int,
115  TInputImage::ImageDimension);
116  itkStaticConstMacro(OutputImageDimension, unsigned int,
117  TInputImage::ImageDimension);
118  itkStaticConstMacro(PixelDimension, unsigned int,
120  itkStaticConstMacro(OutputPixelDimension, unsigned int,
123 
124 #ifdef ITK_USE_CONCEPT_CHECKING
125  // Begin concept checking
126  itkConceptMacro( OutputHasNumericTraitsCheck,
128  itkConceptMacro( SameDimensionCheck1,
130  itkConceptMacro( SameDimensionCheck2,
132  itkConceptMacro( SameDimensionCheck3,
134  // End concept checking
135 #endif
136 
137 protected:
140 
141  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
142 
146  void GenerateData() ITK_OVERRIDE;
147 
149 
150  typedef DivideImageFilter<
152  itk::Image<InputPixelRealValueType, ImageDimension>,
154 
155  typedef CastImageFilter<
156  InputImageType, OutputImageType > CasterType;
157 
158  typedef WarpVectorImageFilter<
160  OutputImageType, OutputImageType > VectorWarperType;
161 
163  OutputImageType, double > FieldInterpolatorType;
164 
165  typedef AddImageFilter<
166  OutputImageType, OutputImageType, OutputImageType > AdderType;
167 
168  typedef typename DivideByConstantType::Pointer DivideByConstantPointer;
169  typedef typename CasterType::Pointer CasterPointer;
170  typedef typename VectorWarperType::Pointer VectorWarperPointer;
171  typedef typename FieldInterpolatorType::Pointer FieldInterpolatorPointer;
172  typedef typename FieldInterpolatorType::OutputType FieldInterpolatorOutputType;
173  typedef typename AdderType::Pointer AdderPointer;
174 
175 private:
176  ITK_DISALLOW_COPY_AND_ASSIGN(ExponentialDisplacementFieldImageFilter);
177 
178  bool m_AutomaticNumberOfIterations;
179  unsigned int m_MaximumNumberOfIterations;
180 
181  bool m_ComputeInverse;
182 
183  DivideByConstantPointer m_Divider;
184  CasterPointer m_Caster;
185  VectorWarperPointer m_Warper;
186  AdderPointer m_Adder;
187 };
188 } // end namespace itk
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
191 #include "itkExponentialDisplacementFieldImageFilter.hxx"
192 #endif
193 
194 #endif
Pixel-wise addition of two images.
Base class for all process objects that output image data.
Warps an image using an input displacement field.
Computes a diffeomorphic displacement field as the Lie group exponential of a vector field...
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
TOutputImage OutputImageType
#define itkConceptMacro(name, concept)
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Templated n-dimensional image class.
Definition: itkImage.h:75
Casts input pixels to output pixel type.
Pixel-wise division of two images.