[Insight-users] the overflow of itk::AddImageFilter

robert tamburo robert.tamburo at gmail.com
Tue May 24 11:45:12 EDT 2011


No, it will not cut-off at 255. It will give the correct result*** without
overflow error. The user's strategy of choice can then be used to map the
values of the output image to the [0 255] range, e.g., using
ThresholdImageFilter to set values above 255 to 255.

***Correct result is defined as the summation of two unsigned 8-bit
numbers.

On Tue, May 24, 2011 at 11:30 AM, <dominique at toepfer-web.de> wrote:

> Hi,
>
> would float as output type really give you a "cut-off" at 255? I don't know
> if there is a filter for that, but you could use image iterators and take
> care of the correct values yourself.
>
> HTH
> Dominique
>
>
> Set the output image to that of floating point pixels. That should get you
> the correct values.
>
> 2011/5/24 Quan <mrvillage at 163.com>
>
>>  hello everyone,
>> i got a problem when using AddImageFilter.I want to keep the
>> pixel-wise=255 (for my 8-bits scale images),when the overflow happens ,but
>>  the AddImageFilter's has such a description
>>  *Warning:*
>>    No numeric overflow checking is performed in this filter.
>> i add the segmented contour image(pixels on the contour = 255) and the
>> original image.while i use the AddImageFilter,the overflow happens and i
>> cannot get a meaningful outcome.
>> how can i manage it,does any member function of this class provide any
>> method that is responble to the overflow?
>>
>> thanks in advance.
>>
>> Quan
>>
>>
>>
>>
>>
>> _____________________________________
>> 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://www.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-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110524/21b09b2a/attachment.htm>


More information about the Insight-users mailing list