Example a_backup/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_backup/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 20-Apr-2012 2.1k 878.exnode 20-Apr-2012 374 878_fields.exnode 20-Apr-2012 691 COPYRIGHT 19-Apr-2012 504 endoscope/ 19-Apr-2012 - endoscope_texture.rgb 20-Apr-2012 12k endoscope_texture_short.rgb 20-Apr-2012 3.0k fitted_colon5_new.exelem 20-Apr-2012 638k fitted_colon5_new.exnode 20-Apr-2012 281k load_colon.com 20-Apr-2012 8.2k ribs1.exelem 20-Apr-2012 2.8k ribs2.exelem 20-Apr-2012 8.6k test3.rgb 20-Apr-2012 199k view_colon.com 20-Apr-2012 10k xul/ 19-Apr-2012 -

Download the entire example:

Name                                          Modified     Size

examples_a_backup_endoscope_animation.tar.gz 12-Aug-2014 12M

Html last generated: Sun Mar 6 05:50:56 2016

Input last modified: Fri Apr 20 15:58:44 2012


CMISS Help / Examples / a_backup / endoscope_animation