ITK  4.9.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:
48  typedef Object Superclass;
51 
53  itkTypeMacro(DenseFrequencyContainer2, Object);
54 
56  itkNewMacro(Self);
57 
60 
63 
66 
69 
72 
76 
78 
81  void Initialize(SizeValueType length);
82 
85  void SetToZero();
86 
89  bool SetFrequency(const InstanceIdentifier id, const AbsoluteFrequencyType value);
90 
94  bool IncreaseFrequency(const InstanceIdentifier id,
95  const AbsoluteFrequencyType value);
96 
99  AbsoluteFrequencyType GetFrequency(const InstanceIdentifier id) const;
100 
103  {
104  return m_TotalFrequency;
105  }
106 
107 protected:
110  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
111 
112 private:
113  DenseFrequencyContainer2(const Self &) ITK_DELETE_FUNCTION;
114  void operator=(const Self &) ITK_DELETE_FUNCTION;
115 
117  FrequencyContainerPointer m_FrequencyContainer;
118  TotalAbsoluteFrequencyType m_TotalFrequency;
119 }; // end of class
120 } // end of namespace Statistics
121 } // end of namespace itk
122 
123 #endif
Light weight base class for most itk classes.
NumericTraits< AbsoluteFrequencyType >::RealType RelativeFrequencyType
MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
This class is a container for frequencies of bins in an histogram.
NumericTraits< RelativeFrequencyType >::AccumulateType TotalRelativeFrequencyType
NumericTraits< AbsoluteFrequencyType >::AccumulateType TotalAbsoluteFrequencyType
unsigned long SizeValueType
Definition: itkIntTypes.h:143
MeasurementVectorTraits::RelativeFrequencyType RelativeFrequencyType
Defines a front-end to the std\::&lt;valarray&gt; container that conforms to the ImageContainerInterface.
MeasurementVectorTraits::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
MeasurementVectorTraits::TotalRelativeFrequencyType TotalRelativeFrequencyType
Base class for most ITK classes.
Definition: itkObject.h:57
ValarrayImageContainer< InstanceIdentifier, AbsoluteFrequencyType > FrequencyContainerType
FrequencyContainerType::Pointer FrequencyContainerPointer
MeasurementVectorTraits::AbsoluteFrequencyType AbsoluteFrequencyType