itkDoubleThresholdImageFilter.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 __itkDoubleThresholdImageFilter_h
00018 #define __itkDoubleThresholdImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkConceptChecking.h"
00022
00023 namespace itk
00024 {
00025
00053 template <class TInputImage, class TOutputImage>
00054 class ITK_EXPORT DoubleThresholdImageFilter :
00055 public ImageToImageFilter<TInputImage, TOutputImage>
00056 {
00057 public:
00059 typedef DoubleThresholdImageFilter Self;
00060 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00061 typedef SmartPointer<Self> Pointer;
00062 typedef SmartPointer<const Self> ConstPointer;
00063
00065 itkNewMacro(Self);
00066
00068 itkTypeMacro(DoubleThresholdImageFilter, ImageToImageFilter);
00069
00071 typedef typename Superclass::InputImagePointer InputImagePointer;
00072 typedef typename Superclass::InputImageType InputImageType;
00073
00075 typedef typename TInputImage::PixelType InputPixelType;
00076 typedef typename TOutputImage::PixelType OutputPixelType;
00077
00080 itkSetMacro(OutsideValue,OutputPixelType);
00081
00083 itkGetMacro(OutsideValue,OutputPixelType);
00084
00087 itkSetMacro(InsideValue,OutputPixelType);
00088
00090 itkGetMacro(InsideValue,OutputPixelType);
00091
00097 itkSetMacro( Threshold1, InputPixelType );
00098 itkSetMacro( Threshold2, InputPixelType );
00099 itkSetMacro( Threshold3, InputPixelType );
00100 itkSetMacro( Threshold4, InputPixelType );
00102
00104 itkGetMacro( Threshold1, InputPixelType );
00105 itkGetMacro( Threshold2, InputPixelType );
00106 itkGetMacro( Threshold3, InputPixelType );
00107 itkGetMacro( Threshold4, InputPixelType );
00109
00114 unsigned long GetNumberOfIterationsUsed()
00115 {
00116 itkLegacyBodyMacro(itk::DoubleThresholdImageFilter::GetNumberOfIterationsUsed, 2.2);
00117 return m_NumberOfIterationsUsed;
00118 };
00120
00127 itkSetMacro(FullyConnected, bool);
00128 itkGetConstReferenceMacro(FullyConnected, bool);
00129 itkBooleanMacro(FullyConnected);
00131
00132 #ifdef ITK_USE_CONCEPT_CHECKING
00133
00134 itkConceptMacro(OutputEqualityComparableCheck,
00135 (Concept::EqualityComparable<OutputPixelType>));
00136 itkConceptMacro(InputComparableCheck,
00137 (Concept::Comparable<InputPixelType>));
00138 itkConceptMacro(InputOStreamWritableCheck,
00139 (Concept::OStreamWritable<InputPixelType>));
00140 itkConceptMacro(OutputOStreamWritableCheck,
00141 (Concept::OStreamWritable<OutputPixelType>));
00142
00144 #endif
00145
00146 protected:
00147 DoubleThresholdImageFilter();
00148 virtual ~DoubleThresholdImageFilter() {}
00149 void PrintSelf(std::ostream& os, Indent indent) const;
00150
00153 void GenerateInputRequestedRegion();
00154
00157 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00158
00162 void GenerateData();
00163
00164 private:
00165 DoubleThresholdImageFilter(const Self&);
00166 void operator=(const Self&);
00167
00168 InputPixelType m_Threshold1;
00169 InputPixelType m_Threshold2;
00170 InputPixelType m_Threshold3;
00171 InputPixelType m_Threshold4;
00172
00173 OutputPixelType m_InsideValue;
00174 OutputPixelType m_OutsideValue;
00175
00176 unsigned long m_NumberOfIterationsUsed;
00177
00178 bool m_FullyConnected;
00179 };
00180
00181 }
00182
00183 #ifndef ITK_MANUAL_INSTANTIATION
00184 #include "itkDoubleThresholdImageFilter.txx"
00185 #endif
00186
00187 #endif
00188