ITK  5.2.0
Insight Toolkit
itkKLMSegmentationRegion.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
90 // Forward reference because of circular dependencies
91 class ITK_FORWARD_EXPORT KLMSegmentationBorder;
92 
93 class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion : public SegmentationRegion
94 {
95 public:
96  ITK_DISALLOW_COPY_AND_MOVE(KLMSegmentationRegion);
97 
103 
105  itkNewMacro(Self);
106 
109 
111  using MeanRegionIntensityType = vnl_vector<double>;
112 
115  using RegionBorderVectorType = std::vector<KLMSegmentationBorder *>;
116  using RegionBorderVectorSizeType = RegionBorderVectorType::size_type;
117 
119  using RegionBorderVectorIterator = RegionBorderVectorType::iterator;
120 
123  using RegionBorderVectorConstIterator = RegionBorderVectorType::const_iterator;
124 
126  using RegionLabelType = Superclass::RegionLabelType;
127 
131  GetRegionBorderItBegin();
132 
134  GetRegionBorderConstItBegin();
135 
139  GetRegionBorderItEnd();
140 
142  GetRegionBorderConstItEnd();
143 
147  GetRegionBorderSize() const;
148 
150  itkSetMacro(MeanRegionIntensity, MeanRegionIntensityType)
151  itkGetConstReferenceMacro(MeanRegionIntensity, MeanRegionIntensityType);
152 
155  void
156  SetRegionParameters(MeanRegionIntensityType meanRegionIntensity, double regionArea, RegionLabelType label);
157 
159  void
160  PrintRegionInfo();
161 
163  void
164  PushFrontRegionBorder(KLMSegmentationBorder * pBorderCandidate);
165 
167  void
168  PushBackRegionBorder(KLMSegmentationBorder * pBorderCandidate);
169 
172  void
173  InsertRegionBorder(KLMSegmentationBorder * pBorderCandidate);
174 
176  void
177  InsertRegionBorder(RegionBorderVectorIterator it, KLMSegmentationBorder * pBorderCandidate);
178 
180  void
181  DeleteRegionBorder(KLMSegmentationBorder * pBorderCandidate);
182 
184  void
185  DeleteAllRegionBorders();
186 
189  void
190  CombineRegionParameters(const Self * region);
191 
194  double
195  EnergyFunctional(const Self * region);
196 
199  void
200  ResetRegionLabelAndUpdateBorders(Self * region);
201 
228  void
229  SpliceRegionBorders(Self * region);
231 
234  void
235  UpdateRegionBorderLambda();
236 
237 protected:
239  ~KLMSegmentationRegion() override;
240  void
241  PrintSelf(std::ostream & os, Indent indent) const override;
242 
243 private:
246 }; // class SegmentationRegion
247 } // namespace itk
248 
249 #endif
itk::KLMSegmentationRegion
Base class for KLMSegmentationRegion object.
Definition: itkKLMSegmentationRegion.h:93
itk::KLMSegmentationRegion::RegionBorderVectorIterator
RegionBorderVectorType::iterator RegionBorderVectorIterator
Definition: itkKLMSegmentationRegion.h:119
itk::KLMSegmentationRegion::RegionBorderVectorConstIterator
RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator
Definition: itkKLMSegmentationRegion.h:123
itk::SegmentationRegion
Base class for SegmentationRegion object.
Definition: itkSegmentationRegion.h:48
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::KLMSegmentationRegion::RegionBorderVectorSizeType
RegionBorderVectorType::size_type RegionBorderVectorSizeType
Definition: itkKLMSegmentationRegion.h:116
itk::KLMSegmentationRegion
class ITK_FORWARD_EXPORT KLMSegmentationRegion
Definition: itkKLMSegmentationBorder.h:138
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::KLMSegmentationRegion::m_RegionBorderVector
RegionBorderVectorType m_RegionBorderVector
Definition: itkKLMSegmentationRegion.h:244
itk::KLMSegmentationRegion::m_MeanRegionIntensity
MeanRegionIntensityType m_MeanRegionIntensity
Definition: itkKLMSegmentationRegion.h:245
itkSegmentationRegion.h
itk::KLMSegmentationRegion::RegionLabelType
Superclass::RegionLabelType RegionLabelType
Definition: itkKLMSegmentationRegion.h:126
itk::KLMSegmentationRegion::RegionBorderVectorType
std::vector< KLMSegmentationBorder * > RegionBorderVectorType
Definition: itkKLMSegmentationRegion.h:115
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkKLMSegmentationBorder.h
itk::KLMSegmentationBorder
Base class for KLMSegmentationBorder object.
Definition: itkKLMSegmentationBorder.h:140
itk::KLMSegmentationRegion::MeanRegionIntensityType
vnl_vector< double > MeanRegionIntensityType
Definition: itkKLMSegmentationRegion.h:111