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 #include "vnl/vnl_matrix.h"
00026
00027 namespace itk
00028 {
00029
00094 class KLMSegmentationBorder;
00095
00096 class ITKCommon_EXPORT KLMSegmentationRegion : public SegmentationRegion
00097 {
00098 private:
00100 typedef vnl_matrix<double> VectorOfDoubleType;
00101
00102 public:
00104 typedef KLMSegmentationRegion Self;
00105 typedef SegmentationRegion Superclass;
00106 typedef SmartPointer<Self> Pointer;
00107 typedef SmartPointer<const Self> ConstPointer;
00108
00110 itkNewMacro(Self);
00111
00113 itkTypeMacro(KLMSegmentationRegion,SegmentationRegion);
00114
00117 typedef std::vector< KLMSegmentationBorder* >
00118 RegionBorderVectorType;
00119
00121 typedef RegionBorderVectorType::iterator RegionBorderVectorIterator;
00122
00125 void SetRegion(VectorOfDoubleType regionMeanIntensity,
00126 unsigned int regionArea,
00127 unsigned int label);
00128
00130 void SetRegionBorder(KLMSegmentationBorder *pNewRegionBorder);
00131
00133 void SetRegionBorder3d(KLMSegmentationBorder *pNewRegionBorder);
00134
00136 KLMSegmentationBorder *GetFirstRegionBorder();
00137
00139 void DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate);
00141 void InsertRegionBorder(RegionBorderVectorIterator it,
00142 KLMSegmentationBorder *pBorderCandidate);
00143
00145 void DeleteAllRegionBorders();
00146
00149 void ReorderRegionBorders(KLMSegmentationBorder *pBorderCandidate);
00150
00153 RegionBorderVectorIterator GetRegionBorderItBegin();
00154
00157 RegionBorderVectorIterator GetRegionBorderItEnd();
00158
00162 void UpdateRegionBorderLambda();
00163
00165 void PrintRegionInfo();
00166
00167 protected:
00168 KLMSegmentationRegion();
00169 ~KLMSegmentationRegion();
00170 void PrintSelf(std::ostream& os, Indent indent) const;
00171
00172 private:
00173 KLMSegmentationRegion(const Self&);
00174 void operator=(const Self&);
00175
00176 RegionBorderVectorType m_RegionBorderVector;
00177
00178 };
00179
00180
00181 }
00182
00183
00184 #endif
00185