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 __itkOptSimpleContourExtractorImageFilter_h
00018 #define __itkOptSimpleContourExtractorImageFilter_h
00019
00020 #include "itkBoxImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkNumericTraits.h"
00023
00024 namespace itk
00025 {
00046 template <class TInputImage, class TOutputImage>
00047 class ITK_EXPORT SimpleContourExtractorImageFilter :
00048 public BoxImageFilter< TInputImage, TOutputImage >
00049 {
00050 public:
00052 itkStaticConstMacro(InputImageDimension, unsigned int,
00053 TInputImage::ImageDimension);
00054 itkStaticConstMacro(OutputImageDimension, unsigned int,
00055 TOutputImage::ImageDimension);
00057
00059 typedef TInputImage InputImageType;
00060 typedef TOutputImage OutputImageType;
00061
00063 typedef SimpleContourExtractorImageFilter Self;
00064 typedef BoxImageFilter< InputImageType, OutputImageType> Superclass;
00065 typedef SmartPointer<Self> Pointer;
00066 typedef SmartPointer<const Self> ConstPointer;
00067
00069 itkNewMacro(Self);
00070
00072 itkTypeMacro(SimpleContourExtractorImageFilter, ImageToImageFilter);
00073
00075 typedef typename InputImageType::PixelType InputPixelType;
00076 typedef typename OutputImageType::PixelType OutputPixelType;
00077 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00078
00079 typedef typename InputImageType::RegionType InputImageRegionType;
00080 typedef typename OutputImageType::RegionType OutputImageRegionType;
00081
00082 typedef typename InputImageType::SizeType InputSizeType;
00083
00086 itkSetMacro(InputForegroundValue, InputPixelType);
00087
00090 itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
00091
00094 itkSetMacro(InputBackgroundValue, InputPixelType);
00095
00098 itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
00099
00102 itkSetMacro(OutputForegroundValue, OutputPixelType);
00103
00106 itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
00107
00110 itkSetMacro(OutputBackgroundValue, OutputPixelType);
00111
00114 itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
00115
00116 #ifdef ITK_USE_CONCEPT_CHECKING
00117
00118 itkConceptMacro(InputHasNumericTraitsCheck,
00119 (Concept::HasNumericTraits<InputPixelType>));
00120 itkConceptMacro(OutputHasNumericTraitsCheck,
00121 (Concept::HasNumericTraits<OutputPixelType>));
00122
00124 #endif
00125
00126 protected:
00127 SimpleContourExtractorImageFilter();
00128 virtual ~SimpleContourExtractorImageFilter() {}
00129 void PrintSelf(std::ostream& os, Indent indent) const;
00130
00142 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00143 int threadId );
00144
00145 private:
00146 SimpleContourExtractorImageFilter(const Self&);
00147 void operator=(const Self&);
00148
00149 InputPixelType m_InputForegroundValue;
00150 InputPixelType m_InputBackgroundValue;
00151 OutputPixelType m_OutputForegroundValue;
00152 OutputPixelType m_OutputBackgroundValue;
00153 };
00154
00155 }
00156
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkOptSimpleContourExtractorImageFilter.txx"
00159 #endif
00160
00161 #endif
00162