Example a/endoscope_animation: Endoscope animation

This example demonstrates the use of cmgui for building applications. The application is an endoscopy animation. It uses the mozCmgui and the XML User Interface Language (XUL) to create an application that can be served from the internet or installed directly on the users computer. Developed by ZEST

Screenshot of example a/endoscope_animation


The comfile run by this example is as follows:


open comfile $example/load_colon.com exec;

  gfx create window "Surgeon View" double_buffer;
  gfx modify window "Surgeon View" image scene default light_model default;
  gfx modify window "Surgeon View" image add_light default;
  gfx modify window "Surgeon View" layout simple ortho_axes z -y eye_spacing 0.25 width 640 height 690;
  gfx modify window "Surgeon View" set current_pane 1;
  gfx modify window "Surgeon View" background colour 0 0 0 texture none;
  gfx modify window "Surgeon View" view parallel eye_point 121.107 -695.806 -583.702 interest_point 181.544 225.795 -697.875 up_vector 0.090025 0.11663 0.989087 view_angle 34.4888 near_clipping_plane 9.30611 far_clipping_plane 3325.68 relative_viewport ndc_placement -1 1 2 2 viewport_coordinates 0 0 1 1;
  gfx modify window "Surgeon View" set transform_tool current_pane 1 std_view_angle 40 normal_lines no_antialias slow_transparency;



#Read all the other times here, we cannot use a perl for loop in zinc
for ($i=1; $i<=480;$i=$i+10) 
{
  gfx read nodes $example/endoscope/endoscope_$i.exnode.bz2 time $i
}

  gfx create window "Endoscope View" double_buffer;
  gfx modify window "Endoscope View" image scene endoscope_view_1 light_model default;
  gfx modify window "Endoscope View" image add_light default;
  gfx modify window "Endoscope View" layout simple ortho_axes z -y eye_spacing 0.25 width 600 height 600;
  gfx modify window "Endoscope View" set current_pane 1;
  gfx modify window "Endoscope View" background colour 0 0 0;
  gfx modify window "Endoscope View" view parallel eye_point 182.781 -1063.4 -785.885 interest_point 182.781 221.826 -785.885 up_vector 0 0 1 view_angle 40 near_clipping_plane 12.8522 far_clipping_plane 4592.95 relative_viewport ndc_placement -1 1 2 2 viewport_coordinates 0 0 1 1;
  gfx modify window "Endoscope View" set transform_tool current_pane 1 std_view_angle 40 normal_lines no_antialias slow_transparency;


sub move_endoscope {
  my ($position) = @_;

  my $time=-1*($position-480);
#    print( "\nsetting time to $time\n" );
  gfx timekeeper default set_time $time;


}


#
if (0)
{
#Listed here for easy double click
move_endoscope(0)
move_endoscope(300)
}













Files used by this example are:

Name                         Modified     Size

endoscope_animation.com 17-Mar-2014 2.1k 878.exnode 17-Mar-2014 374 878_fields.exnode 17-Mar-2014 691 COPYRIGHT 17-Mar-2014 504 endoscope/ 18-Mar-2014 - endoscope_texture.rgb 17-Mar-2014 12k endoscope_texture_short.rgb 17-Mar-2014 3.0k fitted_colon5_new.exelem 17-Mar-2014 638k fitted_colon5_new.exnode 17-Mar-2014 281k load_colon.com 17-Mar-2014 8.2k ribs1.exelem 17-Mar-2014 2.8k ribs2.exelem 17-Mar-2014 8.6k test3.rgb 17-Mar-2014 199k view_colon.com 17-Mar-2014 10k xul/ 18-Mar-2014 -

Download the entire example:

Name                                   Modified     Size

examples_a_endoscope_animation.tar.gz 09-Mar-2016 12M

Html last generated: Wed Mar 9 16:01:59 2016

Input last modified: Wed Mar 9 15:49:45 2016


CMISS Help / Examples / a / endoscope_animation