[ITK] Getting ImageType for TIFF

Matt McCormick matt.mccormick at kitware.com
Wed Aug 13 13:50:04 EDT 2014


Hi Marian,

If

  itk::Image< unsigned  short, 2 >

is used for the ImageType, does it work (note the dimension specification).

HTH,
Matt

On Wed, Aug 13, 2014 at 1:47 PM, Мар'ян Климов <nekto1989 at gmail.com> wrote:
> Hi,
>
> How to properly read 32-bit TIFF? I need to get itk::Image<unsigned short>
> on output. If I use it as ImageType for ImageFileReader, it is read as fully
> black (checked contrast with Image Watch and it is for sure completely
> empty). If I read it with pixel type RGBPixel<unsigned char> or
> RGBAPixel<unsigned char>, it is read properly. But I need to convert it
> manually to unsigned short after this. So what is the proper way of reading
> it? Do I need to create templated methods for every pixeltype with
> conversions to unsigned short?
>
> Best regards,
> Marian
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>



More information about the Community mailing list