[vtkusers] Reading 1bit volume.

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Jun 30 13:00:21 EDT 2008


On Mon, Jun 30, 2008 at 5:39 PM, Hochan Kim <hckim at andong.ac.kr> wrote:
> Hi, everybody?
>
> I am trying to read 1bit bitmap images as volume. But I think
> vtkVolume16Reader cannot read this.
>
> What can I do to read that?


Never heard of 1bits BMP before. If you are lucky and the image is not
compressed, then read it as a char array (8bits in vtkImageReader),
then pass the void pointer of the char array to the vtkBitArray.
But I do not think this will be usefull as OpenGL/VTK does not support
1bit image, so you'll have to convert (expand) your 1bits image to
8bit anyway.

HTH
-- 
Mathieu



More information about the vtkusers mailing list