How to use a Custom LookupTable, vtkThresholdPoints with vtkGlyph3DMapper

Hi everyone,

I’ve got this issue working with vtkGlyph3DMapper. Basically, I’ve got a polydata populated with points of which each individual point has a value (magnitude) associated with it. This array of magnitude is added to the polydata

i.e GetPointData()->AddArray(... magnitude ..)

Next thing, I send this polydata into a vtkThresholdPoints as input data, setting its input array to process as follows

->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, magnitudeString)

where magnitudeString is the name for the array of magnitudes (vtkDoubleArray).

The intention is to be able to set a min-max range and have the threshold prune points in the polydata (its input) that fall out of range. The result of the threshold is then passed to a vtkGlyph3Dmapper with i.e a lineSource as Source connection, and then comes the custom lookup table, this lookuptable should map from the lowers magnitude to the highest present in the magnitude array. The purpose is so that the result of the threshold pruning should always match and map to the correct colours in the lookup table. That is pruned points (based on the magnitudes) should be omitted from rendering (this works thus far), the points that make it through the pruning process should map correctly to the colours in the LookupTable range (this is where my issue is).

Also, what is the difference between ScalarRange and Range with regards to vktGlyph3DMapper, I’ve not been able to fully grasp this as the docs aren’t that clear to me. Currently the custom lookup table am attaching to the vktGlyph3DMapper, has its tableRange between 0 - 10.48 but when I’m debugging I notice the vktGlyph3DMapper despite being given the custom lookup table to work with, and

SetColorModeToMapScalars is set

it tells me its range is 0-1. Could someone help me out with this? what and how is the best way to use vktGlyph3DMapper with LookupTables and ThresholdPoints? Thanks