[ITK] [ITK-dev] ITKv5
Coert Metz
c.metz at quantib.com
Wed Sep 14 16:36:32 EDT 2016
Just to clarify. I think there could be very good reasons to choose either
one or the other option. Personally, I think I would be in favor to switch
to fixed width types as far as the downsides are not too large. I just
wanted to make you aware of the issue as it might not be so widely known
that there are three char types in C++ (at least, when I discovered it, I
was quite surprised) and it is something to take into account when making
the decision.
Kind regards,
Coert Metz
On Tue, Sep 13, 2016 at 10:36 PM, Dženan Zukić <dzenanz at gmail.com> wrote:
> I am in the camp of not using char but rather explicit 8-bit int (signed
> or unsigned). In C++, uint8_t and int8_t should be implicitly convertible
> to unsigned char and signed char respectively.
>
> On Tue, Sep 13, 2016 at 3:51 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
> blowekamp at mail.nih.gov> wrote:
>
>> Yes, according to C++(C) the types “char”, “unsigned char”, and “signed
>> char” are distinct intrinsict types. The “char” type may or may not be
>> signed [1].
>>
>> However, from a portable I/O perspective, the data must be either
>> “signed” or “unsigned”. I think using fixed with integer types for the byte
>> size is appropriate for portable I/O.
>>
>> Using the “char” type, with its undefined signess for I/O or image
>> processing is a mistake just waiting to happen, which can result in
>> unexpected signed behavior.
>>
>> HTH,
>> Brad
>>
>> [1] http://stackoverflow.com/questions/2054939/is-char-signe
>> d-or-unsigned-by-default
>>
>>
>> On Sep 13, 2016, at 6:07 AM, Coert Metz <c.metz at quantib.com> wrote:
>>
>> I don't have editing privileges for the wiki but I want to respond on the
>> suggestion to use fixed width types. In general, I think this is a good
>> idea. However, for char you have to realize that char, signed char and
>> unsigned char are three different types. Changing char -> int8_t will
>> therefore always be a real type change (and not only potentially for some
>> platforms). I am not sure if this is desirable as char is quite widely used
>> for 8 bit image representations in other systems/libraries.
>>
>> Kind regards,
>> Coert Metz
>>
>> On Fri, Sep 9, 2016 at 11:40 PM, Dženan Zukić <dzenanz at gmail.com> wrote:
>>
>>> I added a couple items to the wishlist.
>>>
>>> On Fri, Sep 9, 2016 at 3:28 PM, Francois Budin <
>>> francois.budin at kitware.com> wrote:
>>>
>>>> Hello everyone,
>>>>
>>>> I just started a wishlist page for ITKv5. As far as I know, there is no
>>>> current ITKv5 officially planned but it may be a good location to keep
>>>> track of the current limitations of ITK and what could be improved in the
>>>> next major revision that may break some of the API. Please feel free to add
>>>> any of your wishes on that page here: https://itk.org/Wiki/ITK_Relea
>>>> se_5/Wish_List
>>>> Thanks!
>>>>
>>>> Francois
>>>>
>>>> _______________________________________________
>>>> 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.php
>>>>
>>>> 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://public.kitware.com/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.php
>>>
>>> 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://public.kitware.com/mailman/listinfo/insight-developers
>>>
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>>
>>>
>>
>>
>> --
>> Coert Metz, PhD
>> Software Architect / Research & Development Engineer | Quantib B.V.
>> <http://www.quantib.com/>
>> c.metz at quantib.com | +31 650 68 60 28
>>
>> This message may contain confidential or privileged information. If you
>> are not the addressee, please notify the sender and delete it from your
>> files._______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
>>
>>
>>
>
--
Coert Metz, PhD
Software Architect / Research & Development Engineer | Quantib B.V.
<http://www.quantib.com/>
c.metz at quantib.com | +31 650 68 60 28
--
This message may contain confidential or privileged information. If you are
not the addressee, please notify the sender and delete it from your files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160914/1858b21c/attachment.html>
More information about the Community
mailing list