Is there any way to draw hundreds of balls with different colors?

Example:

modelNode.GetDisplayNode().SetActiveScalarName('Distance')
modelNode.GetDisplayNode().SetAndObserveColorNodeID('vtkMRMLFreeSurferProceduralColorNodeBlueRed')
modelNode.GetDisplayNode().ScalarVisibilityOn()
#modelNode.GetDisplayNode().AutoScalarRangeOn()
modelNode.GetDisplayNode().SetScalarRangeFlag(slicer.vtkMRMLDisplayNode.UseColorNodeScalarRange) 

See API description here: http://apidocs.slicer.org/master/classvtkMRMLModelDisplayNode.html

1 Like