ITK  4.8.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 {
88 class KLMSegmentationBorder;
89 
90 class ITKKLMRegionGrowing_EXPORT KLMSegmentationRegion:public SegmentationRegion
91 {
92 public:
98 
100  itkNewMacro(Self);
101 
104 
106  typedef vnl_vector< double > MeanRegionIntensityType;
107 
110  typedef std::vector< KLMSegmentationBorder * > RegionBorderVectorType;
111  typedef RegionBorderVectorType::size_type RegionBorderVectorSizeType;
112 
114  typedef RegionBorderVectorType::iterator RegionBorderVectorIterator;
115 
118  typedef RegionBorderVectorType::const_iterator RegionBorderVectorConstIterator;
119 
122 
125  RegionBorderVectorIterator GetRegionBorderItBegin();
126 
127  RegionBorderVectorConstIterator GetRegionBorderConstItBegin();
128 
131  RegionBorderVectorIterator GetRegionBorderItEnd();
132 
133  RegionBorderVectorConstIterator GetRegionBorderConstItEnd();
134 
137  RegionBorderVectorSizeType GetRegionBorderSize() const;
138 
140  itkSetMacro(MeanRegionIntensity, MeanRegionIntensityType)
141  itkGetConstReferenceMacro(MeanRegionIntensity, MeanRegionIntensityType);
142 
145  void SetRegionParameters(MeanRegionIntensityType meanRegionIntensity,
146  double regionArea,
147  RegionLabelType label);
148 
150  void PrintRegionInfo();
151 
153  void PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate);
154 
156  void PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate);
157 
160  void InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate);
161 
163  void InsertRegionBorder(RegionBorderVectorIterator it,
164  KLMSegmentationBorder *pBorderCandidate);
165 
167  void DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate);
168 
170  void DeleteAllRegionBorders();
171 
174  void CombineRegionParameters(const Self *region);
175 
178  double EnergyFunctional(const Self *region);
179 
182  void ResetRegionLabelAndUpdateBorders(Self *region);
183 
210  void SpliceRegionBorders(Self *region);
212 
215  void UpdateRegionBorderLambda();
216 
217 protected:
219  ~KLMSegmentationRegion();
220  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
221 
222 private:
223  KLMSegmentationRegion(const Self &); // purposely not implemented
224  void operator=(const Self &); // purposely not implemented
225 
226  RegionBorderVectorType m_RegionBorderVector;
227  MeanRegionIntensityType m_MeanRegionIntensity;
228 }; // class SegmentationRegion
229 } // namespace itk
230 
231 #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