itkDerivativeImageFilter.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 #ifndef __itkDerivativeImageFilter_h
00018 #define __itkDerivativeImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkConceptChecking.h"
00023
00024 namespace itk
00025 {
00043 template <class TInputImage, class TOutputImage>
00044 class ITK_EXPORT DerivativeImageFilter :
00045 public ImageToImageFilter< TInputImage, TOutputImage >
00046 {
00047 public:
00049 typedef DerivativeImageFilter Self;
00050 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00056 typedef typename TOutputImage::PixelType OutputPixelType;
00057 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00058 typedef typename TInputImage::PixelType InputPixelType;
00059 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00060
00063 itkStaticConstMacro(ImageDimension, unsigned int,
00064 TOutputImage::ImageDimension);
00065
00067 typedef TInputImage InputImageType;
00068 typedef TOutputImage OutputImageType;
00069
00071 itkNewMacro(Self);
00072
00074 itkTypeMacro(DerivativeImageFilter, ImageToImageFilter);
00075
00077 #ifdef ITK_USE_CONCEPT_CHECKING
00078
00080 itkConceptMacro(SignedOutputPixelType,
00081 (Concept::Signed<OutputPixelType>));
00082
00084 #endif
00085
00087 itkSetMacro(Order, unsigned int);
00088 itkGetConstMacro(Order, unsigned int);
00089 itkSetMacro(Direction, unsigned int);
00090 itkGetConstMacro(Direction, unsigned int);
00092
00095 void SetUseImageSpacingOn()
00096 { this->SetUseImageSpacing(true); }
00097
00100 void SetUseImageSpacingOff()
00101 { this->SetUseImageSpacing(false); }
00102
00105 itkSetMacro(UseImageSpacing, bool);
00106 itkGetConstMacro(UseImageSpacing, bool);
00108
00116 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00117
00118 protected:
00119 DerivativeImageFilter()
00120 {
00121 m_Order = 1;
00122 m_Direction = 0;
00123 m_UseImageSpacing = true;
00124 }
00125 virtual ~DerivativeImageFilter() {}
00126 void PrintSelf(std::ostream& os, Indent indent) const;
00127
00133 void GenerateData();
00134
00135 private:
00136 DerivativeImageFilter(const Self&);
00137 void operator=(const Self&);
00138
00140 unsigned int m_Order;
00141
00143 unsigned int m_Direction;
00144
00145 bool m_UseImageSpacing;
00146
00147 };
00148
00149 }
00150
00151 #ifndef ITK_MANUAL_INSTANTIATION
00152 #include "itkDerivativeImageFilter.txx"
00153 #endif
00154
00155 #endif
00156