itkExponentialDeformationFieldImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkExponentialDeformationFieldImageFilter_h
00019 #define __itkExponentialDeformationFieldImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022 #include "itkDivideByConstantImageFilter.h"
00023 #include "itkCastImageFilter.h"
00024 #include "itkWarpVectorImageFilter.h"
00025 #include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h"
00026 #include "itkAddImageFilter.h"
00027
00028
00029 namespace itk
00030 {
00031
00064 template <class TInputImage, class TOutputImage>
00065 class ITK_EXPORT ExponentialDeformationFieldImageFilter:
00066 public ImageToImageFilter<TInputImage, TOutputImage>
00067 {
00068 public:
00070 typedef ExponentialDeformationFieldImageFilter Self;
00071 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00072 typedef SmartPointer<Self> Pointer;
00073 typedef SmartPointer<const Self> ConstPointer;
00074
00076 itkNewMacro(Self);
00077
00079 itkTypeMacro(ExponentialDeformationFieldImageFilter, ImageToImageFilter);
00080
00082 typedef TInputImage InputImageType;
00083 typedef typename InputImageType::Pointer InputImagePointer;
00084 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00085 typedef typename InputImageType::PixelType InputPixelType;
00086 typedef typename InputPixelType::RealValueType InputPixelRealValueType;
00087
00088 typedef TOutputImage OutputImageType;
00089 typedef typename OutputImageType::Pointer OutputImagePointer;
00090 typedef typename OutputImageType::PixelType OutputPixelType;
00091
00093 itkSetMacro(MaximumNumberOfIterations, unsigned int);
00094 itkGetMacro(MaximumNumberOfIterations, unsigned int);
00096
00101 itkSetMacro( AutomaticNumberOfIterations, bool );
00102 itkGetMacro( AutomaticNumberOfIterations, bool );
00103 itkBooleanMacro(AutomaticNumberOfIterations);
00105
00111 itkSetMacro( ComputeInverse, bool );
00112 itkGetMacro( ComputeInverse, bool );
00113 itkBooleanMacro(ComputeInverse);
00115
00117 itkStaticConstMacro(ImageDimension, unsigned int,
00118 TInputImage::ImageDimension);
00119 itkStaticConstMacro(OutputImageDimension, unsigned int,
00120 TInputImage::ImageDimension );
00121 itkStaticConstMacro(PixelDimension, unsigned int,
00122 InputPixelType::Dimension );
00123 itkStaticConstMacro(OutputPixelDimension, unsigned int,
00124 OutputPixelType::Dimension );
00126
00127
00128 #ifdef ITK_USE_CONCEPT_CHECKING
00129
00130 itkConceptMacro(OutputHasNumericTraitsCheck,
00131 (Concept::HasNumericTraits<typename OutputPixelType::ValueType>));
00132 itkConceptMacro(SameDimensionCheck1,
00133 (Concept::SameDimension<ImageDimension,OutputImageDimension>));
00134 itkConceptMacro(SameDimensionCheck2,
00135 (Concept::SameDimension<ImageDimension,PixelDimension>));
00136 itkConceptMacro(SameDimensionCheck3,
00137 (Concept::SameDimension<ImageDimension,OutputPixelDimension>));
00138
00140 #endif
00141
00142 protected:
00143 ExponentialDeformationFieldImageFilter();
00144 virtual ~ExponentialDeformationFieldImageFilter() {};
00145
00146 void PrintSelf(std::ostream& os, Indent indent) const;
00147
00151 void GenerateData();
00152
00153 typedef typename InputImageType::RegionType RegionType;
00154
00155 typedef DivideByConstantImageFilter<
00156 InputImageType,
00157 InputPixelRealValueType, OutputImageType > DivideByConstantType;
00158
00159 typedef CastImageFilter<
00160 InputImageType, OutputImageType> CasterType;
00161
00162 typedef WarpVectorImageFilter<
00163 OutputImageType,
00164 OutputImageType, OutputImageType> VectorWarperType;
00165
00166 typedef VectorLinearInterpolateNearestNeighborExtrapolateImageFunction<
00167 OutputImageType,double> FieldInterpolatorType;
00168
00169 typedef AddImageFilter<
00170 OutputImageType, OutputImageType, OutputImageType> AdderType;
00171
00172 typedef typename DivideByConstantType::Pointer DivideByConstantPointer;
00173 typedef typename CasterType::Pointer CasterPointer;
00174 typedef typename VectorWarperType::Pointer VectorWarperPointer;
00175 typedef typename FieldInterpolatorType::Pointer FieldInterpolatorPointer;
00176 typedef typename FieldInterpolatorType::OutputType FieldInterpolatorOutputType;
00177 typedef typename AdderType::Pointer AdderPointer;
00178
00179
00180 private:
00181 ExponentialDeformationFieldImageFilter(const Self&);
00182 void operator=(const Self&);
00183
00184 bool m_AutomaticNumberOfIterations;
00185 unsigned int m_MaximumNumberOfIterations;
00186
00187 bool m_ComputeInverse;
00188
00189 DivideByConstantPointer m_Divider;
00190 CasterPointer m_Caster;
00191 VectorWarperPointer m_Warper;
00192 AdderPointer m_Adder;
00193 };
00194
00195
00196 }
00197
00198 #ifndef ITK_MANUAL_INSTANTIATION
00199 #include "itkExponentialDeformationFieldImageFilter.txx"
00200 #endif
00201
00202 #endif
00203