ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkDenseFrequencyContainer2.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 itkDenseFrequencyContainer2_h
19 #define itkDenseFrequencyContainer2_h
20 
21 #include <map>
24 #include "ITKStatisticsExport.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
42 class ITKStatistics_EXPORT DenseFrequencyContainer2:
43  public Object
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(DenseFrequencyContainer2);
47 
50  using Superclass = Object;
53 
55  itkTypeMacro(DenseFrequencyContainer2, Object);
56 
58  itkNewMacro(Self);
59 
62 
65 
68 
71 
74 
78 
80 
83  void Initialize(SizeValueType length);
84 
87  void SetToZero();
88 
91  bool SetFrequency(const InstanceIdentifier id, const AbsoluteFrequencyType value);
92 
96  bool IncreaseFrequency(const InstanceIdentifier id,
97  const AbsoluteFrequencyType value);
98 
101  AbsoluteFrequencyType GetFrequency(const InstanceIdentifier id) const;
102 
105  {
106  return m_TotalFrequency;
107  }
108 
109 protected:
111  ~DenseFrequencyContainer2() override = default;
112  void PrintSelf(std::ostream & os, Indent indent) const override;
113 
114 private:
118 }; // end of class
119 } // end of namespace Statistics
120 } // end of namespace itk
121 
122 #endif
Light weight base class for most itk classes.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
This class is a container for frequencies of bins in an histogram.
MeasurementVectorTraits::RelativeFrequencyType RelativeFrequencyType
MeasurementVectorTraits::TotalRelativeFrequencyType TotalRelativeFrequencyType
NumericTraits< AbsoluteFrequencyType >::AccumulateType TotalAbsoluteFrequencyType
MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
NumericTraits< AbsoluteFrequencyType >::RealType RelativeFrequencyType
MeasurementVectorTraits::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Defines a front-end to the std\::&lt;valarray&gt; container that conforms to the ImageContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
NumericTraits< RelativeFrequencyType >::AccumulateType TotalRelativeFrequencyType
MeasurementVectorTraits::AbsoluteFrequencyType AbsoluteFrequencyType