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

itkBinaryMaskToNarrowBandPointSetFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBinaryMaskToNarrowBandPointSetFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004-12-24 22:03:31 $
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 __itkBinaryMaskToNarrowBandPointSetFilter_h
00018 #define __itkBinaryMaskToNarrowBandPointSetFilter_h
00019 
00020 #include "itkImageToMeshFilter.h"
00021 #include "itkImageRegionIteratorWithIndex.h"
00022 #include "itkImageRegionConstIteratorWithIndex.h"
00023 #include "itkReinitializeLevelSetImageFilter.h"
00024 #include "itkRescaleIntensityImageFilter.h"
00025 
00026 namespace itk
00027 {
00028 
00053 template <class TInputImage, class TOutputMesh>
00054 class ITK_EXPORT BinaryMaskToNarrowBandPointSetFilter : 
00055     public ImageToMeshFilter<TInputImage,TOutputMesh>
00056 {
00057 public:
00059   typedef BinaryMaskToNarrowBandPointSetFilter  Self;
00060   typedef ProcessObject                Superclass;
00061   typedef SmartPointer<Self>            Pointer;
00062   typedef SmartPointer<const Self>      ConstPointer;
00063 
00065   itkNewMacro(Self);
00066 
00068   itkTypeMacro(BinaryMaskToNarrowBandPointSetFilter, ImageToMeshFilter);
00069 
00071   typedef TInputImage                               InputImageType;
00072   typedef typename InputImageType::ConstPointer     InputImageConstPointer;
00073   typedef typename InputImageType::RegionType       InputImageRegionType; 
00074   typedef typename InputImageType::PixelType        InputImagePixelType; 
00075   typedef ImageRegionConstIteratorWithIndex<InputImageType> 
00076                                                     InputImageIterator;
00077 
00078 
00080   typedef TOutputMesh OutputMeshType;
00081   typedef typename OutputMeshType::PointType        PointType;
00082   typedef typename OutputMeshType::Pointer          OutputMeshPointer;
00083   typedef typename OutputMeshType::ConstPointer     OutputMeshConstPointer;
00084   typedef typename OutputMeshType::PointsContainer  PointsContainer; 
00085   typedef typename OutputMeshType::PointIdentifier  PointIdentifier; 
00086   typedef typename PointsContainer::Pointer         PointsContainerPointer;
00087   typedef typename PointsContainer::Iterator        PointsContainerIterator;
00088   typedef typename OutputMeshType::PointDataContainer PointDataContainer; 
00089   typedef typename PointDataContainer::Pointer      PointDataContainerPointer;
00090   typedef typename PointDataContainer::Iterator     PointDataContainerIterator;
00091 
00092 
00094   itkStaticConstMacro(ImageDimension, unsigned int,
00095                       TInputImage::ImageDimension);
00096 
00097 
00099   typedef itk::Image< float, 
00100                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00101 
00106   typedef ReinitializeLevelSetImageFilter< RealImageType >
00107                                                     DistanceFilterType;
00108 
00109   typedef typename DistanceFilterType::Pointer                  DistanceFilterPointer; 
00110   typedef typename DistanceFilterType::NodeContainerPointer     NodeContainerPointer;
00111   typedef typename DistanceFilterType::NodeContainer            NodeContainer;
00112   typedef typename NodeContainer::Element                       NodeType;
00113 
00114 
00115 
00119   typedef RescaleIntensityImageFilter< InputImageType, RealImageType > RescaleFilterType;
00120 
00121   typedef typename RescaleFilterType::Pointer         RescaleFilterPointer;
00122 
00124   itkStaticConstMacro(PointDimension, unsigned int,
00125                       TOutputMesh::PointDimension);
00126 
00128   void GenerateData(void);
00129 
00131   void GenerateOutputInformation(void);
00132 
00134   void SetInput( const InputImageType * inputImage );
00135 
00140   itkSetMacro( BandWidth, float );
00141   itkGetMacro( BandWidth, float );
00143 
00144 protected:
00145   BinaryMaskToNarrowBandPointSetFilter();
00146   ~BinaryMaskToNarrowBandPointSetFilter();
00147   void PrintSelf(std::ostream& os, Indent indent) const;
00148  
00149 private:
00150   BinaryMaskToNarrowBandPointSetFilter(const BinaryMaskToNarrowBandPointSetFilter&); //purposely not implemented
00151   void operator=(const BinaryMaskToNarrowBandPointSetFilter&); //purposely not implemented
00152 
00153   DistanceFilterPointer   m_DistanceFilter;
00154   RescaleFilterPointer    m_RescaleFilter;
00155 
00156   float                   m_BandWidth;
00157 
00158 };
00159 
00160 } // end namespace itk
00161 
00162 #ifndef ITK_MANUAL_INSTANTIATION
00163 #include "itkBinaryMaskToNarrowBandPointSetFilter.txx"
00164 #endif
00165 
00166 #endif
00167 

Generated at Mon Apr 14 11:40:40 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000