00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkTwoOutputExampleImageFilter_h
00018 #define __itkTwoOutputExampleImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk
00023 {
00024
00042 template <class TImage>
00043 class ITK_EXPORT TwoOutputExampleImageFilter:public ImageToImageFilter<TImage,TImage>
00044 {
00045 public:
00047 typedef TwoOutputExampleImageFilter Self;
00048 typedef ImageToImageFilter<TImage,TImage> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkNewMacro(Self);
00054
00056 typedef typename TImage::PixelType PixelType;
00057
00059 itkTypeMacro(TwoOutputExampleImageFilter, ImageToImageFilter);
00060
00063 itkSetMacro(OutsideValue,PixelType);
00064
00066 itkGetMacro(OutsideValue,PixelType);
00067
00069 void ThresholdAbove(PixelType &thresh);
00070
00072 void ThresholdBelow(PixelType &thresh);
00073
00075 void ThresholdOutside(PixelType &lower, PixelType &upper);
00076
00077 typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00078
00080 typedef TImage OutputImageType;
00081 typedef typename OutputImageType::Pointer OutputImagePointer;
00082 typedef typename OutputImageType::RegionType OutputImageRegionType;
00083 typedef typename OutputImageType::PixelType OutputImagePixelType;
00084
00086 OutputImagePointer GetInverseOutput();
00087
00089 void SetInverseOutput(OutputImageType *output)
00090 { this->SetNthOutput(1, output); };
00091
00092 protected:
00093 TwoOutputExampleImageFilter();
00094 ~TwoOutputExampleImageFilter() {};
00095 void PrintSelf(std::ostream& os, Indent indent) const;
00096
00107 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00108 int threadId );
00109
00110 private:
00111 TwoOutputExampleImageFilter(const Self&);
00112 void operator=(const Self&);
00113
00114 PixelType m_OutsideValue;
00115 PixelType m_Lower;
00116 PixelType m_Upper;
00117 };
00118
00119
00120 }
00121
00122 #ifndef ITK_MANUAL_INSTANTIATION
00123 #include "itkTwoOutputExampleImageFilter.txx"
00124 #endif
00125
00126 #endif