|Message: Re: Manipulate Single Voxel (Touchable) to have different color||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
On Wed, 23 Apr 2014 07:29:54 GMT, geant4president wrote:
> What I already tried is navigating to a voxel touchable, asking for the > logical volume and setting the VisAttributes. This does not work, > changes have no effect on the drawn geometry. I assume the reason for > this is the "ComputeMaterial" function, which - as far as I read (?) - > is called during visualisation and therefore updating the color to the > original material one.
The problem is that the parameterised volumes actually share a single logical volume. The vis attributes are a property of a logical volume. Hence all parametrised volumes have the same colour.
> As only visualization change is needed, I assume there should be a way > to manipulate the scene. The OGL interface view also has a "scene tree", > in which all the phantom voxels are clickable and color-manipulable. > Therefore it "should" be doable programmatically.
You have discovered that with the Qt viewer you can indeed change the colour (and visibility) of individual touchables. We are working on a way to capture that information. For now you would have to do it by hand. Unfortunately this doesn't seem to work on the Qt viewer. (You can change colours with the mouse on Qt but not with the commands below - don't know why; we will look into it.) So, with tests/test202, using the OGLSX viewer:
/vis/viewer/set/culling global false # Make sure you are not missing invisible layers /vis/drawTree # To see what you are doing /vis/scene/create # To prepare for a simplified picture, a close-up of one sub-detector /vis/scene/add/volume tube_phys /vis/sceneHandler/create OGLSX /vis/set/touchable expHall_P 0 tube_phys 0 divided_tube_phys 1 divided_tube_inset_phys 0 sub_divided_tube_phys 2 daughter_box_phys 0 grand_daughter_box_phys 0 /vis/touchable/set/colour green /vis/ogl/printEPS
The result is one little green box - see attachment.
Clearly this is very tedious if you have lots of touchables you want to change.
> However, if anybody has an idea (maybe even another approach) to > visualize 3D regions in the geometry without affecting geometry itself, > I would highly appreciate sharing it with me.
An alternative might be to make the voxels invisible as far as normal drawing is concerned and draw the voxels yourself in a "user vis action" - see examples/extended/visualisation/userVisAction. You would have to loop over the indices of the three dimensions and draw each voxel at the right place in your chosen colour. Mmm. Good luck.
Can't think of anything else right now. Tricky.
> Thanks in advance!
|Inline Depth:||Outline Depth:||Add message:|