ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkVoronoiPartitioningImageFilter_h 00019 #define __itkVoronoiPartitioningImageFilter_h 00020 00021 #include "itkVoronoiSegmentationImageFilterBase.h" 00022 00023 namespace itk 00024 { 00032 template< class TInputImage, class TOutputImage > 00033 class ITK_EXPORT VoronoiPartitioningImageFilter: 00034 public VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage > 00035 { 00036 public: 00038 typedef VoronoiPartitioningImageFilter Self; 00039 typedef VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage > Superclass; 00040 typedef SmartPointer< Self > Pointer; 00041 typedef SmartPointer< const Self > ConstPointer; 00042 00044 itkNewMacro(Self); 00045 00047 itkTypeMacro(VoronoiPartitioningImageFilter, 00048 VoronoiSegmentationImageFilterBase); 00049 00051 typedef typename Superclass::BinaryObjectImage BinaryObjectImage; 00052 typedef typename Superclass::IndexList IndexList; 00053 typedef typename Superclass::IndexType IndexType; 00054 typedef typename Superclass::RegionType RegionType; 00055 typedef typename Superclass::InputImageType InputImageType; 00056 typedef typename Superclass::OutputImageType OutputImageType; 00057 typedef typename Superclass::OutputPixelType OutputPixelType; 00058 00059 typedef typename Superclass::PointType PointType; 00060 typedef typename Superclass::PointTypeDeque PointTypeDeque; 00061 typedef typename Superclass::PointIdIterator PointIdIterator; 00062 typedef typename Superclass::CellAutoPointer CellAutoPointer; 00063 typedef typename Superclass::EdgeIterator EdgeIterator; 00064 typedef typename Superclass::NeighborIdIterator NeighborIdIterator; 00065 00067 virtual void MakeSegmentBoundary(void); 00068 00069 virtual void MakeSegmentObject(void); 00070 00075 itkSetMacro(SigmaThreshold, double); 00076 itkGetConstMacro(SigmaThreshold, double); 00078 00080 itkStaticConstMacro(InputImageDimension, unsigned int, 00081 TInputImage::ImageDimension); 00082 itkStaticConstMacro(OutputImageDimension, unsigned int, 00083 TOutputImage::ImageDimension); 00085 00086 #ifdef ITK_USE_CONCEPT_CHECKING 00087 00088 itkConceptMacro( SameDimensionCheck, 00089 ( Concept::SameDimension< InputImageDimension, OutputImageDimension > ) ); 00090 itkConceptMacro( IntConvertibleToOutputCheck, 00091 ( Concept::Convertible< int, OutputPixelType > ) ); 00092 00094 #endif 00095 protected: 00096 VoronoiPartitioningImageFilter(); 00097 ~VoronoiPartitioningImageFilter(); 00098 void PrintSelf(std::ostream & os, Indent indent) const; 00100 00101 // Classify all the voronoi cells as interior , exterior or boundary. 00102 virtual void ClassifyDiagram(void); 00103 00104 // Generate the seeds to be added by dividing the boundary cells. 00105 virtual void GenerateAddingSeeds(void); 00106 00107 // Are the pixels specified in the index list homogeneous? 00108 virtual bool TestHomogeneity(IndexList & Plist); 00109 00110 // Threshold for homogeneity criterion 00111 double m_SigmaThreshold; 00112 private: 00113 VoronoiPartitioningImageFilter(const Self &); //purposely not implemented 00114 void operator=(const Self &); //purposely not implemented 00115 }; 00116 } //end namespace 00117 00118 #ifndef ITK_MANUAL_INSTANTIATION 00119 #include "itkVoronoiPartitioningImageFilter.hxx" 00120 #endif 00121 00122 #endif 00123