ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSparseFrequencyContainer2.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 * https://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 itkSparseFrequencyContainer2_h
19#define itkSparseFrequencyContainer2_h
20
21#include <map>
22#include "itkObjectFactory.h"
23#include "itkObject.h"
24#include "itkNumericTraits.h"
26#include "ITKStatisticsExport.h"
27
28namespace itk::Statistics
29{
39
40class ITKStatistics_EXPORT SparseFrequencyContainer2 : public Object
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(SparseFrequencyContainer2);
44
50
53 itkOverrideGetNameOfClassMacro(SparseFrequencyContainer2);
54 itkNewMacro(Self);
58
61
64
67
70
72 using FrequencyContainerType = std::map<InstanceIdentifier, AbsoluteFrequencyType>;
73 using FrequencyContainerConstIterator = FrequencyContainerType::const_iterator;
74
76 void
78
81 void
83
86 bool
88
91 bool
93
98
101 {
102 return m_TotalFrequency;
103 }
104
105protected:
107 ~SparseFrequencyContainer2() override = default;
108 void
109 PrintSelf(std::ostream & os, Indent indent) const override;
110
111private:
112 // Container of histogram
115}; // end of class
116} // namespace itk::Statistics
117
118#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
NumericTraits< RelativeFrequencyType >::AccumulateType TotalRelativeFrequencyType
NumericTraits< AbsoluteFrequencyType >::AccumulateType TotalAbsoluteFrequencyType
NumericTraits< AbsoluteFrequencyType >::RealType RelativeFrequencyType
bool SetFrequency(const InstanceIdentifier id, const AbsoluteFrequencyType value)
std::map< InstanceIdentifier, AbsoluteFrequencyType > FrequencyContainerType
bool IncreaseFrequency(const InstanceIdentifier id, const AbsoluteFrequencyType value)
void PrintSelf(std::ostream &os, Indent indent) const override
MeasurementVectorTraits::TotalRelativeFrequencyType TotalRelativeFrequencyType
FrequencyContainerType::const_iterator FrequencyContainerConstIterator
MeasurementVectorTraits::AbsoluteFrequencyType AbsoluteFrequencyType
MeasurementVectorTraits::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
void Initialize(SizeValueType length)
MeasurementVectorTraits::RelativeFrequencyType RelativeFrequencyType
AbsoluteFrequencyType GetFrequency(const InstanceIdentifier id) const
MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
unsigned long SizeValueType
Definition itkIntTypes.h:86