Volume mapper: Cell Scalars not supported error

Hello, I am trying to render a volume from a vti file. The data should be a scalar field in 3D. I want regions of high value to be colored and opaque and regions of low value to be white and transparent. The first few lines of the vti file look like:

?xml version=“1.0”?

VTKFile type=“ImageData” version=“0.1” byte_order=“LittleEndian” header_type=“UInt32” compressor=“vtkZLibDataCompressor”

ImageData WholeExtent=“0 320 0 240 0 240” Origin=“709.8500000000047 -60.199999999999996 -60.199999999999996” Spacing=“0.2500000000001137 0.5 0.5” Direction=“1 0 0 0 1 0 0 0 1”

Piece Extent="0 320 0 240 0 240"                                                 >
    DataArray type="Float32" Name="Derived_Number_Density_subset_sub_res_low_electron_Reduced_sub_res_low" format="appended" RangeMin="0"                    RangeMax="1.8604969978"         offset="0"                   /

AppendedData encoding=“base64”

and my script is

def main():
fileName = ‘ne_3D.vti’ #get_program_parameters()

colors = vtkNamedColors()

# This is a simple volume rendering example that
# uses a vtkFixedPointVolumeRayCastMapper

# Create the standard renderer, render window
# and interactor.
ren1 = vtkRenderer()

renWin = vtkRenderWindow()

iren = vtkRenderWindowInteractor()

# Create the reader for the data.
reader = vtkXMLImageDataReader()

# Create transfer mapping scalar value to opacity.
opacityTransferFunction = vtkPiecewiseFunction()
opacityTransferFunction.AddPoint(0, 0.0) # lowest input value -> 0 opacity
opacityTransferFunction.AddPoint(255, 0.5) # highest input value -> 0.5 opacity

# Create transfer mapping scalar value to color.
colorTransferFunction = vtkColorTransferFunction()
colorTransferFunction.AddHSVPoint(0.0, 2/3, 0.0, 1.0) # lowest input value -> white
colorTransferFunction.AddHSVPoint(255.0, 2/3, 1.0, 1.0) # highest input value -> blue

# The property describes how the data will look.
volumeProperty = vtkVolumeProperty()

# The mapper / ray cast function know how to render the data.
volumeMapper = vtkFixedPointVolumeRayCastMapper()

# The volume holds the mapper and the property and
# can be used to position/orient the volume.
volume = vtkVolume()


renWin.SetSize(600, 600)


When I run this script I get the error “ERR| vtkFixedPointVolumeRayCastMapper (0x7f2054052010): Cell Scalars not supported”. At the moment I am just copying and pasting from the examples with really understanding much and hoping that something will work by chance! I would like to understand what is the problem to fix it and improve my use of vtk. I am also confused with the many different filetypes (.vtk, .vti, etc.), the appropriate readers for each type and how to choose the correct objects and processes (mappers etc.) for what you want to do. Any advice would be very much appreciated.

Thank you very much!
A vtk newbie

Change the vtkFixedPointVolumeRayCastMapper to vtkGPUVolumeRayCastMapper. Most advanced volume rendering features are supported by this hardware accelerated mapper.