ITK  6.0.0
Insight Toolkit
itkDenseFrequencyContainer2.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 itkDenseFrequencyContainer2_h
19 #define itkDenseFrequencyContainer2_h
20 
21 #include <map>
24 #include "ITKStatisticsExport.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
43 class ITKStatistics_EXPORT DenseFrequencyContainer2 : public Object
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(DenseFrequencyContainer2);
47 
50  using Superclass = Object;
53 
55  itkOverrideGetNameOfClassMacro(DenseFrequencyContainer2);
56 
58  itkNewMacro(Self);
59 
62 
65 
68 
71 
74 
77 
79 
82  void
83  Initialize(SizeValueType length);
84 
87  void
88  SetToZero();
89 
92  bool
93  SetFrequency(const InstanceIdentifier id, const AbsoluteFrequencyType value);
94 
98  bool
99  IncreaseFrequency(const InstanceIdentifier id, const AbsoluteFrequencyType value);
100 
104  GetFrequency(const InstanceIdentifier id) const;
105 
109  {
110  return m_TotalFrequency;
111  }
112 
113 protected:
115  ~DenseFrequencyContainer2() override = default;
116  void
117  PrintSelf(std::ostream & os, Indent indent) const override;
118 
119 private:
121  FrequencyContainerPointer m_FrequencyContainer{};
122  TotalAbsoluteFrequencyType m_TotalFrequency{};
123 }; // end of class
124 } // end of namespace Statistics
125 } // end of namespace itk
126 
127 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::Statistics::MeasurementVectorTraits::InstanceIdentifier
IdentifierType InstanceIdentifier
Definition: itkMeasurementVectorTraits.h:49
itk::Statistics::MeasurementVectorTraits::TotalRelativeFrequencyType
NumericTraits< RelativeFrequencyType >::AccumulateType TotalRelativeFrequencyType
Definition: itkMeasurementVectorTraits.h:55
itk::Statistics::DenseFrequencyContainer2
This class is a container for frequencies of bins in an histogram.
Definition: itkDenseFrequencyContainer2.h:43
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ValarrayImageContainer
Defines a front-end to the std\::<valarray> container that conforms to the ImageContainerInterface.
Definition: itkValarrayImageContainer.h:48
itk::Statistics::MeasurementVectorTraits::AbsoluteFrequencyType
InstanceIdentifier AbsoluteFrequencyType
Definition: itkMeasurementVectorTraits.h:52
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::Statistics::DenseFrequencyContainer2::AbsoluteFrequencyType
MeasurementVectorTraits::AbsoluteFrequencyType AbsoluteFrequencyType
Definition: itkDenseFrequencyContainer2.h:64
itkValarrayImageContainer.h
itkMeasurementVectorTraits.h
itk::Statistics::MeasurementVectorTraits::RelativeFrequencyType
NumericTraits< AbsoluteFrequencyType >::RealType RelativeFrequencyType
Definition: itkMeasurementVectorTraits.h:53
itk::Statistics::DenseFrequencyContainer2::TotalRelativeFrequencyType
MeasurementVectorTraits::TotalRelativeFrequencyType TotalRelativeFrequencyType
Definition: itkDenseFrequencyContainer2.h:73
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Statistics::MeasurementVectorTraits::TotalAbsoluteFrequencyType
NumericTraits< AbsoluteFrequencyType >::AccumulateType TotalAbsoluteFrequencyType
Definition: itkMeasurementVectorTraits.h:54
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::Statistics::DenseFrequencyContainer2::RelativeFrequencyType
MeasurementVectorTraits::RelativeFrequencyType RelativeFrequencyType
Definition: itkDenseFrequencyContainer2.h:70
itk::Statistics::DenseFrequencyContainer2::TotalAbsoluteFrequencyType
MeasurementVectorTraits::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Definition: itkDenseFrequencyContainer2.h:67
itk::Statistics::DenseFrequencyContainer2::GetTotalFrequency
TotalAbsoluteFrequencyType GetTotalFrequency() const
Definition: itkDenseFrequencyContainer2.h:108
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:86
itk::Statistics::DenseFrequencyContainer2::InstanceIdentifier
MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
Definition: itkDenseFrequencyContainer2.h:61