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: 2009-04-25 12:28:11 $
00007   Version:   $Revision: 1.13 $
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:
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&); //purposely not implemented
00124   void operator=(const Self&); //purposely not implemented
00125 
00126   PixelType m_OutsideValue;
00127   PixelType m_Lower;
00128   PixelType m_Upper;
00129 };
00130 
00131   
00132 } // end namespace itk
00133   
00134 #ifndef ITK_MANUAL_INSTANTIATION
00135 #include "itkTwoOutputExampleImageFilter.txx"
00136 #endif
00137   
00138 #endif
00139 

Generated at Tue Sep 15 05:12:02 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000