ITK  5.0.0
Insight Segmentation and Registration Toolkit
NumericTraits Class Reference

#include <itkNumericTraitsStdVector.h>

+ Inheritance diagram for NumericTraits:

Detailed Description

Define numeric traits for std::vector.

Template Parameters
TComponent type of std::vector

We provide here a generic implementation based on creating types of std::vector whose components are the types of the NumericTraits from the original std::vector components. This implementation require support for partial specializations, since it is based on the concept that: NumericTraits<std::vector< T > > is defined piecewise by std::vector< NumericTraits< T > >

Note
The Zero(), One(), min() and max() methods here take references to a pixel as input. This is due to the fact that the length of the std::vector is not known until run-time. Since the most common use of Zero and One is for comparison purposes or initialization of sums etc, this might just as easily be re-written with a pixel passed in as a reference and the length is inferred from this pixel.
See Also
NumericTraits
Examples:
Examples/Filtering/CompositeFilterExample.cxx.

The documentation for this class was generated from the following file: