itkTwoOutputExampleImageFilter.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 __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:
00044 public ImageToImageFilter<TImage, TImage>
00045 {
00046 public:
00048 typedef TwoOutputExampleImageFilter Self;
00049 typedef ImageToImageFilter<TImage,TImage> Superclass;
00050 typedef SmartPointer<Self> Pointer;
00051 typedef SmartPointer<const Self> ConstPointer;
00052
00054 itkNewMacro(Self);
00055
00057 typedef typename TImage::PixelType PixelType;
00058
00060 itkTypeMacro(TwoOutputExampleImageFilter, ImageToImageFilter);
00061
00064 itkSetMacro(OutsideValue,PixelType);
00065
00067 itkGetConstMacro(OutsideValue,PixelType);
00068
00070 void ThresholdAbove(PixelType &thresh);
00071
00073 void ThresholdBelow(PixelType &thresh);
00074
00076 void ThresholdOutside(PixelType &lower, PixelType &upper);
00077
00078 typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00079
00081 typedef TImage OutputImageType;
00082 typedef typename OutputImageType::Pointer OutputImagePointer;
00083 typedef typename OutputImageType::RegionType OutputImageRegionType;
00084 typedef typename OutputImageType::PixelType OutputImagePixelType;
00085
00087 OutputImagePointer GetInverseOutput()
00088 { return static_cast<TImage *>(this->ProcessObject::GetOutput(1)); }
00089
00091 void SetInverseOutput(OutputImageType *output)
00092 { this->SetNthOutput(1, output); }
00093
00094 #ifdef ITK_USE_CONCEPT_CHECKING
00095
00096 itkConceptMacro(ComparableCheck,
00097 (Concept::Comparable<PixelType>));
00098 itkConceptMacro(OStreamWritableCheck,
00099 (Concept::OStreamWritable<PixelType>));
00100
00102 #endif
00103
00104 protected:
00105 TwoOutputExampleImageFilter();
00106 ~TwoOutputExampleImageFilter() {};
00107 void PrintSelf(std::ostream& os, Indent indent) const;
00108
00119 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00120 int threadId );
00121
00122 private:
00123 TwoOutputExampleImageFilter(const Self&);
00124 void operator=(const Self&);
00125
00126 PixelType m_OutsideValue;
00127 PixelType m_Lower;
00128 PixelType m_Upper;
00129 };
00130
00131
00132 }
00133
00134 #ifndef ITK_MANUAL_INSTANTIATION
00135 #include "itkTwoOutputExampleImageFilter.txx"
00136 #endif
00137
00138 #endif
00139