Volume rendering not workign with RGBA data
Steps:
- Wavelet, Apply
- Programmabel Filter with Script:
from paraview.vtk.numpy_interface import dataset_adapter as dsa
import numpy
def make_tensor(xx,yy,zz,aa):
t = numpy.vstack([xx,yy,zz,aa]).transpose().view(dsa.VTKArray)
t.DataSet = xx.DataSet
t.Association = xx.Association
return t
xx = numpy.uint8(inputs[0].PointData["RTData"])
output.PointData.append(make_tensor(xx,xx,xx,xx), "rgba")
- Volume render the result. Color by"rgba" and uncheck "Map Scalars". You'll get teh following error:
ERROR: In /home/utkarsh/Kitware/ParaView3/ParaView/VTK/Rendering/Volume/vtkGPUVolumeRayCastMapper.cxx, line 423
vtkOpenGLGPUVolumeRayCastMapper (0x8a83ef0): If IndependentComponents is Off in the volume property, then the data must have either 2 or 4 component scalars. The input data has 1 component(s).