Hi,
I would like to open a vti image and show it according to SimpleRayCast C++ example.
At first, I successfully ran SimpleRayCast.
I tried to open a vti file instead. The size [-0.003;+0.003[, [-0.003;+0.003[, [0;+0.010[ and the absolute value [0;5600[.
I replaced:
- the reader from
vtkStructuredPointsReader
byvtkXMLImageDataReader
. I applied avtkImageMathematics.SetOperationToAbsoluteValue
to keep only absolute value. - The opacity is 0 at 0 and 1 at 5618.
- The color is blue at 0 and red at 5618.
- I set SetScalarOpacityUnitDistance to 0.0003
- I tried mapper
vtkFixedPointVolumeRayCastMapper
,vtkGPUVolumeRayCastMapper
andvtkSmartVolumeMapper
without success. I had to setvolumeMapper->SetSampleDistance(0.0001)
to see something withvtkFixedPointVolumeRayCastMapper
Instead of transparency, I have black pixels.
I read lots of message about opacity problem in the forum. I tried to enable depth peeling in renderer, alpha bit planes in window renderer without success.
I’m under Windows with vtk 9.2.0 built with vcpkg.
Please find enclosed the vti file and the C++ source.
main.cpp (3.7 KB)
Do I missed some thing ? With Paraview, I can easily use opacity and colormap like I want.
What I have: You can see that I only see pixels at the edges.
What I want:
Thanks, Best regards,