View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0005006 | ITK | public | 2007-05-09 18:30 | 2007-09-17 12:09 | |||||
Reporter | Dan Mueller | ||||||||
Assigned To | Luis Ibanez | ||||||||
Priority | low | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005006: Incorrect NumericTraits for RGBPixel | ||||||||
Description | In Code/Common/itkNumericTraitsRGBPixel.h the ValueType, PrintType, and AbsType for unsigned short is incorrect (it has unsigned char, not unsigned short). It currently reads: /** \class NumericTraits<RGBPixel<unsigned short> > * \brief Define traits for type RGBPixel<unsigned char>. * \ingroup DataRepresentation */ template <> class NumericTraits<RGBPixel<unsigned short> > { public: typedef RGBPixel<unsigned char> ValueType; //<< typedef RGBPixel<unsigned char> PrintType; //<< typedef RGBPixel<unsigned char> AbsType; //<< typedef RGBPixel<unsigned short> AccumulateType; typedef RGBPixel<double> RealType; typedef double ScalarRealType; typedef RGBPixel<float> FloatType; static const RGBPixel<unsigned short> ITKCommon_EXPORT Zero; static const RGBPixel<unsigned short> ITKCommon_EXPORT One; static ValueType ZeroValue() { return Zero; } }; but should read: /** \class NumericTraits<RGBPixel<unsigned short> > * \brief Define traits for type RGBPixel<unsigned short>. * \ingroup DataRepresentation */ template <> class NumericTraits<RGBPixel<unsigned short> > { public: typedef RGBPixel<unsigned short> ValueType; //<< typedef RGBPixel<unsigned short> PrintType; //<< typedef RGBPixel<unsigned short> AbsType; //<< typedef RGBPixel<unsigned short> AccumulateType; typedef RGBPixel<double> RealType; typedef double ScalarRealType; typedef RGBPixel<float> FloatType; static const RGBPixel<unsigned short> ITKCommon_EXPORT Zero; static const RGBPixel<unsigned short> ITKCommon_EXPORT One; static ValueType ZeroValue() { return Zero; } }; The comment is also wrong (has char instead of short). I have attached a file with the correction. | ||||||||
Tags | No tags attached. | ||||||||
Resolution Date | |||||||||
Sprint | |||||||||
Sprint Status | |||||||||
Attached Files | itkNumericTraitsRGBPixel.h [^] (2,381 bytes) 1969-12-31 19:00 | ||||||||
Relationships | |
Relationships |
Notes | |
(0007608) Dan Mueller (reporter) 2007-05-09 18:34 |
Just thinking, the AccumulateType should probably also be changed from <unsigned short> to <unsigned long>... |
(0009013) Luis Ibanez (manager) 2007-09-17 09:07 |
The report is correct, the RGB traits of "unsigned short" are not defined correctly. The AccumulateType is also missing to use a larger capacity type. In order to be consistent with the NumericTraits<unsigned short> the AccumulateType should use "int". |
(0009014) Luis Ibanez (manager) 2007-09-17 09:12 |
The Fix has been committed: http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkNumericTraitsRGBPixel.h?root=Insight&sortby=date&r2=1.10&r1=1.9 [^] |
(0009026) Luis Ibanez (manager) 2007-09-17 12:09 |
The Experimental submission from zion passed all the tests. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-09-17 09:07 | Luis Ibanez | Note Added: 0009013 | |
2007-09-17 09:07 | Luis Ibanez | Status | assigned => acknowledged |
2007-09-17 09:12 | Luis Ibanez | Note Added: 0009014 | |
2007-09-17 12:09 | Luis Ibanez | Status | acknowledged => closed |
2007-09-17 12:09 | Luis Ibanez | Note Added: 0009026 | |
2007-09-17 12:09 | Luis Ibanez | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |