I would like to render scalar data on a structured grid that pass a certain threshold (for example, see below)
I have tried with vtk. See the following snippet below for my code
grid.SetPoints(points)
grid.SetDimensions(nx,ny,nz)
grid.GetPointData().SetScalars(scalars)
threshold = vtk.vtkThresholdPoints()
threshold.SetInputData(grid)
threshold.ThresholdByUpper(0.5)
mapper = vtk.vtkDataSetMapper()
mapper.SetInputConnection(threshold.GetOutputPort())
actor = vtk.vtkActor()
actor.SetMapper(mapper)
renderer.AddActor(actor)
interactor.Start()
I.e. I have a structured grid with points and scalars set. I then build a threshold mapper and actor. The threshold looks like its working insofar as the correct subset is being singled out. But instead of an array of cubes it generates an array of dots (see below).
My question: How can I replace these dots with cubes as they are shown in the first figure

