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);
153 
156  void
157  SetRegionParameters(MeanRegionIntensityType meanRegionIntensity, double regionArea, RegionLabelType label);
158 
160  void
161  PrintRegionInfo();
162 
164  void
165  PushFrontRegionBorder(KLMSegmentationBorder * pBorderCandidate);
166 
168  void
169  PushBackRegionBorder(KLMSegmentationBorder * pBorderCandidate);
170 
173  void
174  InsertRegionBorder(KLMSegmentationBorder * pBorderCandidate);
175 
177  void
178  InsertRegionBorder(RegionBorderVectorIterator RegionBorderVectorIt, KLMSegmentationBorder * pBorderCandidate);
179 
181  void
182  DeleteRegionBorder(KLMSegmentationBorder * pBorderCandidate);
183 
185  void
186  DeleteAllRegionBorders();
187 
190  void
191  CombineRegionParameters(const Self * region);
192 
195  double
196  EnergyFunctional(const Self * region);
197 
200  void
201  ResetRegionLabelAndUpdateBorders(Self * region);
202 
229  void
230  SpliceRegionBorders(Self * region);
232 
235  void
236  UpdateRegionBorderLambda();
237 
238 protected:
240  ~KLMSegmentationRegion() override;
241  void
242  PrintSelf(std::ostream & os, Indent indent) const override;
243 
244 private:
247 }; // class SegmentationRegion
248 } // namespace itk
249 
250 #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:245
itk::KLMSegmentationRegion::m_MeanRegionIntensity
MeanRegionIntensityType m_MeanRegionIntensity
Definition: itkKLMSegmentationRegion.h:246
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