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: 2008-10-17 20:49:56 $
00007   Version:   $Revision: 1.5 $
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 
00021 // First make sure that the configuration is available.
00022 // This line can be removed once the optimized versions
00023 // gets integrated into the main directories.
00024 #include "itkConfigure.h"
00025 
00026 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00027 #include "itkOptSimpleContourExtractorImageFilter.h"
00028 #else
00029 
00030 #include "itkImageToImageFilter.h"
00031 #include "itkImage.h"
00032 #include "itkNumericTraits.h"
00033 
00034 namespace itk
00035 {
00056 template <class TInputImage, class TOutputImage>
00057 class ITK_EXPORT SimpleContourExtractorImageFilter :
00058     public ImageToImageFilter< TInputImage, TOutputImage >
00059 {
00060 public:
00062   itkStaticConstMacro(InputImageDimension, unsigned int,
00063     TInputImage::ImageDimension);
00064   itkStaticConstMacro(OutputImageDimension, unsigned int,
00065     TOutputImage::ImageDimension);
00067 
00069   typedef TInputImage  InputImageType;
00070   typedef TOutputImage OutputImageType;
00071 
00073   typedef SimpleContourExtractorImageFilter                    Self;
00074   typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00075   typedef SmartPointer<Self>                                   Pointer;
00076   typedef SmartPointer<const Self>                             ConstPointer;
00077 
00079   itkNewMacro(Self);
00080 
00082   itkTypeMacro(SimpleContourExtractorImageFilter, ImageToImageFilter);
00083 
00085   typedef typename InputImageType::PixelType               InputPixelType;
00086   typedef typename OutputImageType::PixelType              OutputPixelType;
00087   typedef typename NumericTraits<InputPixelType>::RealType InputRealType;
00088 
00089   typedef typename InputImageType::RegionType  InputImageRegionType;
00090   typedef typename OutputImageType::RegionType OutputImageRegionType;
00091   
00092   typedef typename InputImageType::SizeType InputSizeType;
00093   
00096   itkSetMacro(Radius, InputSizeType);
00097 
00100   itkGetConstReferenceMacro(Radius, InputSizeType);
00101 
00104   itkSetMacro(InputForegroundValue, InputPixelType);
00105 
00108   itkGetConstReferenceMacro(InputForegroundValue, InputPixelType);
00109 
00112   itkSetMacro(InputBackgroundValue, InputPixelType);
00113 
00116   itkGetConstReferenceMacro(InputBackgroundValue, InputPixelType);
00117 
00120   itkSetMacro(OutputForegroundValue, OutputPixelType);
00121 
00124   itkGetConstReferenceMacro(OutputForegroundValue, OutputPixelType);
00125 
00128   itkSetMacro(OutputBackgroundValue, OutputPixelType);
00129 
00132   itkGetConstReferenceMacro(OutputBackgroundValue, OutputPixelType);
00133 
00141   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00142 
00143 #ifdef ITK_USE_CONCEPT_CHECKING
00144 
00145   itkConceptMacro(InputHasNumericTraitsCheck,
00146                   (Concept::HasNumericTraits<InputPixelType>));
00147   itkConceptMacro(OutputHasNumericTraitsCheck,
00148                   (Concept::HasNumericTraits<OutputPixelType>));
00149 
00151 #endif
00152 
00153 protected:
00154   SimpleContourExtractorImageFilter();
00155   virtual ~SimpleContourExtractorImageFilter() {}
00156   void PrintSelf(std::ostream& os, Indent indent) const;
00157   
00169   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00170                               int threadId );
00171 
00172 private:
00173   SimpleContourExtractorImageFilter(const Self&); //purposely not implemented
00174   void operator=(const Self&); //purposely not implemented
00175   
00176   InputSizeType   m_Radius;
00177   InputPixelType  m_InputForegroundValue;
00178   InputPixelType  m_InputBackgroundValue;
00179   OutputPixelType m_OutputForegroundValue;
00180   OutputPixelType m_OutputBackgroundValue;
00181 };
00182   
00183 } // end namespace itk
00184 
00185 #ifndef ITK_MANUAL_INSTANTIATION
00186 #include "itkSimpleContourExtractorImageFilter.txx"
00187 #endif
00188 
00189 #endif
00190 
00191 #endif
00192 

Generated at Tue Sep 15 04:58:30 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000