[vtkusers] how to change vtkImageBlend opacity
Muhammad Jawad
softplanner at gmail.com
Mon Mar 7 06:05:13 EST 2016
Dear Vtk users,
I am using vtkimageblend class for multiple volumes and want to change
opacity of volumes. Here I put the small code for single volume for
simplicity.
ImageViewer is working fine but opacity is not working.
Any body have an idea that what I'm doing wrong here ?
vtkSmartPointer<vtkImageBlend> blend = vtkSmartPointer<vtkImageBlend>::New();
blend->SetInputData(0, reader->GetOutput());
blend->SetOpacity(0, 0.3);
vtkSmartPointer<vtkImageViewer2> imgViewer =
vtkSmartPointer<vtkImageViewer2>::New();
imgViewer->SetInputData(blend->GetOutput());
imgViewer->UpdateDisplayExtent();
--
Regards,
Muhammad Jawad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160307/cdbe623d/attachment.html>
More information about the vtkusers
mailing list