[vtkusers] How To Change A 24 Bits BMP Picture To A 8 Bits ?
Cory Quammen
cquammen at cs.unc.edu
Thu Sep 13 22:11:22 EDT 2007
Hi Mark,
It sounds like you need to extract a single color channel from the
24-bit BMP image you are generating (and I presume reading into your
program to do volume rendering). If so, you should be able to use
vtkImageExtractComponents, as in:
vtkImageExtractComponents extract = vtkImageExtractComponents::New();
extract.SetComponents(0); // If you want the red channel, for instance
extract.SetInputConnection(bmp24.GetOutputPort());
...
Hope this helps,
Cory
On 9/13/07, JohnMark <zhaojunxp at hotmail.com> wrote:
>
> Hi , vtkusers ,
>
> with the help of classes vtkStructuredPoints and vtkBMPWriter , I change
> the DICOM pictures to BMP
> pictures successfully . however , I found the BMP pictures' format was wrong
> when I decided to use them
> to reconsturct ( i.e. , volume rendering ) . it asked for 8 bits' BMP
> pictures , not 24 bits . So , I
> want to know whether there is a class changing 24 bits BMP picture to 8 bits
> ?
>
> and I find there is not a function to do so in vtkStructuredPoints .
>
> thanks a lot !
> Mark
>
>
>
> ________________________________
> 不登录就能管理多个邮件帐户,试试 Windows Live Mail。 立即尝试!
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
Cory Quammen
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen
More information about the vtkusers
mailing list