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 public:
00093 typedef KLMSegmentationRegion Self;
00094 typedef SegmentationRegion Superclass;
00095 typedef SmartPointer<Self> Pointer;
00096 typedef SmartPointer<const Self> ConstPointer;
00097
00099 itkNewMacro(Self);
00100
00102 itkTypeMacro(KLMSegmentationRegion,SegmentationRegion);
00103
00105 typedef vnl_vector<double> MeanRegionIntensityType;
00106
00109 typedef std::vector< KLMSegmentationBorder * > RegionBorderVectorType;
00110
00112 typedef RegionBorderVectorType::iterator RegionBorderVectorIterator;
00113
00115 typedef RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator;
00116
00118 typedef Superclass::RegionLabelType RegionLabelType;
00119
00122 RegionBorderVectorIterator GetRegionBorderItBegin();
00123 RegionBorderVectorConstIterator GetRegionBorderConstItBegin();
00125
00128 RegionBorderVectorIterator GetRegionBorderItEnd();
00129 RegionBorderVectorConstIterator GetRegionBorderConstItEnd();
00131
00134 int GetRegionBorderSize() const;
00135
00137 itkSetMacro(MeanRegionIntensity, MeanRegionIntensityType)
00138 itkGetConstReferenceMacro(MeanRegionIntensity, MeanRegionIntensityType);
00139
00142 void SetRegionParameters(MeanRegionIntensityType meanRegionIntensity,
00143 double regionArea,
00144 RegionLabelType label);
00145
00147 void PrintRegionInfo();
00148
00150 void PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00151
00153 void PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00154
00157 void InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00158
00160 void InsertRegionBorder(RegionBorderVectorIterator it,
00161 KLMSegmentationBorder *pBorderCandidate);
00162
00164 void DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00165
00167 void DeleteAllRegionBorders();
00168
00171 void CombineRegionParameters(const Self *region);
00172
00175 double EnergyFunctional(const Self *region);
00176
00179 void ResetRegionLabelAndUpdateBorders(Self *region);
00180
00207 void SpliceRegionBorders(Self *region);
00209
00212 void UpdateRegionBorderLambda();
00213
00214 protected:
00215 KLMSegmentationRegion();
00216 ~KLMSegmentationRegion();
00217 void PrintSelf(std::ostream& os, Indent indent) const;
00218
00219 private:
00220 KLMSegmentationRegion(const Self&);
00221 void operator=(const Self&);
00222
00223 RegionBorderVectorType m_RegionBorderVector;
00224 MeanRegionIntensityType m_MeanRegionIntensity;
00225
00226 };
00227
00228
00229 }
00230
00231
00232 #endif
00233