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

**URL:** <https://discourse.slicer.org/t/is-there-any-way-to-draw-hundreds-of-balls-with-different-colors/572>\
**Category:** Development\
**Created:** [June 26, 2017, 9:13am UTC](https://discourse.slicer.org/t/is-there-any-way-to-draw-hundreds-of-balls-with-different-colors/572 "2017-06-26T09:13:33Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 27, 2017, 8:54pm UTC](https://discourse.slicer.org/t/is-there-any-way-to-draw-hundreds-of-balls-with-different-colors/572/7 "2017-06-27T20:54:21Z")

</div>

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](http://apidocs.slicer.org/master/classvtkMRMLModelDisplayNode.html)

---

_[View the full topic](https://discourse.slicer.org/t/is-there-any-way-to-draw-hundreds-of-balls-with-different-colors/572)._
