[vtk-developers] vtkTexture (Only red channel)
Jin hyeok Choi
andreas.choi at googlemail.com
Sun Jun 3 08:21:04 EDT 2012
Hi, all
my code is as below,
and the rgb.bmp is a color image.
but the result draws only red channel,,,, (the image is perfect but the
color is 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/20120603/90da1118/attachment.html>
More information about the vtk-developers
mailing list