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: 2006/03/30 15:36:25 $
00007   Version:   $Revision: 1.3 $
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);
00057 
00059   typedef TInputImage InputImageType;
00060   typedef TOutputImage OutputImageType;
00061 
00063   typedef SimpleContourExtractorImageFilter Self;
00064   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00065   typedef SmartPointer<Self> Pointer;
00066   typedef SmartPointer<const Self>  ConstPointer;
00067 
00069   itkNewMacro(Self);
00070 
00072   itkTypeMacro(SimpleContourExtractorImageFilter, ImageToImageFilter);
00073 
00075   typedef typename InputImageType::PixelType InputPixelType;
00076   typedef typename OutputImageType::PixelType OutputPixelType;
00077   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00078 
00079   typedef typename InputImageType::RegionType InputImageRegionType;
00080   typedef typename OutputImageType::RegionType OutputImageRegionType;
00081   
00082   typedef typename InputImageType::SizeType InputSizeType;
00083   
00086   itkSetMacro(Radius, InputSizeType);
00087 
00090   itkGetConstReferenceMacro(Radius, InputSizeType);
00091 
00094   itkSetMacro(InputForegroundValue, InputPixelType);
00095 
00098   itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
00099 
00102   itkSetMacro(InputBackgroundValue, InputPixelType);
00103 
00106   itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
00107 
00110   itkSetMacro(OutputForegroundValue, OutputPixelType);
00111 
00114   itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
00115 
00118   itkSetMacro(OutputBackgroundValue, OutputPixelType);
00119 
00122   itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
00123 
00131   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00132 
00133 #ifdef ITK_USE_CONCEPT_CHECKING
00134 
00135   itkConceptMacro(InputHasNumericTraitsCheck,
00136                   (Concept::HasNumericTraits<InputPixelType>));
00137   itkConceptMacro(OutputHasNumericTraitsCheck,
00138                   (Concept::HasNumericTraits<OutputPixelType>));
00139 
00141 #endif
00142 
00143 protected:
00144   SimpleContourExtractorImageFilter();
00145   virtual ~SimpleContourExtractorImageFilter() {}
00146   void PrintSelf(std::ostream& os, Indent indent) const;
00147   
00159   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00160                               int threadId );
00161 
00162 private:
00163   SimpleContourExtractorImageFilter(const Self&); //purposely not implemented
00164   void operator=(const Self&); //purposely not implemented
00165   
00166   InputSizeType m_Radius;
00167   InputPixelType m_InputForegroundValue;
00168   InputPixelType m_InputBackgroundValue;
00169   OutputPixelType m_OutputForegroundValue;
00170   OutputPixelType m_OutputBackgroundValue;
00171 };
00172   
00173 } // end namespace itk
00174 
00175 #ifndef ITK_MANUAL_INSTANTIATION
00176 #include "itkSimpleContourExtractorImageFilter.txx"
00177 #endif
00178 
00179 #endif
00180 

Generated at Tue Jul 29 22:26:10 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000