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