Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkTwoOutputExampleImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTwoOutputExampleImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/04/03 15:07:52 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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&); //purposely not implemented
00122   void operator=(const Self&); //purposely not implemented
00123 
00124   PixelType m_OutsideValue;
00125   PixelType m_Lower;
00126   PixelType m_Upper;
00127 };
00128 
00129   
00130 } // end namespace itk
00131   
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkTwoOutputExampleImageFilter.txx"
00134 #endif
00135   
00136 #endif
00137 

Generated at Mon Mar 12 03:15:19 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000