[ITK-users] read palette image as scalar image + palette, instead of RGB image
asertyuio
asertyuio at yahoo.fr
Sun Jan 15 11:07:01 EST 2017
Hi all,
I want to read a palette image as a scalar image with its indexes + a
vector of RGB, corresponding to the image palette. The format of the
image is TIFF, but can be png or gif as well.
When I'm reading such palette image, the |itk::ImageIOBase|, as
implemented here
<https://itk.org/ITKExamples/src/IO/ImageBase/ReadUnknownImageType/Documentation.html>,
tels me that the image has a RGB pixel type.
|itk::ImageIOBase::PointerimageIO
=itk::ImageIOFactory::CreateImageIO(fileName,itk::ImageIOFactory::ReadMode);|
Is it possible to know, *through ITK*, whether the image is actually a
palette image, /i.e./ scalar image along with a color palette, and read
this image as a scalar image + palette ? I need have access to the
index, as stored in the file as well as the color palette used in the file.
For now, my only solution is to use freeImagePlus to identify and read
this type of image. I haven't found any function in the class
|ImageIOBase| that could relate to that.
Any help would be appreciated, thanks a lot !
Yann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170115/72b95d4b/attachment.html>
More information about the Insight-users
mailing list