ITK  4.8.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 >
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,
119  InputPixelType::Dimension);
120  itkStaticConstMacro(OutputPixelDimension, unsigned int,
121  OutputPixelType::Dimension);
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 
154 
156  InputImageType, OutputImageType > CasterType;
157 
160  OutputImageType, OutputImageType > VectorWarperType;
161 
163  OutputImageType, double > FieldInterpolatorType;
164 
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  ExponentialDisplacementFieldImageFilter(const Self &); //purposely not
177  // implemented
178  void operator=(const Self &); //purposely not
179  // implemented
180 
183 
185 
186  DivideByConstantPointer m_Divider;
187  CasterPointer m_Caster;
188  VectorWarperPointer m_Warper;
189  AdderPointer m_Adder;
190 };
191 } // end namespace itk
192 
193 #ifndef ITK_MANUAL_INSTANTIATION
194 #include "itkExponentialDisplacementFieldImageFilter.hxx"
195 #endif
196 
197 #endif
Pixel-wise addition of two images.
typedef(Concept::HasNumericTraits< typename OutputPixelType::ValueType >) OutputHasNumericTraitsCheck
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)
void PrintSelf(std::ostream &os, Indent indent) const override
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.