ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Core
Common
include
itkResourceProbe.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 __itkResourceProbe_h
19
#define __itkResourceProbe_h
20
21
#include "
itkMacro.h
"
22
#include "
itkIntTypes.h
"
23
#include <string>
24
25
namespace
itk
26
{
38
template
<
class
ValueType,
class
MeanType >
39
class
ITK_EXPORT
ResourceProbe
40
{
41
public
:
42
45
typedef
SizeValueType
CountType
;
46
public
:
47
49
ResourceProbe
(
const
std::string & type,
const
std::string & unit);
50
52
virtual
~
ResourceProbe
();
53
55
std::string GetType(
void
)
const
;
56
58
std::string GetUnit(
void
)
const
;
59
61
void
Start(
void
);
62
64
void
Stop(
void
);
65
67
CountType
GetNumberOfStarts(
void
)
const
;
68
70
CountType
GetNumberOfStops(
void
)
const
;
71
74
virtual
ValueType GetInstantValue(
void
)
const
= 0;
75
78
ValueType GetTotal(
void
)
const
;
79
83
MeanType GetMean(
void
)
const
;
84
85
private
:
86
87
ValueType
m_StartValue
;
88
ValueType
m_TotalValue
;
89
90
CountType
m_NumberOfStarts
;
91
CountType
m_NumberOfStops
;
92
93
std::string
m_TypeString
;
94
std::string
m_UnitString
;
95
};
96
}
// end namespace itk
97
98
#ifndef ITK_MANUAL_INSTANTIATION
99
#include "itkResourceProbe.hxx"
100
#endif
101
102
#endif //__itkResourceProbe_h
103
Generated on Tue Jul 10 2012 23:42:12 for ITK by
1.8.1