00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 );
00142
00143 protected:
00144 BinaryMaskToNarrowBandPointSetFilter();
00145 ~BinaryMaskToNarrowBandPointSetFilter();
00146 void PrintSelf(std::ostream& os, Indent indent) const;
00147
00148 private:
00149 BinaryMaskToNarrowBandPointSetFilter(const BinaryMaskToNarrowBandPointSetFilter&);
00150 void operator=(const BinaryMaskToNarrowBandPointSetFilter&);
00151
00152 DistanceFilterPointer m_DistanceFilter;
00153 RescaleFilterPointer m_RescaleFilter;
00154
00155 float m_BandWidth;
00156
00157 };
00158
00159 }
00160
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkBinaryMaskToNarrowBandPointSetFilter.txx"
00163 #endif
00164
00165 #endif