00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkKLMSegmentationRegion_h
00018 #define __itkKLMSegmentationRegion_h
00019
00020 #include "itkObject.h"
00021 #include "itkKLMSegmentationBorder.h"
00022 #include "itkSegmentationRegion.h"
00023
00024 #include "vnl/vnl_vector.h"
00025
00026 namespace itk
00027 {
00028
00087 class KLMSegmentationBorder;
00088
00089 class ITKCommon_EXPORT KLMSegmentationRegion : public SegmentationRegion
00090 {
00091 private:
00093 typedef vnl_vector<double> MeanRegionIntensityType;
00094
00095 public:
00097 typedef KLMSegmentationRegion Self;
00098 typedef SegmentationRegion Superclass;
00099 typedef SmartPointer<Self> Pointer;
00100 typedef SmartPointer<const Self> ConstPointer;
00101
00103 itkNewMacro(Self);
00104
00106 itkTypeMacro(KLMSegmentationRegion,SegmentationRegion);
00107
00110 typedef std::vector< KLMSegmentationBorder * > RegionBorderVectorType;
00111
00113 typedef RegionBorderVectorType::iterator RegionBorderVectorIterator;
00114
00116 typedef RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator;
00117
00119 typedef Superclass::RegionLabelType RegionLabelType;
00120
00123 RegionBorderVectorIterator GetRegionBorderItBegin();
00124 RegionBorderVectorConstIterator GetRegionBorderConstItBegin();
00126
00129 RegionBorderVectorIterator GetRegionBorderItEnd();
00130 RegionBorderVectorConstIterator GetRegionBorderConstItEnd();
00132
00135 int GetRegionBorderSize() const;
00136
00138 itkSetMacro(MeanRegionIntensity, MeanRegionIntensityType)
00139 itkGetConstReferenceMacro(MeanRegionIntensity, MeanRegionIntensityType);
00140
00143 void SetRegionParameters(MeanRegionIntensityType meanRegionIntensity,
00144 double regionArea,
00145 RegionLabelType label);
00146
00148 void PrintRegionInfo();
00149
00151 void PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00152
00154 void PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00155
00158 void InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00159
00161 void InsertRegionBorder(RegionBorderVectorIterator it,
00162 KLMSegmentationBorder *pBorderCandidate);
00163
00165 void DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00166
00168 void DeleteAllRegionBorders();
00169
00172 void CombineRegionParameters(const Self *region);
00173
00176 double EnergyFunctional(const Self *region);
00177
00180 void ResetRegionLabelAndUpdateBorders(Self *region);
00181
00208 void SpliceRegionBorders(Self *region);
00210
00213 void UpdateRegionBorderLambda();
00214
00215 protected:
00216 KLMSegmentationRegion();
00217 ~KLMSegmentationRegion();
00218 void PrintSelf(std::ostream& os, Indent indent) const;
00219
00220 private:
00221 KLMSegmentationRegion(const Self&);
00222 void operator=(const Self&);
00223
00224 RegionBorderVectorType m_RegionBorderVector;
00225 MeanRegionIntensityType m_MeanRegionIntensity;
00226
00227 };
00228
00229
00230 }
00231
00232
00233 #endif
00234