00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkIsolatedConnectedImageFilter_h
00018 #define __itkIsolatedConnectedImageFilter_h
00019
00020 #include "itkImage.h"
00021 #include "itkImageToImageFilter.h"
00022
00023 namespace itk{
00024
00038 template <class TInputImage, class TOutputImage>
00039 class IsolatedConnectedImageFilter:
00040 public ImageToImageFilter<TInputImage,TOutputImage>
00041 {
00042 public:
00044 typedef IsolatedConnectedImageFilter Self;
00045 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00046 typedef SmartPointer<Self> Pointer;
00047 typedef SmartPointer<const Self> ConstPointer;
00048
00050 itkNewMacro(Self);
00051
00053 itkTypeMacro(IsolatedConnectedImageFilter,
00054 ImageToImageFilter);
00055
00056 typedef TInputImage InputImageType;
00057 typedef typename InputImageType::Pointer InputImagePointer;
00058 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00059 typedef typename InputImageType::RegionType InputImageRegionType;
00060 typedef typename InputImageType::PixelType InputImagePixelType;
00061 typedef typename InputImageType::IndexType IndexType;
00062 typedef typename InputImageType::SizeType SizeType;
00063
00064 typedef TOutputImage OutputImageType;
00065 typedef typename OutputImageType::Pointer OutputImagePointer;
00066 typedef typename OutputImageType::RegionType OutputImageRegionType;
00067 typedef typename OutputImageType::PixelType OutputImagePixelType;
00068
00069 void PrintSelf ( std::ostream& os, Indent indent ) const;
00070
00074 itkSetMacro(Seed1, IndexType);
00075
00077 itkSetMacro(Seed2, IndexType);
00078
00080 itkSetMacro(Lower, InputImagePixelType);
00081 itkGetMacro(Lower, InputImagePixelType);
00082
00084 itkSetMacro(IsolatedValueTolerance, InputImagePixelType);
00085 itkGetMacro(IsolatedValueTolerance, InputImagePixelType);
00086
00088 itkSetMacro(UpperValueLimit, InputImagePixelType);
00089 itkGetMacro(UpperValueLimit, InputImagePixelType);
00090
00091
00095 itkSetMacro(ReplaceValue, OutputImagePixelType);
00096 itkGetMacro(ReplaceValue, OutputImagePixelType);
00097
00099 itkGetMacro(IsolatedValue, OutputImagePixelType);
00100
00101 protected:
00102 IsolatedConnectedImageFilter();
00103 ~IsolatedConnectedImageFilter(){};
00104 IndexType m_Seed1;
00105 IndexType m_Seed2;
00106 InputImagePixelType m_Lower;
00107 OutputImagePixelType m_ReplaceValue;
00108 InputImagePixelType m_IsolatedValue;
00109 InputImagePixelType m_IsolatedValueTolerance;
00110 InputImagePixelType m_UpperValueLimit;
00111
00112
00113 void GenerateInputRequestedRegion();
00114
00115
00116 void EnlargeOutputRequestedRegion(DataObject *output);
00117
00118 void GenerateData();
00119
00120 private:
00121 IsolatedConnectedImageFilter(const Self&);
00122 void operator=(const Self&);
00123
00124 };
00125
00126 }
00127
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkIsolatedConnectedImageFilter.txx"
00130 #endif
00131
00132 #endif