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

itkSimpleContourExtractorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSimpleContourExtractorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/01/09 13:45:53 $
00007   Version:   $Revision: 1.2 $
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 __itkSimpleContourExtractorImageFilter_h
00018 #define __itkSimpleContourExtractorImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkNumericTraits.h"
00023 
00024 namespace itk
00025 {
00046 template <class TInputImage, class TOutputImage>
00047 class ITK_EXPORT SimpleContourExtractorImageFilter :
00048     public ImageToImageFilter< TInputImage, TOutputImage >
00049 {
00050 public:
00052   itkStaticConstMacro(InputImageDimension, unsigned int,
00053     TInputImage::ImageDimension);
00054   itkStaticConstMacro(OutputImageDimension, unsigned int,
00055     TOutputImage::ImageDimension);
00056   
00058   typedef TInputImage InputImageType;
00059   typedef TOutputImage OutputImageType;
00060   
00062   typedef SimpleContourExtractorImageFilter Self;
00063   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00064   typedef SmartPointer<Self> Pointer;
00065   typedef SmartPointer<const Self>  ConstPointer;
00066   
00068   itkNewMacro(Self);
00069   
00071   itkTypeMacro(SimpleContourExtractorImageFilter, ImageToImageFilter);
00072   
00074   typedef typename InputImageType::PixelType InputPixelType;
00075   typedef typename OutputImageType::PixelType OutputPixelType;
00076   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00077   
00078   typedef typename InputImageType::RegionType InputImageRegionType;
00079   typedef typename OutputImageType::RegionType OutputImageRegionType;
00080   
00081   typedef typename InputImageType::SizeType InputSizeType;
00082   
00085   itkSetMacro(Radius, InputSizeType);
00086   
00089   itkGetConstReferenceMacro(Radius, InputSizeType);
00090 
00093   itkSetMacro(InputForegroundValue, InputPixelType);
00094 
00097   itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
00098 
00101   itkSetMacro(InputBackgroundValue, InputPixelType);
00102   
00105   itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
00106 
00109   itkSetMacro(OutputForegroundValue, OutputPixelType);
00110 
00113   itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
00114 
00117   itkSetMacro(OutputBackgroundValue, OutputPixelType);
00118 
00121   itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
00122   
00130   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00131 
00132 protected:
00133   SimpleContourExtractorImageFilter();
00134   virtual ~SimpleContourExtractorImageFilter() {}
00135   void PrintSelf(std::ostream& os, Indent indent) const;
00136   
00148   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00149                               int threadId );
00150   
00151 private:
00152   SimpleContourExtractorImageFilter(const Self&); //purposely not implemented
00153   void operator=(const Self&); //purposely not implemented
00154   
00155   InputSizeType m_Radius;
00156   InputPixelType m_InputForegroundValue;
00157   InputPixelType m_InputBackgroundValue;
00158   OutputPixelType m_OutputForegroundValue;
00159   OutputPixelType m_OutputBackgroundValue;
00160 };
00161   
00162 } // end namespace itk
00163 
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkSimpleContourExtractorImageFilter.txx"
00166 #endif
00167 
00168 #endif

Generated at Thu May 25 00:04:18 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000