[Insight-users] Trouble reading 8bit BMP images as a VectorImage

Matt McCormick matt.mccormick at kitware.com
Sat Aug 17 15:33:58 EDT 2013


Hi Cyrille,

Examining the log file for the itkBMPImageIO.h,

  git log -- Modules/IO/BMP/include/itkBMPImageIO.h

the behavior for 8 bit BMP's was changes with this patch [1], which
corresponds with this issue [2].

If you would like to expose this flag, patches are welcome.
Instructions can be found here [3].

Thanks,
Matt


[1] http://itk.org/gitweb?p=ITK.git;a=commit;h=aaff761c6bbf5b0dfca42c0a9d84eab900631199
[2] http://www.itk.org/Bug/bug_relationship_graph.php?bug_id=7773&graph=dependency
[3] http://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html


On Sat, Aug 17, 2013 at 11:28 AM, Cyrille Faucheux
<cyrille.faucheux at etu.univ-tours.fr> wrote:
> Hi,
>
> I need to read grayscale and RGB bitmap images as itk::VectorImage<double, 3>.
> ITK always tells me that the grayscale ones have 3 components per pixels.
> I've checked with multiple tools, those images are really 8bits (no color table)
>
> I've dug a little, and found in itkBMPImageIO.cxx a flag named Allow8BitBMP, which is set to false, that forces 8bit BMP files to be recognized as 24bit ones (3 components per pixel).
>
> What is bothering me is that there is no way to change this flag. So, what is its purpose?
>
> Thanks in advance.
> Cyrille
> _____________________________________
> 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:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list