This file is indexed.

/usr/include/InsightToolkit/Common/itkNumericTraits.h is in libinsighttoolkit3-dev 3.20.1+git20120521-6build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkNumericTraits.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __itkNumericTraits_h
#define __itkNumericTraits_h

#include "itkMacro.h"
#undef min
#undef max

#define itkNUMERIC_TRAITS_MIN_MAX_MACRO() \
  static ValueType min() { return vcl_numeric_limits<ValueType>::min(); } \
  static ValueType max() { return vcl_numeric_limits<ValueType>::max(); } \
  static ValueType min( ValueType ) { return vcl_numeric_limits<ValueType>::min(); } \
  static ValueType max( ValueType ) { return vcl_numeric_limits<ValueType>::max(); } \


#include "vcl_limits.h" // for vcl_numeric_limits
#include <complex>

namespace itk
{

/** \class NumericTraits
 * \brief Define additional traits for native types such as int or float.
 *
 * NumericTraits is used to extend the traits associated with native types
 * such as float, char, int, and so on. These traits are extensions of the
 * standard numeric_limits defined by the C++ compilers. Some of the added
 * traits include minimum and maximum value; accumulation type; etc.
 *
 * \ingroup DataRepresentation
 */
template <class T>
class NumericTraits : public vcl_numeric_limits<T> {
public:
  /** The type of this limits trait object. */
  typedef vcl_numeric_limits<T> TraitsType;

  /** Return the type of this native type. */
  typedef T ValueType;

  /** Return the type that can be printed. */
  typedef T PrintType;

  /** Return value of vcl_abs(). */
  typedef T AbsType;

  /** Accumulation of addition and multiplication. */
  typedef double AccumulateType;

  // This primary template is never used but we need this definition
  // to avoid an ICE on VS 7.0.  This definition cannot be present for
  // VS 7.1 though or it generates bogus errors.
#if defined(_MSC_VER) && _MSC_VER == 1300
  /** Type for real-valued operations.  */
  typedef double    RealType;
  typedef RealType  ScalarRealType;
#endif

  /** Typedef for operations that use floating point instead of real precision
   *  to save memory */
  typedef float FloatType;

  /** Additive identity. */
  static const T Zero;

  /** Multiplicative identity. */
  static const T One;

  /** Smallest (most nonpositive) value */
  static T NonpositiveMin() { return TraitsType::min(); }

  /** Is a given value positive? */
  static bool IsPositive(T val) { return val > Zero; }

  /** Is a given value nonpositive? */
  static bool IsNonpositive(T val) { return val <= Zero; }

  /** Is a given value negative? */
  static bool IsNegative(T val) { return val < Zero; }

  /** Is a given value nonnegative? */
  static bool IsNonnegative(T val) { return val >= Zero; }

  /** Return zero value. This function should be used to support
   *  RGBPixel type and standard types (not vectors) */
  static T ZeroValue() { return Zero; }

  /** Return one value. This function should be used to support
   *  RGBPixel type and standard types (not vectors) */
  static T OneValue() { return One; }

  /* Provide a default implementation of the max() method with
   * argument. This API is needed for VariableLengthVector because
   * its length is only known at run-time. Specializations of the
   * VariableLengthVector will provide a different implementation
   * where a vector of the correct size is built. */
  static T max( const T & val ) { return TraitsType::max(); }
  static T min( const T & val ) { return TraitsType::min(); }
};

/** \class NumericTraits<bool>
 * \brief Define traits for type bool.
 *
 * \ingroup DataRepresentation
 */

template <>
class NumericTraits<bool> : public vcl_numeric_limits<bool> {
public:
  typedef bool            ValueType;
  typedef bool            PrintType;
  typedef unsigned char   AbsType;
  typedef unsigned char   AccumulateType;
  typedef double          RealType;
  typedef RealType        ScalarRealType;
  typedef float           FloatType;

  static const bool ITKCommon_EXPORT Zero;
  static const bool ITKCommon_EXPORT One;

