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 __itkSimpleContourExtractorImageFilter_h
00018 #define __itkSimpleContourExtractorImageFilter_h
00019
00020
00021
00022
00023
00024 #include "itkConfigure.h"
00025
00026 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00027 #include "itkOptSimpleContourExtractorImageFilter.h"
00028 #else
00029
00030 #include "itkImageToImageFilter.h"
00031 #include "itkImage.h"
00032 #include "itkNumericTraits.h"
00033
00034 namespace itk
00035 {
00056 template <class TInputImage, class TOutputImage>
00057 class ITK_EXPORT SimpleContourExtractorImageFilter :
00058 public ImageToImageFilter< TInputImage, TOutputImage >
00059 {
00060 public:
00062 itkStaticConstMacro(InputImageDimension, unsigned int,
00063 TInputImage::ImageDimension);
00064 itkStaticConstMacro(OutputImageDimension, unsigned int,
00065 TOutputImage::ImageDimension);
00067
00069 typedef TInputImage InputImageType;
00070 typedef TOutputImage OutputImageType;
00071
00073 typedef SimpleContourExtractorImageFilter Self;
00074 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00075 typedef SmartPointer<Self> Pointer;
00076 typedef SmartPointer<const Self> ConstPointer;
00077
00079 itkNewMacro(Self);
00080
00082 itkTypeMacro(SimpleContourExtractorImageFilter, ImageToImageFilter);
00083
00085 typedef typename InputImageType::PixelType InputPixelType;
00086 typedef typename OutputImageType::PixelType OutputPixelType;
00087 typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00088
00089 typedef typename InputImageType::RegionType InputImageRegionType;
00090 typedef typename OutputImageType::RegionType OutputImageRegionType;
00091
00092 typedef typename InputImageType::SizeType InputSizeType;
00093
00096 itkSetMacro(Radius, InputSizeType);
00097
00100 itkGetConstReferenceMacro(Radius, InputSizeType);
00101
00104 itkSetMacro(InputForegroundValue, InputPixelType);
00105
00108 itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
00109
00112 itkSetMacro(InputBackgroundValue, InputPixelType);
00113
00116 itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
00117
00120 itkSetMacro(OutputForegroundValue, OutputPixelType);
00121
00124 itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
00125
00128 itkSetMacro(OutputBackgroundValue, OutputPixelType);
00129
00132 itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
00133
00141 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00142
00143 #ifdef ITK_USE_CONCEPT_CHECKING
00144
00145 itkConceptMacro(InputHasNumericTraitsCheck,
00146 (Concept::HasNumericTraits<InputPixelType>));
00147 itkConceptMacro(OutputHasNumericTraitsCheck,
00148 (Concept::HasNumericTraits<OutputPixelType>));
00149
00151 #endif
00152
00153 protected:
00154 SimpleContourExtractorImageFilter();
00155 virtual ~SimpleContourExtractorImageFilter() {}
00156 void PrintSelf(std::ostream& os, Indent indent) const;
00157
00169 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00170 int threadId );
00171
00172 private:
00173 SimpleContourExtractorImageFilter(const Self&);
00174 void operator=(const Self&);
00175
00176 InputSizeType m_Radius;
00177 InputPixelType m_InputForegroundValue;
00178 InputPixelType m_InputBackgroundValue;
00179 OutputPixelType m_OutputForegroundValue;
00180 OutputPixelType m_OutputBackgroundValue;
00181 };
00182
00183 }
00184
00185 #ifndef ITK_MANUAL_INSTANTIATION
00186 #include "itkSimpleContourExtractorImageFilter.txx"
00187 #endif
00188
00189 #endif
00190
00191 #endif
00192