Example #1
0
    def _button_make_animation_fired(self):
        view = mlab.view()
        roll = mlab.roll()

##         if self.anim_process and self.anim_process.is_alive():
##             output('terminating previous animation process...')
##             self.anim_process.terminate()
##             output('...done')

##         output('starting animation process...')
##         self.anim_process = Process(target=make_animation,
##                                     args=(self.viewer.filename,
##                                           view[:2],
##                                           roll,
##                                           Struct(**self.viewer.options)))
##         self.anim_process.daemon = True
##         self.anim_process.start()
##         output('...done')

        make_animation(self.viewer.filename,
                       view,
                       roll,
                       'avi',
                       Struct(**self.viewer.options),
                       self.viewer)
Example #2
0
 def _button_view_fired(self):
     self.scene.camera.print_traits()
     view = mlab.view()
     roll = mlab.roll()
     print 'view:', view
     print 'roll:', roll
     print 'as args: --view=%.2e,%.2e,%.2e,%.2e,%.2e,%.2e --roll=%.2e' \
           % (view[:3] + tuple(view[3]) + (roll,))
Example #3
0
    def _button_make_snapshots_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        make_animation(self.viewer.filename,
                       view,
                       roll,
                       'png',
                       Struct(**self.viewer.options),
                       self.viewer)
Example #4
0
    def _button_make_snapshots_times_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        times = nm.arange(self.set_step.seq_t0,
                          self.set_step.seq_t1 + 0.01 * self.set_step.seq_dt,
                          self.set_step.seq_dt, dtype=nm.float64)
        make_animation(self.viewer.filename,
                       view, roll, 'png',
                       Struct(**self.viewer.options), times=times,
                       reuse_viewer=self.viewer)
Example #5
0
    def _button_make_snapshots_steps_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        steps = nm.arange(self.set_step.seq_start,
                          self.set_step.seq_stop,
                          self.set_step.seq_step, dtype=nm.int32)
        make_animation(self.viewer.filename,
                       view, roll, 'png',
                       Struct(**self.viewer.options), steps=steps,
                       reuse_viewer=self.viewer)
Example #6
0
    def _button_make_animation_steps_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        steps = nm.arange(self.set_step.seq_start,
                          self.set_step.seq_stop,
                          self.set_step.seq_step, dtype=nm.int32)
        make_animation(self.viewer.filename,
                       view, roll, 'avi',
                       Struct(**self.viewer.options), steps=steps,
                       reuse_viewer=self.viewer)
Example #7
0
    def _button_make_snapshots_times_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        times = nm.arange(self.set_step.seq_t0,
                          self.set_step.seq_t1 + 0.01 * self.set_step.seq_dt,
                          self.set_step.seq_dt,
                          dtype=nm.float64)
        make_animation(self.viewer.filename,
                       view,
                       roll,
                       'png',
                       Struct(**self.viewer.options),
                       times=times,
                       reuse_viewer=self.viewer)
Example #8
0
    def _button_make_animation_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        ##         if self.anim_process and self.anim_process.is_alive():
        ##             output('terminating previous animation process...')
        ##             self.anim_process.terminate()
        ##             output('...done')

        ##         output('starting animation process...')
        ##         self.anim_process = Process(target=make_animation,
        ##                                     args=(self.viewer.filename,
        ##                                           view[:2],
        ##                                           roll,
        ##                                           Struct(**self.viewer.options)))
        ##         self.anim_process.daemon = True
        ##         self.anim_process.start()
        ##         output('...done')

        make_animation(self.viewer.filename, view, roll, 'avi',
                       Struct(**self.viewer.options), self.viewer)
Example #9
0
 def reset_view(self):
     mlab.view(*self.view)
     mlab.roll(self.roll)
     self.scene.scene.camera.zoom(1.0)
Example #10
0
 def reset_view(self):
     mlab.view(*self.view)
     mlab.roll(self.roll)
     self.scene.scene.camera.zoom(1.0)
Example #11
0
 def _button_view_fired(self):
     self.scene.camera.print_traits()
     print 'view:', mlab.view()
     print 'roll:', mlab.roll()
Example #12
0
    def _button_make_snapshots_fired(self):
        view = mlab.view()
        roll = mlab.roll()

        make_animation(self.viewer.filename, view, roll, 'png',
                       Struct(**self.viewer.options), self.viewer)
Example #13
0
 def _button_view_fired(self):
     self.scene.camera.print_traits()
     print 'view:', mlab.view()
     print 'roll:', mlab.roll()