[vtk-developers] I have problem vtkTexture.
Jin hyeok Choi
andreas.choi at googlemail.com
Wed May 23 20:40:53 EDT 2012
>
> Hi, all
>
> my code is as below,
>
> and the rgb.bmp is a color image.
>
> but the result draws only red channel,,,,
>
> somebody help me plz,,
>
>
>
> m_pvtkMapperPolydata = vtkPolyDataMapper::New();
> m_pvtkMapperPolydata->SetInput(m_pvtkFramePolydata);
>
> vtkBMPReader* pBmp = vtkBMPReader::New();
> pBmp->SetFileName("d:\\rgb.bmp");
> pBmp->Update();
>
> m_pvtkSliceImgTexture = vtkTexture::New();
> m_pvtkSliceImgTexture->SetInput(pBmp->GetOutput());
> m_pvtkSliceImgTexture->InterpolateOn();
>
> m_pvtkActorPolydata = vtkActor::New();
> m_pvtkActorPolydata->SetMapper(m_pvtkMapperPolydata);
> m_pvtkActorPolydata->SetTexture(m_pvtkSliceImgTexture);
> m_pvtkActorPolydata->GetProperty()->LightingOff();
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120524/2b4a3653/attachment.html>
More information about the vtk-developers
mailing list