  static bool min() { return false; }
  static bool max() { return true; }
  static bool min( bool ) { return min(); }
  static bool max( bool ) { return max(); }
  static bool NonpositiveMin() { return false; }
  static bool IsPositive(bool val) { return val; }
  static bool IsNonpositive(bool val) { return !val; }
  static bool IsNegative(bool val) { return val ? false : false; }
  static bool IsNonnegative(bool val) {return val ? true : true; }
  static bool ZeroValue() { return Zero; }
  static bool OneValue() { return One; }
};

/** \class NumericTraits<char>
 * \brief Define traits for type char.
 * NOTE: char is not guaranteed to be signed. On SGI's, the default is unsigned
 */
template <>
class NumericTraits<char> : public vcl_numeric_limits<char> {
public:
  typedef char            ValueType;
  typedef int             PrintType;
  typedef unsigned char   AbsType;
  typedef short           AccumulateType;
  typedef double          RealType;
  typedef RealType        ScalarRealType;
  typedef float           FloatType;

  static const char ITKCommon_EXPORT Zero;
  static const char ITKCommon_EXPORT One;

#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4310) // cast truncates constant value
#endif
  static char min() { return char(255) < 0 ? -128 : 0; }
  static char max() { return char(255) < 0 ? 127 : 255; }
#ifdef _MSC_VER
#pragma warning (pop)
#endif

  static char min( char ) { return min(); }
  static char max( char ) { return max(); }
  static char NonpositiveMin() { return min(); }
  static bool IsPositive(char val) { return val > Zero; }
  static bool IsNonpositive(char val) { return val <= Zero; }
  static bool IsNegative(char val) { return val < Zero; }
  static bool IsNonnegative(char val) {return val >= Zero; }
  static char ZeroValue() { return Zero; }
  static char OneValue() { return One; }
};

/** \class NumericTraits<char>
 * \brief Define traits for type char.
 * NOTE: char is not guaranteed to be signed. On SGI's, the default is unsigned
 */
template <>
class NumericTraits<signed char> : public vcl_numeric_limits<signed char> {
public:
  typedef signed char         ValueType;
  typedef int                 PrintType;
  typedef unsigned char       AbsType;
  typedef short               AccumulateType;
  typedef double              RealType;
  typedef RealType            ScalarRealType;
  typedef float               FloatType;

  static const signed char ITKCommon_EXPORT Zero;
  static const signed char ITKCommon_EXPORT One;

  static signed char min() { return -128; }
  static signed char max() { return  127; }
  static signed char min( signed char ) { return min(); }
  static signed char max( signed char ) { return max(); }
  static signed char NonpositiveMin() { return min(); }
  static bool IsPositive(signed char val) { return val > Zero; }
  static bool IsNonpositive(signed char val) { return val <= Zero; }
  static bool IsNegative(signed char val) { return val < Zero; }
  static bool IsNonnegative(signed char val) {return val >= Zero; }
  static signed char  ZeroValue() { return Zero; }
  static signed char OneValue() { return One; }
};

/** \class NumericTraits<unsigned char>
 * \brief Define traits for type unsigned char.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<unsigned char> : public vcl_numeric_limits<unsigned char> {
public:
  typedef unsigned char     ValueType;
  typedef int               PrintType;
  typedef unsigned char     AbsType;
  typedef unsigned short    AccumulateType;
  typedef double            RealType;
  typedef RealType          ScalarRealType;
  typedef float             FloatType;

  static const unsigned char ITKCommon_EXPORT Zero;
  static const unsigned char ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();

  static unsigned char NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(unsigned char val) { return val != Zero; }
  static bool IsNonpositive(unsigned char val) { return val == Zero; }
  static bool IsNegative(unsigned char val ) { return val ? false : false; }
  static bool IsNonnegative(unsigned char val) {return val ? true : true; }
  static unsigned char  ZeroValue() { return Zero; }
  static unsigned char OneValue() { return One; }
};

/** \class NumericTraits<short>
 * \brief Define traits for type short.
 */
template <>
class NumericTraits<short> : public vcl_numeric_limits<short> {
public:
  typedef short             ValueType;
  typedef short             PrintType;
  typedef unsigned short    AbsType;
  typedef int               AccumulateType;
  typedef double            RealType;
  typedef RealType          ScalarRealType;
  typedef float             FloatType;

