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

itkIsoContourDistanceImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkIsoContourDistanceImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:33 $
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 _itkIsoContourDistanceImageFilter_h
00018 #define _itkIsoContourDistanceImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNarrowBand.h"
00022 #include "itkBarrier.h"
00023 
00024 namespace itk
00025 {
00053 template <class TInputImage, class TOutputImage>
00054 class ITK_EXPORT IsoContourDistanceImageFilter :
00055     public ImageToImageFilter<TInputImage,TOutputImage>
00056 {
00057 public:
00059   typedef IsoContourDistanceImageFilter Self;
00060   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00061   typedef SmartPointer<Self> Pointer;
00062   typedef SmartPointer<const Self>  ConstPointer;
00063 
00065   itkNewMacro(Self);
00066 
00068   itkTypeMacro(IsoContourDistanceImageFilter, ImageToImageFilter);
00069   
00071   typedef typename Superclass::InputImageType  InputImageType;
00072   typedef typename Superclass::OutputImageType OutputImageType;
00073   
00076   itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
00077   
00080   typedef typename OutputImageType::PixelType PixelType;
00081   typedef typename InputImageType::PixelType InputPixelType;
00082   typedef typename OutputImageType::RegionType OutputImageRegionType;
00084   typedef typename InputImageType::SizeType  InputSizeType;
00085   typedef typename OutputImageType::SizeType SizeType;
00086   typedef typename InputImageType::IndexType InputIndexType;
00087   typedef typename OutputImageType::IndexType IndexType;
00088 
00090   typedef BandNode<IndexType,PixelType> BandNodeType;
00091   typedef NarrowBand<BandNodeType> NarrowBandType;
00092   typedef typename NarrowBandType::Pointer NarrowBandPointer;
00093   typedef typename NarrowBandType::RegionType RegionType;
00094   typedef typename NarrowBandType::ConstIterator ConstBandIterator;
00095   typedef typename NarrowBandType::Iterator BandIterator;
00096 
00097 
00100   itkSetMacro( LevelSetValue, InputPixelType );
00101   itkGetMacro( LevelSetValue, InputPixelType );
00102   
00105   itkSetMacro( FarValue, PixelType );
00106   itkGetMacro( FarValue, PixelType );
00107 
00108 
00111   itkSetMacro( NarrowBanding, bool );
00112   itkGetMacro( NarrowBanding, bool );
00113   itkBooleanMacro( NarrowBanding );
00114 
00115 
00117   void SetNarrowBand( NarrowBandType * ptr );
00118   NarrowBandPointer GetNarrowBand() const
00119   { return m_NarrowBand; }
00120 
00121  
00122 protected:
00123   IsoContourDistanceImageFilter();
00124   ~IsoContourDistanceImageFilter(){};
00125   void PrintSelf(std::ostream& os, Indent indent) const;
00126   
00127   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00128                             int threadId );
00129   void ThreadedGenerateDataFull(const OutputImageRegionType& outputRegionForThread,
00130                             int threadId );
00131   void ThreadedGenerateDataBand(const OutputImageRegionType& outputRegionForThread,
00132                             int threadId );
00133   void BeforeThreadedGenerateData();
00134 
00135   virtual void GenerateInputRequestedRegion();
00136   virtual void EnlargeOutputRequestedRegion( DataObject * );
00137 
00138 private:
00139   IsoContourDistanceImageFilter(const Self&); //purposely not implemented
00140   void operator=(const Self&); //purposely not implemented
00141   
00142   InputPixelType            m_LevelSetValue;
00143   PixelType                 m_FarValue;
00144   
00145   bool                      m_NarrowBanding;
00146   NarrowBandPointer         m_NarrowBand;
00147   std::vector<RegionType>   m_NarrowBandRegion;
00148   
00150   typename Barrier::Pointer m_Barrier;
00151 };
00152 
00153 } // namespace itk
00154 
00155 #ifndef ITK_MANUAL_INSTANTIATION
00156 #include "itkIsoContourDistanceImageFilter.txx"
00157 #endif
00158 
00159 #endif

Generated at Wed May 24 23:29:48 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000