ITK
4.4.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Numerics
Statistics
include
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>
22
#include "
itkValarrayImageContainer.h
"
23
#include "
itkMeasurementVectorTraits.h
"
24
25
namespace
itk
26
{
27
namespace
Statistics
28
{
41
class
ITK_EXPORT
DenseFrequencyContainer2
:
42
public
Object
43
{
44
public
:
46
typedef
DenseFrequencyContainer2
Self
;
47
typedef
Object
Superclass
;
48
typedef
SmartPointer< Self >
Pointer
;
49
typedef
SmartPointer< const Self >
ConstPointer
;
50
52
itkTypeMacro(
DenseFrequencyContainer2
,
Object
);
53
55
itkNewMacro(
Self
);
56
58
typedef
MeasurementVectorTraits::InstanceIdentifier
InstanceIdentifier
;
59
61
typedef
MeasurementVectorTraits::AbsoluteFrequencyType
AbsoluteFrequencyType
;
62
64
typedef
MeasurementVectorTraits::TotalAbsoluteFrequencyType
TotalAbsoluteFrequencyType
;
65
67
typedef
MeasurementVectorTraits::RelativeFrequencyType
RelativeFrequencyType
;
68
70
typedef
MeasurementVectorTraits::TotalRelativeFrequencyType
TotalRelativeFrequencyType
;
71
73
typedef
ValarrayImageContainer< InstanceIdentifier, AbsoluteFrequencyType >
74
FrequencyContainerType
;
75
76
typedef
FrequencyContainerType::Pointer
FrequencyContainerPointer
;
77
80
void
Initialize(
SizeValueType
length);
81
84
void
SetToZero();
85
88
bool
SetFrequency(
const
InstanceIdentifier
id
,
const
AbsoluteFrequencyType
value);
89
93
bool
IncreaseFrequency(
const
InstanceIdentifier
id
,
94
const
AbsoluteFrequencyType
value);
95
98
AbsoluteFrequencyType
GetFrequency(
const
InstanceIdentifier
id
)
const
;
99
101
TotalAbsoluteFrequencyType
GetTotalFrequency()
102
{
103
return
m_TotalFrequency;
104
}
105
106
protected
:
107
DenseFrequencyContainer2
();
108
virtual
~DenseFrequencyContainer2
() {}
109
void
PrintSelf(std::ostream & os,
Indent
indent)
const
;
110
111
private
:
112
DenseFrequencyContainer2
(
const
Self &);
//purposely not implemented
113
void
operator=(
const
Self &);
//purposely not implemented
114
116
FrequencyContainerPointer
m_FrequencyContainer
;
117
TotalAbsoluteFrequencyType
m_TotalFrequency
;
118
};
// end of class
119
}
// end of namespace Statistics
120
}
// end of namespace itk
121
122
#endif
123
Generated on Mon May 13 2013 00:48:10 for ITK by
1.8.3.1