  static const short ITKCommon_EXPORT Zero;
  static const short ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static short NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(short val) { return val > Zero; }
  static bool IsNonpositive(short val) { return val <= Zero; }
  static bool IsNegative(short val) { return val < Zero; }
  static bool IsNonnegative(short val) {return val >= Zero; }
  static short  ZeroValue() { return Zero; }
  static short OneValue() { return One; }
};

/** \class NumericTraits<unsigned short>
 * \brief Define traits for type unsigned short.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<unsigned short> : public vcl_numeric_limits<unsigned short> {
public:
  typedef unsigned short    ValueType;
  typedef unsigned short    PrintType;
  typedef unsigned short    AbsType;
  typedef unsigned int      AccumulateType;
  typedef double            RealType;
  typedef RealType          ScalarRealType;
  typedef float             FloatType;

  static const unsigned short ITKCommon_EXPORT Zero;
  static const unsigned short ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static unsigned short NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(unsigned short val) { return val != Zero; }
  static bool IsNonpositive(unsigned short val) { return val == Zero; }
  static bool IsNegative(unsigned short val) { return val ? false : false; }
  static bool IsNonnegative(unsigned short val) {return val ? true : true; }
  static unsigned short  ZeroValue() { return Zero; }
  static unsigned short OneValue() { return One; }
};

/** \class NumericTraits<int>
 * \brief Define traits for type int.
 */
template <>
class NumericTraits<int> : public vcl_numeric_limits<int> {
public:
  typedef int           ValueType;
  typedef int           PrintType;
  typedef unsigned int  AbsType;
  typedef long          AccumulateType;
  typedef double        RealType;
  typedef RealType      ScalarRealType;
  typedef float         FloatType;

