ITK  4.13.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 #include "ITKKLMRegionGrowingExport.h"
24 
25 #include "vnl/vnl_vector.h"
26 
27 namespace itk
28 {
89 // Forward reference because of circular dependencies
90 class ITK_FORWARD_EXPORT KLMSegmentationBorder;
91 
92 class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion:public SegmentationRegion
93 {
94 public:
100 
102  itkNewMacro(Self);
103 
106 
108  typedef vnl_vector< double > MeanRegionIntensityType;
109 
112  typedef std::vector< KLMSegmentationBorder * > RegionBorderVectorType;
113  typedef RegionBorderVectorType::size_type RegionBorderVectorSizeType;
114 
116  typedef RegionBorderVectorType::iterator RegionBorderVectorIterator;
117 
120  typedef RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator;
121 
124 
127  RegionBorderVectorIterator GetRegionBorderItBegin();
128 
129  RegionBorderVectorConstIterator GetRegionBorderConstItBegin();
130 
133  RegionBorderVectorIterator GetRegionBorderItEnd();
134 
135  RegionBorderVectorConstIterator GetRegionBorderConstItEnd();
136 
139  RegionBorderVectorSizeType GetRegionBorderSize() const;
140 
142  itkSetMacro(MeanRegionIntensity, MeanRegionIntensityType)
143  itkGetConstReferenceMacro(MeanRegionIntensity, MeanRegionIntensityType);
144 
147  void SetRegionParameters(MeanRegionIntensityType meanRegionIntensity,
148  double regionArea,
149  RegionLabelType label);
150 
152  void PrintRegionInfo();
153 
155  void PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate);
156 
158  void PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate);
159 
162  void InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate);
163 
165  void InsertRegionBorder(RegionBorderVectorIterator it,
166  KLMSegmentationBorder *pBorderCandidate);
167 
169  void DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate);
170 
172  void DeleteAllRegionBorders();
173 
176  void CombineRegionParameters(const Self *region);
177 
180  double EnergyFunctional(const Self *region);
181 
184  void ResetRegionLabelAndUpdateBorders(Self *region);
185 
212  void SpliceRegionBorders(Self *region);
214 
217  void UpdateRegionBorderLambda();
218 
219 protected:
221  ~KLMSegmentationRegion() ITK_OVERRIDE;
222  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
223 
224 private:
225  ITK_DISALLOW_COPY_AND_ASSIGN(KLMSegmentationRegion);
226 
227  RegionBorderVectorType m_RegionBorderVector;
228  MeanRegionIntensityType m_MeanRegionIntensity;
229 }; // class SegmentationRegion
230 } // namespace itk
231 
232 #endif
RegionBorderVectorType::iterator RegionBorderVectorIterator
Base class for KLMSegmentationRegion object.
Light weight base class for most itk classes.
Base class for SegmentationRegion object.
RegionBorderVectorType::size_type RegionBorderVectorSizeType
vnl_vector< double > MeanRegionIntensityType
RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator
SmartPointer< const Self > ConstPointer
Base class for KLMSegmentationBorder object.
Superclass::RegionLabelType RegionLabelType
std::vector< KLMSegmentationBorder * > RegionBorderVectorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49