ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkKLMSegmentationRegion.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkKLMSegmentationRegion_h
19 #define __itkKLMSegmentationRegion_h
20 
22 #include "itkSegmentationRegion.h"
23 
24 #include "vnl/vnl_vector.h"
25 
26 namespace itk
27 {
87 class KLMSegmentationBorder;
88 
90 {
91 public:
97 
99  itkNewMacro(Self);
100 
103 
106 
109  typedef std::vector< KLMSegmentationBorder * > RegionBorderVectorType;
110  typedef RegionBorderVectorType::size_type RegionBorderVectorSizeType;
111 
113  typedef RegionBorderVectorType::iterator RegionBorderVectorIterator;
114 
117  typedef RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator;
118 
121 
124  RegionBorderVectorIterator GetRegionBorderItBegin();
125 
126  RegionBorderVectorConstIterator GetRegionBorderConstItBegin();
127 
130  RegionBorderVectorIterator GetRegionBorderItEnd();
131 
132  RegionBorderVectorConstIterator GetRegionBorderConstItEnd();
133 
136  RegionBorderVectorSizeType GetRegionBorderSize() const;
137 
139  itkSetMacro(MeanRegionIntensity, MeanRegionIntensityType)
140  itkGetConstReferenceMacro(MeanRegionIntensity, MeanRegionIntensityType);
141 
144  void SetRegionParameters(MeanRegionIntensityType meanRegionIntensity,
145  double regionArea,
146  RegionLabelType label);
147 
149  void PrintRegionInfo();
150 
152  void PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate);
153 
155  void PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate);
156 
159  void InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate);
160 
162  void InsertRegionBorder(RegionBorderVectorIterator it,
163  KLMSegmentationBorder *pBorderCandidate);
164 
166  void DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate);
167 
169  void DeleteAllRegionBorders();
170 
173  void CombineRegionParameters(const Self *region);
174 
177  double EnergyFunctional(const Self *region);
178 
181  void ResetRegionLabelAndUpdateBorders(Self *region);
182 
209  void SpliceRegionBorders(Self *region);
211 
214  void UpdateRegionBorderLambda();
215 
216 protected:
218  ~KLMSegmentationRegion();
219  void PrintSelf(std::ostream & os, Indent indent) const;
220 
221 private:
222  KLMSegmentationRegion(const Self &); // purposely not implemented
223  void operator=(const Self &); // purposely not implemented
224 
225  RegionBorderVectorType m_RegionBorderVector;
226  MeanRegionIntensityType m_MeanRegionIntensity;
227 }; // class SegmentationRegion
228 } // namespace itk
229 
230 #endif
231