  static const int ITKCommon_EXPORT Zero;
  static const int ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static int NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(int val) { return val > Zero; }
  static bool IsNonpositive(int val) { return val <= Zero; }
  static bool IsNegative(int val) { return val < Zero; }
  static bool IsNonnegative(int val) {return val >= Zero; }
  static int  ZeroValue() { return Zero; }
  static int OneValue() { return One; }
};

/** \class NumericTraits<unsigned int>
 * \brief Define traits for type unsigned int.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<unsigned int> : public vcl_numeric_limits<unsigned int> {
public:
  typedef unsigned int    ValueType;
  typedef unsigned int    PrintType;
  typedef unsigned int    AbsType;
  typedef unsigned int    AccumulateType;
  typedef double          RealType;
  typedef RealType        ScalarRealType;
  typedef float           FloatType;

  static const unsigned int ITKCommon_EXPORT Zero;
  static const unsigned int ITKCommon_EXPORT One;

  static unsigned int min(void) { return 0; }
  static unsigned int max(void) { return static_cast<unsigned int>( -1 ); }
  static unsigned int min( unsigned int ) { return vcl_numeric_limits<ValueType>::min(); }
  static unsigned int max( unsigned int ) { return vcl_numeric_limits<ValueType>::max(); }
  static unsigned int NonpositiveMin() { return 0; }
  static bool IsPositive(unsigned int val) { return val != Zero; }
  static bool IsNonpositive(unsigned int val) { return  val == Zero; }
  static bool IsNegative(unsigned int val) { return val ? false : false; }
  static bool IsNonnegative(unsigned int val) {return val ? true : true; }
  static unsigned int  ZeroValue() { return Zero; }
  static unsigned int OneValue() { return One; }
};

/** \class NumericTraits<long>
 * \brief Define traits for type long.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<long> : public vcl_numeric_limits<long> {
public:
  typedef long            ValueType;
  typedef long            PrintType;
  typedef unsigned long   AbsType;
  typedef long            AccumulateType;
  typedef double          RealType;
  typedef RealType        ScalarRealType;
  typedef float           FloatType;

  static const long ITKCommon_EXPORT Zero;
  static const long ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static long NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(long val) { return val > Zero; }
  static bool IsNonpositive(long val) { return val <= Zero; }
  static bool IsNegative(long val) { return val < Zero; }
  static bool IsNonnegative(long val) {return val >= Zero; }
  static long  ZeroValue() { return Zero; }
  static long OneValue() { return One; }
};

/** \class NumericTraits<unsigned long>
 * \brief Define traits for type unsigned long.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<unsigned long> : public vcl_numeric_limits<unsigned long> {
public:
  typedef unsigned long     ValueType;
  typedef unsigned long     PrintType;
  typedef unsigned long     AbsType;
  typedef unsigned long     AccumulateType;
  typedef double            RealType;
  typedef RealType          ScalarRealType;
  typedef float             FloatType;

  static const unsigned long ITKCommon_EXPORT Zero;
  static const unsigned long ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static unsigned long NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(unsigned long val) { return val != Zero; }
  static bool IsNonpositive(unsigned long val) { return val == Zero; }
  static bool IsNegative(unsigned long) { return false; }
  static bool IsNonnegative(unsigned long) {return true; }
  static unsigned long  ZeroValue() { return Zero; }
  static unsigned long  OneValue() { return One; }
};

/** \class NumericTraits<float>
 * \brief Define traits for type float.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<float> : public vcl_numeric_limits<float> {
public:
  typedef float       ValueType;
  typedef float       PrintType;
  typedef float       AbsType;
  typedef double      AccumulateType;
  typedef double      RealType;
  typedef RealType    ScalarRealType;
  typedef float       FloatType;

  static const float ITKCommon_EXPORT Zero;
  static const float ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static float NonpositiveMin() { return -vcl_numeric_limits<ValueType>::max(); }
  static bool IsPositive(float val) { return val > Zero; }
  static bool IsNonpositive(float val) { return val <= Zero; }
  static bool IsNegative(float val) { return val < Zero; }
  static bool IsNonnegative(float val) {return val >= Zero; }
  static float  ZeroValue() { return Zero; }
  static float  OneValue() { return One; }
};

/** \class NumericTraits<double>
 * \brief Define traits for type double.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<double> : public vcl_numeric_limits<double> {
public:
  typedef double    ValueType;
  typedef double    PrintType;
  typedef double    AbsType;
  typedef double    AccumulateType;
  typedef double    RealType;
  typedef RealType  ScalarRealType;
  typedef float     FloatType;

  static const double ITKCommon_EXPORT Zero;
  static const double ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static double NonpositiveMin() { return -vcl_numeric_limits<ValueType>::max(); }
  static bool IsPositive(double val) { return val > Zero; }
  static bool IsNonpositive(double val) { return val <= Zero; }
  static bool IsNegative(double val) { return val < Zero; }
  static bool IsNonnegative(double val) {return val >= Zero; }
  static double  ZeroValue() { return Zero; }
  static double  OneValue() { return One; }
};

/** \class NumericTraits<long double>
 * \brief Define traits for type long double.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<long double> : public vcl_numeric_limits<long double> {
public:
  typedef long double     ValueType;
  typedef long double     PrintType;
  typedef long double     AbsType;
  typedef long double     AccumulateType;
  typedef long double     RealType;
  typedef RealType        ScalarRealType;
  typedef float           FloatType;

  static const long double ITKCommon_EXPORT Zero;
  static const long double ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static long double NonpositiveMin() { return -vcl_numeric_limits<ValueType>::max(); }
  static bool IsPositive(long double val) { return val > Zero; }
  static bool IsNonpositive(long double val) { return val <= Zero; }
  static bool IsNegative(long double val) { return val < Zero; }
  static bool IsNonnegative(long double val) {return val >= Zero; }
  static long double ZeroValue() { return Zero; }
  static long double OneValue() { return One; }
};

/** \class NumericTraits< std::complex<float> >
 * \brief Define traits for type std::complex<float>.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits< std::complex<float> >  {
public:
  typedef std::complex<float>   TheType;
  typedef float                 ValueType;
  typedef TheType               PrintType;
  typedef double                AbsType;
  typedef TheType               AccumulateType;
  typedef std::complex<double>  RealType;
  typedef double                ScalarRealType;
  typedef std::complex<float>   FloatType;

  static const TheType ITKCommon_EXPORT Zero;
  static const TheType ITKCommon_EXPORT One;

  static TheType min( TheType ) { return vcl_numeric_limits<ValueType>::min(); }
  static TheType max( TheType ) { return vcl_numeric_limits<ValueType>::max(); }
  static TheType NonpositiveMin() {
    return TheType(-NumericTraits<float>::NonpositiveMin(),0.0f); }
  static bool IsPositive(TheType val) { return val.real() > 0.0; }
  static bool IsNonpositive(TheType val) { return val.real() <= 0.0; }
  static bool IsNegative(TheType val) { return val.real() < 0.0; }
  static bool IsNonnegative(TheType val) {return val.real() >= 0.0; }
  static TheType ZeroValue() { return Zero; }
  static TheType OneValue() { return One; }
};


/** \class NumericTraits< std::complex<double> >
 * \brief Define traits for type std::complex<double>.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits< std::complex<double> >  {
public:
  typedef std::complex<double>  TheType;
  typedef double                ValueType;
  typedef TheType               PrintType;
  typedef double                AbsType;
  typedef TheType               AccumulateType;
  typedef std::complex<double>  RealType;
  typedef double                ScalarRealType;
  typedef std::complex<float>   FloatType;

  static const TheType ITKCommon_EXPORT Zero;
  static const TheType ITKCommon_EXPORT One;

  static TheType min( TheType ) { return vcl_numeric_limits<ValueType>::min(); }
  static TheType max( TheType ) { return vcl_numeric_limits<ValueType>::max(); }
  static TheType NonpositiveMin() {
    return TheType(-NumericTraits<double>::NonpositiveMin(),0.0); }
  static bool IsPositive(TheType val) { return val.real() > 0.0; }
  static bool IsNonpositive(TheType val) { return val.real() <= 0.0; }
  static bool IsNegative(TheType val) { return val.real() < 0.0; }
  static bool IsNonnegative(TheType val) {return val.real() >= 0.0; }
  static TheType ZeroValue() { return Zero; }
  static TheType OneValue() { return One; }
};

#ifdef ITK_TYPE_USE_LONG_LONG
/** \class NumericTraits<long long>
 * \brief Define traits for type long long.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<long long> 
: public vcl_numeric_limits<long long> {
public:
  typedef long long          ValueType;
  typedef long long          PrintType;
  typedef long long          AbsType;
  typedef long long          AccumulateType;
  typedef double             RealType;
  typedef RealType           ScalarRealType; 
  typedef float              FloatType;

  static const ValueType ITKCommon_EXPORT Zero;
  static const ValueType ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static ValueType NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(ValueType val) { return val > Zero; }
  static bool IsNonpositive(ValueType val) { return val <= Zero; }
  static bool IsNegative(ValueType val) { return val < Zero; }
  static bool IsNonnegative(ValueType val) {return val >= Zero; }
  static ValueType  ZeroValue() { return Zero; }
  static ValueType  OneValue() { return One; }
};

/** \class NumericTraits<unsigned long long>
 * \brief Define traits for type unsigned long long.
 * \ingroup DataRepresentation
 */
template <>
class NumericTraits<unsigned long long> 
  : public vcl_numeric_limits<unsigned long long> {
public:
  typedef unsigned long long ValueType;
  typedef unsigned long long PrintType;
  typedef unsigned long long AbsType;
  typedef unsigned long long AccumulateType;
  typedef double             RealType;
  typedef RealType           ScalarRealType;
  typedef float              FloatType;

  static const ValueType ITKCommon_EXPORT Zero;
  static const ValueType ITKCommon_EXPORT One;

  itkNUMERIC_TRAITS_MIN_MAX_MACRO();
  static ValueType NonpositiveMin() { return vcl_numeric_limits<ValueType>::min(); }
  static bool IsPositive(ValueType val) { return val != Zero; }
  static bool IsNonpositive(ValueType val) { return val == Zero; }
  static bool IsNegative(ValueType) { return false; }
  static bool IsNonnegative(ValueType) {return true; }
  static ValueType ZeroValue() { return Zero; }
  static ValueType OneValue() { return One; }
};
#endif /* #ifdef ITK_TYPE_USE_LONG_LONG */

} // end namespace itk

#endif // __itkNumericTraits_h