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 #ifdef ITK_USE_CONCEPT_CHECKING
00093
00094 itkConceptMacro(ComparableCheck,
00095 (Concept::Comparable<PixelType>));
00096 itkConceptMacro(OStreamWritableCheck,
00097 (Concept::OStreamWritable<PixelType>));
00098
00100 #endif
00101
00102 protected:
00103 TwoOutputExampleImageFilter();
00104 ~TwoOutputExampleImageFilter() {};
00105 void PrintSelf(std::ostream& os, Indent indent) const;
00106
00117 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00118 int threadId );
00119
00120 private:
00121 TwoOutputExampleImageFilter(const Self&);
00122 void operator=(const Self&);
00123
00124 PixelType m_OutsideValue;
00125 PixelType m_Lower;
00126 PixelType m_Upper;
00127 };
00128
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkTwoOutputExampleImageFilter.txx"
00134 #endif
00135
00136 #endif
00137