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: 2009-04-25 12:27:15 $
00007   Version:   $Revision: 1.7 $
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 
00076   typedef ImageRegionConstIteratorWithIndex<InputImageType> InputImageIterator;
00077 
00079   typedef TOutputMesh                                 OutputMeshType;
00080   typedef typename OutputMeshType::PointType          PointType;
00081   typedef typename OutputMeshType::Pointer            OutputMeshPointer;
00082   typedef typename OutputMeshType::ConstPointer       OutputMeshConstPointer;
00083   typedef typename OutputMeshType::PointsContainer    PointsContainer; 
00084   typedef typename OutputMeshType::PointIdentifier    PointIdentifier; 
00085   typedef typename PointsContainer::Pointer           PointsContainerPointer;
00086   typedef typename PointsContainer::Iterator          PointsContainerIterator;
00087   typedef typename OutputMeshType::PointDataContainer PointDataContainer; 
00088   typedef typename PointDataContainer::Pointer        PointDataContainerPointer;
00089   typedef typename PointDataContainer::Iterator       PointDataContainerIterator;
00090 
00091 
00093   itkStaticConstMacro(ImageDimension, unsigned int,
00094                       TInputImage::ImageDimension);
00095 
00096 
00098   typedef itk::Image< float, 
00099                 itkGetStaticConstMacro(ImageDimension) >   RealImageType;
00100 
00105   typedef ReinitializeLevelSetImageFilter< RealImageType >  DistanceFilterType;
00106   typedef typename DistanceFilterType::Pointer              DistanceFilterPointer; 
00107   typedef typename DistanceFilterType::NodeContainerPointer NodeContainerPointer;
00108   typedef typename DistanceFilterType::NodeContainer        NodeContainer;
00109   typedef typename NodeContainer::Element                   NodeType;
00110 
00111 
00115   typedef RescaleIntensityImageFilter< InputImageType, RealImageType > RescaleFilterType;
00116 
00117   typedef typename RescaleFilterType::Pointer         RescaleFilterPointer;
00118 
00120   itkStaticConstMacro(PointDimension, unsigned int,
00121                       TOutputMesh::PointDimension);
00122 
00124   void GenerateData(void);
00125 
00127   void GenerateOutputInformation(void);
00128 
00130   void SetInput( const InputImageType * inputImage );
00131 
00136   itkSetMacro( BandWidth, float );
00137   itkGetConstMacro( BandWidth, float );
00139 
00140 protected:
00141   BinaryMaskToNarrowBandPointSetFilter();
00142   ~BinaryMaskToNarrowBandPointSetFilter();
00143   void PrintSelf(std::ostream& os, Indent indent) const;
00144  
00145 private:
00146   BinaryMaskToNarrowBandPointSetFilter(const BinaryMaskToNarrowBandPointSetFilter&); //purposely not implemented
00147   void operator=(const BinaryMaskToNarrowBandPointSetFilter&); //purposely not implemented
00148 
00149   DistanceFilterPointer   m_DistanceFilter;
00150   RescaleFilterPointer    m_RescaleFilter;
00151 
00152   float                   m_BandWidth;
00153 
00154 };
00155 
00156 } // end namespace itk
00157 
00158 #ifndef ITK_MANUAL_INSTANTIATION
00159 #include "itkBinaryMaskToNarrowBandPointSetFilter.txx"
00160 #endif
00161 
00162 #endif
00163 

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