Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkITKNumericTraits.h
Go to the documentation of this file.
1
4#ifndef __vtkITKNumericTraits_h
5#define __vtkITKNumericTraits_h
6
7#include "vtkITK.h"
8#include "vtkSystemIncludes.h"
9
10#include "itkNumericTraits.h"
11
12namespace itk
13{
14
15#if defined(VTK_TYPE_USE___INT64)
16template <>
17class NumericTraits<__int64> : public std::numeric_limits<__int64>
18{
19public:
20 typedef __int64 ValueType;
21 typedef __int64 PrintType;
22 typedef unsigned __int64 AbsType;
23 typedef __int64 AccumulateType;
24 typedef double RealType;
25 typedef RealType ScalarRealType;
26 typedef float FloatType;
27 static const __int64 VTK_ITK_EXPORT Zero;
28 static const __int64 VTK_ITK_EXPORT One;
29
30 static __int64 min() { return std::numeric_limits<__int64>::min(); }
31 static __int64 max() { return std::numeric_limits<__int64>::max(); }
32 static __int64 min(__int64) { return std::numeric_limits<__int64>::min(); }
33 static __int64 max(__int64) { return std::numeric_limits<__int64>::max(); }
34 static __int64 NonpositiveMin() { return min(); }
35 static bool IsPositive(__int64 val) { return val > Zero; }
36 static bool IsNonpositive(__int64 val) { return val <= Zero; }
37 static bool IsNegative(__int64 val) { return val < Zero; }
38 static bool IsNonnegative(__int64 val) { return val >= Zero; }
39 static __int64 ZeroValue() { return Zero; }
40};
41
42template <>
43class NumericTraits<unsigned __int64> : public std::numeric_limits<unsigned __int64>
44{
45public:
46 typedef unsigned __int64 ValueType;
47 typedef unsigned __int64 PrintType;
48 typedef unsigned __int64 AbsType;
49 typedef unsigned __int64 AccumulateType;
50 typedef double RealType;
51 typedef RealType ScalarRealType;
52 typedef float FloatType;
53 static const unsigned __int64 VTK_ITK_EXPORT Zero;
54 static const unsigned __int64 VTK_ITK_EXPORT One;
55
56 static unsigned __int64 min() { return std::numeric_limits<unsigned __int64>::min(); }
57 static unsigned __int64 max() { return std::numeric_limits<unsigned __int64>::max(); }
58 static unsigned __int64 min(unsigned __int64) { return std::numeric_limits<unsigned __int64>::min(); }
59 static unsigned __int64 max(unsigned __int64) { return std::numeric_limits<unsigned __int64>::max(); }
60 static unsigned __int64 NonpositiveMin() { return min(); }
61 static bool IsPositive(unsigned __int64 val) { return val != Zero; }
62 static bool IsNonpositive(unsigned __int64 val) { return val == Zero; }
63 static bool IsNegative(unsigned __int64) { return false; }
64 static bool IsNonnegative(unsigned __int64) { return true; }
65 static unsigned __int64 ZeroValue() { return Zero; }
66};
67#endif
68
69} // namespace itk
70
71#endif
double RealType
Definition dtitypes.h:40
Simplified inverse ITK transforms.