go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkParabolicErodeDilateImageFilter.h
Go to the documentation of this file.
00001 #ifndef __itkParabolicErodeDilateImageFilter_h
00002 #define __itkParabolicErodeDilateImageFilter_h
00003 
00004 #include "itkImageToImageFilter.h"
00005 #include "itkNumericTraits.h"
00006 #include "itkProgressReporter.h"
00007 
00008 namespace itk
00009 {
00045 template <typename TInputImage,
00046     bool doDilate,
00047           typename TOutputImage= TInputImage >
00048 class ITK_EXPORT ParabolicErodeDilateImageFilter:
00049     public ImageToImageFilter<TInputImage,TOutputImage>
00050 {
00051 
00052 public:
00054   typedef ParabolicErodeDilateImageFilter  Self;
00055   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00056   typedef SmartPointer<Self>                   Pointer;
00057   typedef SmartPointer<const Self>        ConstPointer;
00058 
00060   itkNewMacro(Self);
00061 
00063   itkTypeMacro(ParabolicErodeDilateImageFilter, ImageToImageFilter);
00064 
00066   typedef TInputImage                                    InputImageType;
00067   typedef TOutputImage                                   OutputImageType;
00068   typedef typename TInputImage::PixelType                PixelType;
00069   typedef typename NumericTraits<PixelType>::RealType    RealType;
00070   typedef typename NumericTraits<PixelType>::ScalarRealType ScalarRealType;
00071   typedef typename TOutputImage::PixelType  OutputPixelType;
00072 
00074   typedef typename TInputImage::Pointer  InputImagePointer;
00075   typedef typename TInputImage::ConstPointer  InputImageConstPointer;
00076   typedef typename TInputImage::SizeType    InputSizeType;
00077   typedef typename TOutputImage::SizeType   OutputSizeType;
00078 
00079 
00081   typedef typename itk::FixedArray<ScalarRealType, TInputImage::ImageDimension> RadiusType;
00082 
00084   itkStaticConstMacro(ImageDimension, unsigned int,
00085                       TInputImage::ImageDimension);
00086   itkStaticConstMacro(OutputImageDimension, unsigned int,
00087                       TOutputImage::ImageDimension);
00088   itkStaticConstMacro(InputImageDimension, unsigned int,
00089                       TInputImage::ImageDimension);
00090 
00091 
00092   typedef typename OutputImageType::RegionType OutputImageRegionType;
00097   typedef typename NumericTraits< PixelType >::FloatType   InternalRealType;
00098   //typedef typename Image<InternalRealType, itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00099 
00100   // set all of the scales the same
00101   void SetScale(ScalarRealType scale);
00102   itkSetMacro(Scale, RadiusType);
00103   itkGetConstReferenceMacro(Scale, RadiusType);
00104 
00109   itkSetMacro(UseImageSpacing, bool);
00110   itkGetConstReferenceMacro(UseImageSpacing, bool);
00111   itkBooleanMacro(UseImageSpacing);
00114 #ifdef ITK_USE_CONCEPT_CHECKING
00115 
00116   itkConceptMacro(SameDimension,
00117                   (Concept::SameDimension<itkGetStaticConstMacro(InputImageDimension),itkGetStaticConstMacro(OutputImageDimension)>));
00118 
00119   itkConceptMacro(Comparable,
00120       (Concept::Comparable<PixelType>));
00121 
00123 #endif
00124 
00125 protected:
00126   ParabolicErodeDilateImageFilter();
00127   virtual ~ParabolicErodeDilateImageFilter() {};
00128   void PrintSelf(std::ostream& os, Indent indent) const;
00129 
00131   void GenerateData( void );
00132   int SplitRequestedRegion(int i, int num, OutputImageRegionType& splitRegion);
00133   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
00134 
00135 //  virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00136   // Override since the filter produces the entire dataset.
00137   void EnlargeOutputRequestedRegion(DataObject *output);
00138 
00139   bool m_UseImageSpacing;
00140 
00141 private:
00142   ParabolicErodeDilateImageFilter(const Self&); //purposely not implemented
00143   void operator=(const Self&); //purposely not implemented
00144   RadiusType m_Scale;
00145   typename TInputImage::PixelType m_Extreme;
00146 
00147   int m_MagnitudeSign;
00148   int m_CurrentDimension;
00149 };
00150 
00151 } // end namespace itk
00152 
00153 #ifndef ITK_MANUAL_INSTANTIATION
00154 #include "itkParabolicErodeDilateImageFilter.txx"
00155 #endif
00156 
00157 
00158 #endif


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo