0

In my application a user interacts with a 3D volumetric rendering. The data is quite noisy, but there are objects of interest buried in the noise. My users are able to get a good geometric sense of these objects by rotating and panning the scene.

Resolution is still crucial and I might be willing to trade it off for smoothness of interaction. Can I disable or at least modify this downsampling/lowering-of-resolution that accompanies scene interaction?

I've been asked to show my code.. I'll show some pieces.

class Display(HasTraits)

    def __init__(self, list_of_MySourceObjects ,  list_of_corresponding_MyScenes )
...
    def default_traits_view(self):
        traits_view=View(HGroup( *list_ofMyScenes ) ##Allows variable number of scenes in view
...
class SomeSensibleCoordinateClass(HasTraits):
    #Some logic for coordinate callbacks and manipulation
...
####Custom class that knows how to plot on scenes####
class MySourceObject(SomeSensibleCoordinateClass):
...
###I'll show a sample plotting function
def display_on_small_scene(self,scene):
        self.origin=-self.radius.__array__()*self.spacing
        print 'origin is',self.origin
        self.small_array_src=ArraySource(scene,spacing=self.spacing,origin=self.origin)
        self.scene=scene#for debug
        self.set_scene_patch()### (re)sets self.array_src data
        scene.mayavi_scene.add_child(self.array_src)
        self.volume=self.array_src.add_module(self.vol_module)
        scene.draw_axes(self.array_src.scalar_data.shape)

...

class MyScene(MlabSceneModel):
    volume=Instance(Volume,())
    some_other_custom_parameters = Any()
...
    ##Some default picking behavior
    def picker_callback(self...):
...
    ##Some default aesthetics 
    def draw_axes(self,...):
user3391229
  • 798
  • 9
  • 17

0 Answers0