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
00107 itkStaticConstMacro(ImageDimension, unsigned int,
00108 TInputImage::ImageDimension);
00109 itkStaticConstMacro(OutputImageDimension, unsigned int,
00110 TInputImage::ImageDimension );
00111 itkStaticConstMacro(PixelDimension, unsigned int,
00112 InputPixelType::Dimension );
00113 itkStaticConstMacro(OutputPixelDimension, unsigned int,
00114 OutputPixelType::Dimension );
00116
00117
00118 #ifdef ITK_USE_CONCEPT_CHECKING
00119
00120 itkConceptMacro(OutputHasNumericTraitsCheck,
00121 (Concept::HasNumericTraits<typename OutputPixelType::ValueType>));
00122 itkConceptMacro(SameDimensionCheck1,
00123 (Concept::SameDimension<ImageDimension,OutputImageDimension>));
00124 itkConceptMacro(SameDimensionCheck2,
00125 (Concept::SameDimension<ImageDimension,PixelDimension>));
00126 itkConceptMacro(SameDimensionCheck3,
00127 (Concept::SameDimension<ImageDimension,OutputPixelDimension>));
00128
00130 #endif
00131
00132 protected:
00133 ExponentialDeformationFieldImageFilter();
00134 virtual ~ExponentialDeformationFieldImageFilter() {};
00135
00136 void PrintSelf(std::ostream& os, Indent indent) const;
00137
00141 void GenerateData();
00142
00143 typedef typename InputImageType::RegionType RegionType;
00144
00145 typedef DivideByConstantImageFilter<
00146 InputImageType,
00147 InputPixelRealValueType, OutputImageType > DivideByConstantType;
00148
00149 typedef CastImageFilter<
00150 InputImageType, OutputImageType> CasterType;
00151
00152 typedef WarpVectorImageFilter<
00153 OutputImageType,
00154 OutputImageType, OutputImageType> VectorWarperType;
00155
00156 typedef VectorLinearInterpolateNearestNeighborExtrapolateImageFunction<
00157 OutputImageType,double> FieldInterpolatorType;
00158
00159 typedef AddImageFilter<
00160 OutputImageType, OutputImageType, OutputImageType> AdderType;
00161
00162 typedef typename DivideByConstantType::Pointer DivideByConstantPointer;
00163 typedef typename CasterType::Pointer CasterPointer;
00164 typedef typename VectorWarperType::Pointer VectorWarperPointer;
00165 typedef typename FieldInterpolatorType::Pointer FieldInterpolatorPointer;
00166 typedef typename FieldInterpolatorType::OutputType FieldInterpolatorOutputType;
00167 typedef typename AdderType::Pointer AdderPointer;
00168
00169
00170 private:
00171 ExponentialDeformationFieldImageFilter(const Self&);
00172 void operator=(const Self&);
00173
00174 bool m_AutomaticNumberOfIterations;
00175 unsigned int m_MaximumNumberOfIterations;
00176
00177 DivideByConstantPointer m_Divider;
00178 CasterPointer m_Caster;
00179 VectorWarperPointer m_Warper;
00180 AdderPointer m_Adder;
00181 };
00182
00183
00184 }
00185
00186 #ifndef ITK_MANUAL_INSTANTIATION
00187 #include "itkExponentialDeformationFieldImageFilter.txx"
00188 #endif
00189
00190 #endif
00191