0

I have several different scenes, each displaying a volume render as part of the same gui. I would like to have one interface which changes the color (ctf) of all of them simultaneously.

At first I tried syncing the mayavi.modules.volume.Volume object on each scene. That looks promising, but I couldn't extend it beyond two. Moreover, you can not add the same volume module to data on different scenes.

user3391229
  • 798
  • 9
  • 17
  • Do you really need the scenes to use the same volume objects? You could set up separate volume objects and then listen for notifications, and then change the colors for each of the different scenes. Is there some reason you haven't specified so far why you need a more complicated solution than that? – aestrivex Nov 09 '15 at 19:07
  • Pardon my wording, but in the first line of the second paragraph that's what I said I tried to do. Explicitly, I tried to setup vol= Volume() for each object. Then I tried self.sync_traits('vol',other_object). It seems to work, but only for 2 objects. I was hoping I wouldn't have to write my own system of listeners for multiple objects. – user3391229 Nov 10 '15 at 17:00
  • What happens with more than 2 objects? – aestrivex Nov 10 '15 at 19:03
  • Only the most recently synchronized object is plotted in its scene. The other scenes are empty. I'm trying to figure out what exactly on the Volume() object I should listen to.. (it isn't _ctf). Do you know? – user3391229 Nov 10 '15 at 19:23
  • No. But what you could do, is the thing you said you didn't want to do, which is to write your own listeners to explicitly listen to change events from your GUI and then apply them to each scene explicitly. – aestrivex Nov 10 '15 at 20:15
  • That's what I'm asking. What should my listeners listen to? Presumably something on the volume object. But, I can't figure out what. – user3391229 Nov 10 '15 at 21:24
  • I've started another question on that very topic: http://stackoverflow.com/questions/33642997/listen-for-ctf-otf-changes-with-traits-in-mayavi-volume-rendering – user3391229 Nov 11 '15 at 01:54

0 Answers0