[ITK] [ITK-users] Image conversion from 3D volume to 2D slices

Dženan Zukić dzenanz at gmail.com
Wed May 8 11:48:45 EDT 2019


If the input and output pixel types are different, extract filter does
simple casting. That causes the effect you have observed. You need to use
RescaleIntensityImageFilter
<https://itk.org/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html>
either
before or after the extract. Have the extract filter use the same input and
output pixel type.

On Wed, May 8, 2019 at 11:44 AM Shrabani Ghosh <srbn.ghosh99 at gmail.com>
wrote:

> I am using   unsigned char as output pixel and signed short as input
> pixel.
>
> On Wed, May 8, 2019 at 10:19 AM Dženan Zukić <dzenanz at gmail.com> wrote:
>
>> You need to use a different pixel type. You might be using char, and
>> needing to use unsigned char or short.
>>
>> On Wed, May 8, 2019 at 2:17 AM Shrabani Ghosh <srbn.ghosh99 at gmail.com>
>> wrote:
>>
>>> I have tried different direction matrix collapse strategies. But still,
>>> I am
>>> getting the same. The slices are coming out like this.
>>>
>>>
>>> <http://itk-insight-users.2283740.n2.nabble.com/file/t396636/slice1.png>
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://itk-insight-users.2283740.n2.nabble.com/
>>> The ITK community is transitioning from this mailing list to
>>> discourse.itk.org. Please join us there!
>>> ________________________________
>>> 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.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:
>>> https://itk.org/mailman/listinfo/insight-users
>>> The ITK community is transitioning from this mailing list to
>>> discourse.itk.org. Please join us there!
>>> ________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> https://itk.org/mailman/listinfo/community
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://itk.org/pipermail/community/attachments/20190508/bcd5f754/attachment.html>
-------------- next part --------------
The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
________________________________
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.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:
https://itk.org/mailman/listinfo/insight-users


More information about the Community mailing list