Message: Re: Manipulate Single Voxel (Touchable) to have different color Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Manipulate Single Voxel (Touchable) to have different color 

Forum: Medical Applications
Re: Question Manipulate Single Voxel (Touchable) to have different color
Date: 23 Apr, 2014
From: Joseph Perl <Joseph Perl>

A solution some of us use is to modify the color during the ComputeMaterial call.

Presumably, you are calling ComputeMaterial to set the specific voxel material in your parameterization. In the same method you can reset the color attribute. pvol->GetLogicalVolume()->SetVisAttributes()

But to avoid ending up with too many vis attributes, make sure to create your vis attributes in advance and then just re-use them for all appropriately colored voxels. Otherwise, even if you have 4000 voxels that are all blue, you'll end up making 4000 separate vis attributes for blue.

 Add Message Add Message
to: "Re: Manipulate Single Voxel (Touchable) to have different color"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]