itkBinaryMaskToNarrowBandPointSetFilter.h
Go to the documentation of this file.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
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&);
00147 void operator=(const BinaryMaskToNarrowBandPointSetFilter&);
00148
00149 DistanceFilterPointer m_DistanceFilter;
00150 RescaleFilterPointer m_RescaleFilter;
00151
00152 float m_BandWidth;
00153
00154 };
00155
00156 }
00157
00158 #ifndef ITK_MANUAL_INSTANTIATION
00159 #include "itkBinaryMaskToNarrowBandPointSetFilter.txx"
00160 #endif
00161
00162 #endif
00163