[Insight-developers] NumericTraits for RGBPixel

Emmanuel Christophe emmanuel.christophe at gmail.com
Thu Apr 8 22:53:14 EDT 2010


Hi,

The Experimental was green:
http://www.cdash.org/CDash/buildSummary.php?buildid=581930

I've committed the changes for RGBPixel and RGBAPixel:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkNumericTraitsRGBPixel.h?root=Insight&r1=1.20&r2=1.21&sortby=date
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkNumericTraitsRGBAPixel.h?root=Insight&r1=1.10&r2=1.11&sortby=date

Emmanuel


On Fri, Apr 9, 2010 at 03:45, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> I think it was the SGI (remember them, Silicon Graphics Inc) that
> allowed you to set char's signedness in a compiler option.
>
> Morale of the story, never name a machine "Infinite"...
>
> Bill
>
> On Thu, Apr 8, 2010 at 2:33 PM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
>> Hello,
>> I quickly looked at the file. I would agree with this change. Also don't for
>> get about RGBA!
>> Also I noticed there was no:
>> itkNumericTraitsRGBPixelMacro( signed char );
>> I believe the type "char" may be signed or unsigned. So this should be
>> explicitly defined for this type as to ensure its availability. I wish I
>> could remember what system/compiler was like this though. Scratch that
>> actually. Looking at some other NumericTraits files the template  parameter
>> type are not consistently defined either.
>> Brad
>> On Apr 8, 2010, at 2:01 PM, Luis Ibanez wrote:
>>
>> Hi Emmanuel,
>>
>> Thanks for pointing this out.
>>
>> I share your view, it will make sense to define the traits
>> of the composite class based on the traits of its elements.
>>
>> Could you please give it a shot at running an Experimental
>> build with this change ?
>>
>> and if it comes out green,
>> I will vote for committing the change.
>>
>>
>>     Thanks
>>
>>         Luis
>>
>>
>>
>> ----------------------------------------------------------------------
>> On Thu, Apr 8, 2010 at 10:57 AM, Emmanuel Christophe
>> <emmanuel.christophe at gmail.com> wrote:
>>
>> Hi,
>>
>> Is there any reason (backward compatibility?) why the PrintType trait
>>
>> for RGBPixel is defined as:
>>
>> typedef Self PrintType;
>>
>> instead of:
>>
>> typedef  RGBPixel<ElementPrintType> PrintType;
>>
>> ???
>>
>> I would expect the PrintType to be consistent with the trait of the
>>
>> element type. With the current definition:
>>
>> std::cout << static_cast<typename
>> itk::NumericTraits<PixelType>::PrintType>(v);
>>
>> works fine with a PixelType defined as char (the char is converted to
>>
>> int before printing), but it doesn't work for a PixelType defined as
>>
>> RGBPixel<char> (it outputs characters like ÿ ÿ ÿ).
>>
>> This is the same for the NumericTraits of the RGBAPixel.
>>
>> Emmanuel
>>
>> _______________________________________________
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>>
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>>
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>>
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>>
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>> ========================================================
>>
>> Bradley Lowekamp
>>
>> Lockheed Martin Contractor for
>>
>> Office of High Performance Computing and Communications
>>
>> National Library of Medicine
>>
>> blowekamp at mail.nih.gov
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list