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

itkZeroCrossingImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkZeroCrossingImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:28:13 $
00007   Version:   $Revision: 1.14 $
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 __itkZeroCrossingImageFilter_h
00018 #define __itkZeroCrossingImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 namespace itk
00023 {  
00055 template<class TInputImage, class TOutputImage>
00056 class ITK_EXPORT ZeroCrossingImageFilter
00057   : public ImageToImageFilter<TInputImage, TOutputImage>
00058 {
00059 public:
00061   typedef ZeroCrossingImageFilter                       Self;
00062   typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00063 
00065   typedef TInputImage  InputImageType;
00066   typedef TOutputImage OutputImageType;
00067 
00069   typedef SmartPointer<Self>        Pointer;
00070   typedef SmartPointer<const Self>  ConstPointer;
00071 
00073   typedef typename TInputImage::PixelType   InputImagePixelType;
00074   typedef typename TOutputImage::PixelType  OutputImagePixelType;
00075 
00077   itkNewMacro(Self);  
00078 
00080   typedef typename TOutputImage::RegionType OutputImageRegionType;
00081 
00083   itkTypeMacro(ZeroCrossingImageFilter, ImageToImageFilter);
00084 
00086   itkStaticConstMacro(ImageDimension, unsigned int,
00087                       TInputImage::ImageDimension );
00088   itkStaticConstMacro(OutputImageDimension, unsigned int,
00089                       TOutputImage::ImageDimension );
00091 
00100   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00101 
00103   itkSetMacro(ForegroundValue, OutputImagePixelType);
00104   itkGetConstMacro(ForegroundValue, OutputImagePixelType);
00106 
00108   itkSetMacro(BackgroundValue, OutputImagePixelType);
00109   itkGetConstMacro(BackgroundValue, OutputImagePixelType);
00111 
00112 #ifdef ITK_USE_CONCEPT_CHECKING
00113 
00114   itkConceptMacro(OutputEqualityComparableCheck,
00115     (Concept::EqualityComparable<OutputImagePixelType>));
00116   itkConceptMacro(SameDimensionCheck,
00117     (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00118   itkConceptMacro(InputComparableCheck,
00119     (Concept::Comparable<InputImagePixelType>));
00120   itkConceptMacro(OutputOStreamWritableCheck,
00121     (Concept::OStreamWritable<OutputImagePixelType>));
00122 
00124 #endif
00125 
00126 protected:
00127   ZeroCrossingImageFilter()
00128     {
00129     m_ForegroundValue = NumericTraits<OutputImagePixelType>::One;
00130     m_BackgroundValue = NumericTraits<OutputImagePixelType>::Zero;
00131     }
00132   ~ZeroCrossingImageFilter(){}
00133   void PrintSelf(std::ostream& os, Indent indent) const;
00134   
00135   ZeroCrossingImageFilter(const Self&) {}
00136   OutputImagePixelType m_BackgroundValue;
00137   OutputImagePixelType m_ForegroundValue;
00138   
00150   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00151                             int threadId );
00152 };
00154 
00155 } //end of namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkZeroCrossingImageFilter.txx"
00159 #endif
00160   
00161 #endif
00162 

Generated at Mon Jul 12 2010 20:20:34 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000