From: donadio Date: Thu, 28 May 2009 16:39:45 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~70 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5bdd0c13157e0b246fa5f391dd181b2012357c31;p=creaMaracasVisu.git *** empty log message *** --- diff --git a/lib/doxygen/bouml/manualContour/129177.diagram b/lib/doxygen/bouml/manualContour/129177.diagram new file mode 100644 index 0000000..f273a12 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/129177.diagram @@ -0,0 +1,36 @@ +format 66 + +classcanvas 128025 class_ref 129945 // manualContourModel + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 61 330 2000 +end +classcanvas 128153 class_ref 131353 // manualViewBaseContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 255 107 2008 +end +classcanvas 129177 class_ref 129689 // manualContourBaseControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 406 329 2000 +end +note 130201 "MODEL" + xyzwh 60 294 2000 65 36 +note 130329 "VIEW" + xyzwh 254 72 2013 59 35 +note 130457 "CONTROLLER" + xyzwh 489 294 2005 88 35 +relationcanvas 129689 relation_ref 133401 // + from ref 129177 z 2001 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129817 relation_ref 133529 // + from ref 129177 z 2009 to ref 128153 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129945 relation_ref 133657 // + from ref 128153 z 2009 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +end diff --git a/lib/doxygen/bouml/manualContour/129305.diagram b/lib/doxygen/bouml/manualContour/129305.diagram new file mode 100644 index 0000000..6eeaad1 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/129305.diagram @@ -0,0 +1,80 @@ +format 66 + +classcanvas 128025 class_ref 129945 // manualContourModel + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color magenta + xyz 236 221 2000 +end +classcanvas 128153 class_ref 130073 // manualContourModelBullEye + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 405 594 2005 +end +classcanvas 128281 class_ref 130201 // manualContourModelBullEyeSector + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 431 444 2000 +end +classcanvas 128409 class_ref 130329 // manualContourModelCircle + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 104 647 2000 +end +classcanvas 128537 class_ref 130457 // manualContourModelLine + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 38 517 2000 +end +classcanvas 128665 class_ref 130585 // manualContourModelRoi + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 39 358 2000 +end +classcanvas 128793 class_ref 132377 // manualPoint + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 469 221 2000 +end +classcanvas 129945 class_ref 133145 // vtkKochanekSpline + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color darkblue + xyz 32 49 2000 +end +relationcanvas 128921 relation_ref 132505 // + from ref 128665 z 2001 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129049 relation_ref 132633 // + from ref 128537 z 2001 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129177 relation_ref 132761 // + from ref 128409 z 2001 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129305 relation_ref 132889 // + from ref 128153 z 2006 to ref 128281 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129433 relation_ref 133017 // + from ref 128153 z 2006 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129689 relation_ref 133145 // + from ref 128281 z 2001 to ref 128025 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129817 relation_ref 133273 // + from ref 128025 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130073 relation_ref 134297 // + from ref 128025 z 2001 to ref 129945 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +end diff --git a/lib/doxygen/bouml/manualContour/129433.diagram b/lib/doxygen/bouml/manualContour/129433.diagram new file mode 100644 index 0000000..3cc2933 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/129433.diagram @@ -0,0 +1,170 @@ +format 66 + +classcanvas 128025 class_ref 131097 // manualView3DContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 443 555 2000 +end +classcanvas 128153 class_ref 131225 // manualView3VContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 480 419 2000 +end +classcanvas 128281 class_ref 131353 // manualViewBaseContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 66 330 2000 +end +classcanvas 128409 class_ref 131481 // manualViewBullEye + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 323 767 2000 +end +classcanvas 128537 class_ref 131609 // manualViewBullEyeSector + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 328 657 2000 +end +classcanvas 128665 class_ref 131737 // manualViewCircle + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 51 630 2000 +end +classcanvas 128793 class_ref 131865 // manualViewContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color magenta + xyz 318 309 2000 +end +classcanvas 128921 class_ref 131993 // manualViewLine + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 54 500 2000 +end +classcanvas 129049 class_ref 132121 // manualViewPoint + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 87 171 2000 +end +classcanvas 129177 class_ref 132249 // manualViewRoi + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 132 770 2000 +end +classcanvas 129305 class_ref 129945 // manualContourModel + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 274 81 2000 +end +note 131097 "See the Model Diagram for more information" + xyzwh 271 27 2000 131 48 +classcanvas 132505 class_ref 130073 // manualContourModelBullEye + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 523 733 2000 +end +note 132633 "See the Model Diagram for more information" + xyzwh 559.5 685 2000 131 48 +classcanvas 132889 class_ref 132505 // wxVTKRenderWindowInteractor + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color mediumyellow + xyz 462 126 2000 +end +classcanvas 133017 class_ref 133017 // wxVtkBaseView + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color mediumyellow + xyz 532 184 2000 +end +classcanvas 133145 class_ref 132633 // vtkPolyData + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color darkblue + xyz 553 240 2000 +end +classcanvas 133273 class_ref 132761 // vtkActor + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color darkblue + xyz 566 296 2000 +end +classcanvas 133401 class_ref 132889 // vtkPolyDataMapper + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color darkblue + xyz 532 355 2000 +end +relationcanvas 129433 relation_ref 129177 // + from ref 128921 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129689 relation_ref 129433 // + from ref 129177 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129945 relation_ref 129689 // + from ref 128537 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130201 relation_ref 129817 // + from ref 128153 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130329 relation_ref 129945 // + decenter_end 615 + from ref 128025 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130457 relation_ref 130073 // + from ref 128793 z 2001 to ref 128281 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130585 relation_ref 130201 // + from ref 128281 z 2001 to ref 129049 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130713 relation_ref 130329 // + from ref 128281 z 2001 to ref 129305 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130969 relation_ref 129305 // + from ref 128665 z 2001 to ref 128793 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 132249 relation_ref 133913 // + from ref 128409 z 2001 to ref 129177 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 132377 relation_ref 134041 // + from ref 128409 z 2001 to ref 128537 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 132761 relation_ref 134169 // + from ref 128409 z 2001 to ref 132505 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 133529 relation_ref 134553 // + from ref 128793 z 2001 to ref 132889 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 133785 relation_ref 134809 // + from ref 128793 z 2001 to ref 133145 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 133913 relation_ref 134937 // + from ref 128793 z 2001 to ref 133273 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 134041 relation_ref 135065 // + from ref 128793 z 2001 to ref 133017 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 134169 relation_ref 135193 // + from ref 128793 z 2001 to ref 133401 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +end diff --git a/lib/doxygen/bouml/manualContour/129561.diagram b/lib/doxygen/bouml/manualContour/129561.diagram new file mode 100644 index 0000000..d170ba7 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/129561.diagram @@ -0,0 +1,146 @@ +format 66 + +classcanvas 128025 class_ref 129177 // manualCircleControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 64 643 2000 +end +classcanvas 128153 class_ref 129305 // manualContour3DControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 477 471 2000 +end +classcanvas 128281 class_ref 129433 // manualContour3V3DControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 407 612 2000 +end +classcanvas 128409 class_ref 129561 // manualContour3VControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 291 721 2000 +end +classcanvas 128537 class_ref 129689 // manualContourBaseControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 35 282 2005 +end +classcanvas 128665 class_ref 129817 // manualContourControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color magenta + xyz 282 333 2000 +end +classcanvas 128793 class_ref 130713 // manualLineControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 31 560 2000 +end +classcanvas 128921 class_ref 130841 // manualContourPerpPlaneControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 68 817 2000 +end +classcanvas 129049 class_ref 130969 // manualRoiControler + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color lightmediumgreen + xyz 29 457 2000 +end +classcanvas 129177 class_ref 129945 // manualContourModel + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 58 143 2005 +end +classcanvas 129305 class_ref 131353 // manualViewBaseContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 260 142 2000 +end +classcanvas 129561 class_ref 131097 // manualView3DContour + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + xyz 487 145 2000 +end +note 132377 "See the Model Diagram for more information" + xyzwh 55.5 92 2000 131 48 +note 132505 "See the View Diagram for more information" + xyzwh 265.5 90 2000 131 48 +note 132633 "See the View Diagram for more information" + xyzwh 488.5 93 2000 131 48 +classcanvas 132761 class_ref 132505 // wxVTKRenderWindowInteractor + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + color mediumyellow + xyz 604 253 2000 +end +relationcanvas 129817 relation_ref 130457 // + from ref 129049 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 129945 relation_ref 130585 // + from ref 128793 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130073 relation_ref 130713 // + from ref 128025 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130201 relation_ref 130841 // + from ref 128921 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130329 relation_ref 130969 // + from ref 128409 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130457 relation_ref 131097 // + from ref 128153 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130585 relation_ref 131225 // + from ref 128281 z 2001 to ref 128665 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130713 relation_ref 131353 // + from ref 128665 z 2006 to ref 128537 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 130841 relation_ref 131481 // + from ref 128537 z 2006 to ref 129177 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 131353 relation_ref 131737 // + from ref 128537 z 2006 to ref 129305 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 131609 relation_ref 131993 // + from ref 129305 z 2006 to ref 129177 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 131737 relation_ref 132121 // + from ref 128281 z 2001 to ref 128153 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 131865 relation_ref 132249 // + from ref 128281 z 2001 to ref 128409 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 131993 relation_ref 132377 // + from ref 128153 z 2001 to ref 129561 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 132249 relation_ref 133785 // + from ref 128921 z 2001 to ref 128409 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 133017 relation_ref 134425 // + from ref 128665 z 2001 to ref 132761 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +end diff --git a/lib/doxygen/bouml/manualContour/25.session b/lib/doxygen/bouml/manualContour/25.session new file mode 100644 index 0000000..b1acf35 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/25.session @@ -0,0 +1,8 @@ +window_sizes 1280 1004 600 1800 682 82 +show_stereotypes +selected classview_ref 129177 // manualContour +open + classview_ref 129305 // maracasVisu + classview_ref 129433 // vtk +end +end diff --git a/lib/doxygen/bouml/manualContour/cpp_includes b/lib/doxygen/bouml/manualContour/cpp_includes new file mode 100644 index 0000000..531b86f --- /dev/null +++ b/lib/doxygen/bouml/manualContour/cpp_includes @@ -0,0 +1,13 @@ +// "a type" "needed cpp_includes" +"vector" "#include +using namespace std;" + +"list" "#include +using namespace std;" + +"map" "#include +using namespace std;" + +"string" "#include +using namespace std;" + diff --git a/lib/doxygen/bouml/manualContour/generation_settings b/lib/doxygen/bouml/manualContour/generation_settings new file mode 100644 index 0000000..1f32568 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/generation_settings @@ -0,0 +1,309 @@ + + + cpp_h_extension "h" cpp_src_extension "cpp" java_extension "java" php_extension "php" python_extension "py" idl_extension "idl" + + type_forms 15 // uml cpp java idl cpp_in cpp_out cpp_inout cpp_return + "void" "void" "void" "void" "${type}" "${type} &" "${type}" "${type}" + "any" "void *" "Object" "any" "const ${type}" "${type}" "${type} &" "${type}" + "bool" "bool" "boolean" "boolean" "${type}" "${type} &" "${type} &" "${type}" + "char" "char" "char" "char" "${type}" "${type} &" "${type} &" "${type}" + "uchar" "unsigned char" "char" "octet" "${type}" "${type} &" "${type} &" "${type}" + "byte" "unsigned char" "byte" "octet" "${type}" "${type} &" "${type} &" "${type}" + "short" "short" "short" "short" "${type}" "${type} &" "${type} &" "${type}" + "ushort" "unsigned short" "short" "unsigned short" "${type}" "${type} &" "${type} &" "${type}" + "int" "int" "int" "long" "${type}" "${type} &" "${type} &" "${type}" + "uint" "unsigned int" "int" "unsigned long" "${type}" "${type} &" "${type} &" "${type}" + "long" "long" "long" "long" "${type}" "${type} &" "${type} &" "${type}" + "ulong" "unsigned long" "long" "unsigned long" "${type}" "${type} &" "${type} &" "${type}" + "float" "float" "float" "float" "${type}" "${type} &" "${type} &" "${type}" + "double" "double" "double" "double" "${type}" "${type} &" "${type} &" "${type}" + "string" "string" "String" "string" "${type}" "${type} &" "${type} &" "${type}" + + relations_stereotypes 5 // uml cpp java pythonidl + "sequence" "vector" "Vector" "list" "sequence" + "vector" "vector" "Vector" "list" "sequence" + "list" "list" "List" "list" "sequence" + "set" "set" "Set" "set" "sequence" + "map" "map" "Map" "dict" "sequence" + + classes_stereotypes 14 // uml cpp java php python idl + "class" "class" "class" "class" "class" "valuetype" + "interface" "class" "interface" "interface" "class" "interface" + "exception" "class" "class" "class" "class" "exception" + "enum" "enum" "enum" "enum" "enum" "enum" + "enum_pattern" "enum" "enum_pattern" "enum" "enum" "enum" + "struct" "struct" "class" "class" "class" "struct" + "union" "union" "class" "class" "class" "union" + "typedef" "typedef" "ignored" "ignored" "ignored" "typedef" + "boundary" "class" "class" "class" "class" "interface" + "control" "class" "class" "class" "class" "valuetype" + "entity" "class" "class" "class" "class" "valuetype" + "actor" "ignored" "ignored" "ignored" "ignored" "ignored" + "@interface" "ignored" "@interface" "ignored" "ignored" "ignored" + "stereotype" "ignored" "ignored" "ignored" "ignored" "ignored" + + cpp_enum_default_type_forms "${type}" "${type} &" "${type} &" "${type}" // in out inout return + other_cpp_types_default_type_forms "const ${type} &" "${type} &" "${type} &" "${type}" // in out inout return + + cpp_default_h_content "#ifndef ${NAMESPACE}_${NAME}_H +#define ${NAMESPACE}_${NAME}_H + +${comment} +${includes} +${declarations} +${namespace_start} +${definition} +${namespace_end} +#endif +" + cpp_default_src_content "${comment} +${includes} +${namespace_start} +${members} +${namespace_end}" + cpp_default_class_decl "${comment}${template}class ${name}${inherit} { +${members}}; +${inlines} +" + cpp_default_external_class_decl "${name} +#include <${name}.h> +" + cpp_default_struct_decl "${comment}${template}struct ${name}${inherit} { +${members}}; +${inlines} +" + cpp_default_union_decl "${comment}${template}union ${name} { +${members}}; +${inlines} +" + cpp_default_enum_decl "${comment}enum ${name} { +${items} +}; +" + cpp_default_typedef_decl "${comment}typedef ${type} ${name}; +" + cpp_default_attribute_declaration " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value}; +" // multiplicity [..] + cpp_default_enum_item_declaration " ${name}${value},${comment}" + cpp_association_aggregation_declaration + " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value}; +" // multiplicity 1 + " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type} *> ${name}${value}; +" // multiplicity * a..b + " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${multiplicity}${value}; +" // multiplicity [..] + cpp_aggregation_by_value_declaration + " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${static}${mutable}${volatile}${const}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${static}${mutable}${volatile}${const}${type} ${name}${multiplicity}${value}; +" // multiplicity [..] + cpp_get "get_${name}" inline const value_const public + cpp_set "set_${name}" public + cpp_default_operation_declaration " ${comment}${friend}${static}${inline}${virtual}${type} ${name}${(}${)}${const}${volatile}${throw}${abstract}; +" + cpp_default_operation_definition "${comment}${inline}${type} ${class}::${name}${(}${)}${const}${volatile}${throw}${staticnl}{ + ${body}} +" + java_default_src_content "${comment} +${package} +${imports} +${definition}" + java_default_class_decl "${comment}${@}${visibility}${final}${abstract}class ${name}${extends}${implements} { +${members}} +" + java_default_external_class_decl "${name}" + java_default_interface_decl "${comment}${@}${visibility}interface ${name}${extends} { +${members}} +" + java5_default_enum_decl "${comment}${@}${visibility}${final}${abstract}enum ${name}${implements} { +${items}; +${members}} +" + java_default_enum_decl "${comment}${@}${visibility}final class ${name} { +${members} + private final int value; + + public int value() { + return value; + } + + public static ${name} fromInt(int value) { + switch (value) { +${cases} default: throw new Error(); + } + + } + private ${name}(int v) { value = v; }; +} +" + java_default_attribute_declaration " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value}; +" // multiplicity N + java5_default_enum_item_declaration " ${@}${name}${value},${comment}" + java_default_enum_item_declaration " ${comment}${@}public static final int _${name}${value}; +public static final ${class} ${name} = new ${class}(_${name}); +" + java_default_enum_case " case _${name}: return ${name}; +" + java_association_aggregation_declaration + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type} ${name}${value}; +" // multiplicity 1 + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}${@}${visibility}${static}${final}${transient}${volatile}${type}${multiplicity} ${name}${value}; +" // multiplicity N + java_get "get${Name}" final public + java_set "set${Name}" public + java_default_operation_definition " ${comment}${@}${visibility}${final}${static}${abstract}${synchronized}${type} ${name}${(}${)}${throws}${staticnl}{ + ${body}} +" + php_default_src_content " +" + php_default_class_decl "${comment}${final}${visibility}${abstract}class ${name}${extends}${implements} { +${members}} +" + php_default_enum_decl "${comment}${visibility}final class ${name} { +${items}} +" + php_default_external_class_decl "${name}" + php_default_interface_decl "${comment}${visibility}interface ${name} { +${members}} +" + php_default_attribute_declaration " ${comment}${visibility}${const}${static}${var}${name}${value}; +" + php_default_enum_item_decl " const ${name}${value};${comment} +" + php_default_relation_declaration" ${comment}${visibility}${const}${static}${var}${name}${value}; +" + php_get "get${Name}" final + php_set "set${Name}" + php_default_operation_definition " ${comment}${final}${visibility}${abstract}${static}function ${name}${(}${)} +{ + ${body}} +" + python_2_2 + python_indent_step " " + python_default_src_content "${comment} +${import} +${definition}" + python_default_class_decl "class ${name}${inherit}: +${docstring}${members} +" + python_default_enum_decl "class ${name}: +${docstring}${members} +" + python_default_external_class_decl "${name}" + python_default_attribute_declaration "${comment}${self}${name} = ${value} +" // multiplicity 1 + "${comment}${self}${name} = ${stereotype}() +" // multiplicity != 1 + python_default_enum_item_decl "${comment}${self}${name} = ${value} +" + python_default_relation_declaration"${comment}${self}${name} = ${value} +" // multiplicity 1 + "${comment}${self}${name} = ${stereotype}() +" // multiplicity != 1 + python_default_composition_declaration"${comment}${self}${name} = ${type}() +" // multiplicity 1 + "${comment}${self}${name} = ${stereotype}() +" // multiplicity != 1 + python_default_operation_definition "${@}${static}${abstract}def ${name}${(}${)}: +${docstring}${body} +" + python_default_initoperation_definition "${@}${static}${abstract}def ${name}${(}${p0}${v0}${)}: +${docstring}super(${class}, ${p0}).__init__() +${body} +" + python_get "get${Name}" + python_set "set${Name}" + idl_default_src_content "#ifndef ${MODULE}_${NAME}_H +#define ${MODULE}_${NAME}_H + +${comment} +${includes} +${module_start} +${definition} +${module_end} +#endif +" + idl_default_interface_decl "${comment}${abstract}${local}interface ${name}${inherit} { +${members}}; +" + idl_default_valuetype_decl "${comment}${abstract}${custom}valuetype ${name}${inherit} { +${members}}; +" + idl_default_struct_decl "${comment}struct ${name} { +${members}}; +" + idl_default_typedef_decl "${comment}typedef ${type} ${name}; +" + idl_default_exception_decl "${comment}exception ${name} { +${members}}; +" + idl_default_union_decl "${comment}union ${name} switch(${switch}) { +${members}}; +" + idl_default_enum_decl "${comment}enum ${name} { +${items}}; +" + idl_default_external_class_decl "${name} +#include \"${name}.idl\" +" + idl_default_attribute_declaration " ${comment}${readonly}${attribute}${type} ${name}; +" // multiplicity 1 + " ${comment}${readonly}${attribute}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_default_valuetype_attribute_declaration " ${comment}${visibility}${type} ${name}; +" // multiplicity 1 + " ${comment}${visibility}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_default_const_declaration " ${comment}const ${type} ${name}${value}; +" // multiplicity 1 + " ${comment}const ${stereotype}<${type}> ${name}${value}; +" // multiplicity * a..b + " ${comment}const ${stereotype}<${type},${multiplicity}> ${name}${value}; +" // multiplicity N + idl_default_enum_item_declaration " ${name},${comment}" + idl_default_union_item_declaration " ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1 + " ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b + " ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N + idl_association_aggregation_declaration + " ${comment}${readonly}${attribute}${type} ${name}; +" // multiplicity 1 + " ${comment}${readonly}${attribute}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${readonly}${attribute}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_valuetype_association_aggregation_declaration + " ${comment}${visibility}${type} ${name}; +" // multiplicity 1 + " ${comment}${visibility}${stereotype}<${type}> ${name}; +" // multiplicity * a..b + " ${comment}${visibility}${stereotype}<${type},${multiplicity}> ${name}; +" // multiplicity N + idl_union_association_aggregation_declaration + " ${comment}case ${case} : ${readonly}${type} ${name};" // multiplicity 1 + " ${comment}case ${case} : ${readonly}${stereotype}<${type}> ${name};" // multiplicity * a..b + " ${comment}case ${case} : ${readonly}${stereotype}<${type},${multiplicity}> ${name};" // multiplicity N + idl_get "get_${name}" + idl_set "set_${name}" twoways + idl_default_operation_declaration " ${comment}${oneway}${type} ${name}${(}${)}${raisesnl}${raises}; +" + uml_get_name uml uml_set_name uml +end diff --git a/lib/doxygen/bouml/manualContour/idl_includes b/lib/doxygen/bouml/manualContour/idl_includes new file mode 100644 index 0000000..fceab64 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/idl_includes @@ -0,0 +1 @@ +// "a type" "needed idl_includes" diff --git a/lib/doxygen/bouml/manualContour/java_imports b/lib/doxygen/bouml/manualContour/java_imports new file mode 100644 index 0000000..bbd370a --- /dev/null +++ b/lib/doxygen/bouml/manualContour/java_imports @@ -0,0 +1 @@ +// "a type" "needed java_imports" diff --git a/lib/doxygen/bouml/manualContour/manualContour.prj b/lib/doxygen/bouml/manualContour/manualContour.prj new file mode 100644 index 0000000..af5fac4 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/manualContour.prj @@ -0,0 +1,766 @@ +format 66 +"manualContour" + revision 2 + modified_by 25 "donadio" + + + + // class settings + default_attribute_visibility private default_relation_visibility private default_operation_visibility public + //class diagram settings + draw_all_relations yes hide_attributes no hide_operations no show_members_full_definition no show_members_visibility no show_members_stereotype no show_members_multiplicity no show_members_initialization no show_attribute_modifiers no member_max_width 127 show_parameter_dir yes show_parameter_name yes package_name_in_tab no class_drawing_mode natural drawing_language uml show_context_mode no auto_label_position yes show_relation_modifiers no show_infonote no shadow yes show_stereotype_properties no + //use case diagram settings + package_name_in_tab no show_context no auto_label_position yes draw_all_relations yes class_drawing_mode actor shadow yes show_stereotype_properties no + //sequence diagram settings + show_full_operations_definition no write_horizontally yes class_drawing_mode natural drawing_language uml draw_all_relations yes shadow yes show_stereotype_properties no + //collaboration diagram settings + show_full_operations_definition no show_hierarchical_rank no write_horizontally yes drawing_language uml package_name_in_tab no show_context no draw_all_relations yes shadow yes show_stereotype_properties no + //object diagram settings + write_horizontally yes package_name_in_tab no show_context no auto_label_position yes draw_all_relations yes shadow yes show_stereotype_properties no + //component diagram settings + package_name_in_tab no show_context no auto_label_position yes draw_all_relations yes shadow yes + draw_component_as_icon no show_component_req_prov no show_component_rea no show_stereotype_properties no + //deployment diagram settings + package_name_in_tab no show_context no write_horizontally yes auto_label_position yes draw_all_relations yes shadow yes + draw_component_as_icon no show_component_req_prov no show_component_rea no show_stereotype_properties no + //state diagram settings + package_name_in_tab no show_context no auto_label_position yes write_trans_label_horizontally yes show_trans_definition no draw_all_relations yes shadow yes + show_activities yes region_horizontally yes drawing_language uml show_stereotype_properties no + //activity diagram settings + package_name_in_tab no show_context no show_opaque_action_definition no auto_label_position yes write_flow_label_horizontally no draw_all_relations yes shadow yes + show_infonote yes drawing_language uml show_stereotype_properties no + + class_color yellow duration_color transparent continuation_color gray note_color blue fragment_color transparent subject_color transparent usecase_color yellow package_color transparent component_color green artifact_color green deploymentnode_color gray state_color yellow stateaction_color transparent activity_color transparent activityregion_color transparent activitypartition_color transparent activityaction_color transparent parameterpin_color white + font_size 8 + diagram_format A4 + + mark_for_import + + classview 129177 "manualContour" + //class diagram settings + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default show_stereotype_properties default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default show_stereotype_properties default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default show_stereotype_properties default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default show_stereotype_properties default + //class settings + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default show_stereotype_properties default + classdiagram 129177 "MVC" + draw_all_relations no hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + size A4 + end + + classdiagram 129305 "model" + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + size A4 + end + + classdiagram 129433 "view" + draw_all_relations no hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + size A4 + end + + classdiagram 129561 "controller" + draw_all_relations no hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + size A4 + end + + class 129177 "manualCircleControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130713 // + relation 130713 ---|> + a public + classrelation_ref 130713 // + b parent class_ref 129817 // manualContourControler + end + end + + class 129305 "manualContour3DControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 131097 // + relation 131097 ---|> + a public + classrelation_ref 131097 // + b parent class_ref 129817 // manualContourControler + end + + classrelation 132377 // + relation 132377 -_-> + a default + classrelation_ref 132377 // + b parent class_ref 131097 // manualView3DContour + end + end + + class 129433 "manualContour3V3DControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 131225 // + relation 131225 ---|> + a public + classrelation_ref 131225 // + b parent class_ref 129817 // manualContourControler + end + + classrelation 132121 // + relation 132121 -_-> + a default + classrelation_ref 132121 // + b parent class_ref 129305 // manualContour3DControler + end + + classrelation 132249 // + relation 132249 -_-> + a default + classrelation_ref 132249 // + b parent class_ref 129561 // manualContour3VControler + end + end + + class 129561 "manualContour3VControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130969 // + relation 130969 ---|> + a public + classrelation_ref 130969 // + b parent class_ref 129817 // manualContourControler + end + end + + class 129689 "manualContourBaseControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 131481 // + relation 131481 ---> + a role_name "" private + classrelation_ref 131481 // + b parent class_ref 129945 // manualContourModel + end + + classrelation 131737 // + relation 131737 ---> + a role_name "" private + classrelation_ref 131737 // + b parent class_ref 131353 // manualViewBaseContour + end + + classrelation 133401 // + relation 133401 ---> + a role_name "" private + classrelation_ref 133401 // + b parent class_ref 129945 // manualContourModel + end + + classrelation 133529 // + relation 133529 ---> + a role_name "" private + classrelation_ref 133529 // + b parent class_ref 131353 // manualViewBaseContour + end + end + + class 129817 "manualContourControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 131353 // + relation 131353 ---|> + a public + classrelation_ref 131353 // + b parent class_ref 129689 // manualContourBaseControler + end + + classrelation 134425 // + relation 134425 -_-> + a default + classrelation_ref 134425 // + b parent class_ref 132505 // wxVTKRenderWindowInteractor + end + end + + class 129945 "manualContourModel" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 133273 // + relation 133273 ---> + a role_name "" private + classrelation_ref 133273 // + b parent class_ref 132377 // manualPoint + end + + classrelation 134297 // + relation 134297 ---> + a role_name "" private + classrelation_ref 134297 // + b parent class_ref 133145 // vtkKochanekSpline + end + end + + class 130073 "manualContourModelBullEye" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 132889 // + relation 132889 -_-> + a default + classrelation_ref 132889 // + b parent class_ref 130201 // manualContourModelBullEyeSector + end + + classrelation 133017 // + relation 133017 ---|> + a public + classrelation_ref 133017 // + b parent class_ref 129945 // manualContourModel + end + end + + class 130201 "manualContourModelBullEyeSector" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 133145 // + relation 133145 ---|> + a public + classrelation_ref 133145 // + b parent class_ref 129945 // manualContourModel + end + end + + class 130329 "manualContourModelCircle" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 132761 // + relation 132761 ---|> + a public + classrelation_ref 132761 // + b parent class_ref 129945 // manualContourModel + end + end + + class 130457 "manualContourModelLine" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 132633 // + relation 132633 ---|> + a public + classrelation_ref 132633 // + b parent class_ref 129945 // manualContourModel + end + end + + class 130585 "manualContourModelRoi" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 132505 // + relation 132505 ---|> + a public + classrelation_ref 132505 // + b parent class_ref 129945 // manualContourModel + end + end + + class 130713 "manualLineControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130585 // + relation 130585 ---|> + a public + classrelation_ref 130585 // + b parent class_ref 129817 // manualContourControler + end + end + + class 130841 "manualContourPerpPlaneControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130841 // + relation 130841 ---|> + a public + classrelation_ref 130841 // + b parent class_ref 129817 // manualContourControler + end + + classrelation 133785 // + relation 133785 ---> + a role_name "" private + classrelation_ref 133785 // + b parent class_ref 129561 // manualContour3VControler + end + end + + class 130969 "manualRoiControler" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130457 // + relation 130457 ---|> + a public + classrelation_ref 130457 // + b parent class_ref 129817 // manualContourControler + end + end + + class 131097 "manualView3DContour" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 129945 // + relation 129945 ---|> + a public + classrelation_ref 129945 // + b parent class_ref 131865 // manualViewContour + end + end + + class 131225 "manualView3VContour" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 129817 // + relation 129817 ---|> + a public + classrelation_ref 129817 // + b parent class_ref 131865 // manualViewContour + end + end + + class 131353 "manualViewBaseContour" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130201 // + relation 130201 ---> + a role_name "" private + classrelation_ref 130201 // + b parent class_ref 132121 // manualViewPoint + end + + classrelation 130329 // + relation 130329 ---> + a role_name "" private + classrelation_ref 130329 // + b parent class_ref 129945 // manualContourModel + end + + classrelation 131609 // + relation 131609 ---> + a role_name "" private + classrelation_ref 131609 // + b parent class_ref 131353 // manualViewBaseContour + end + + classrelation 131865 // + relation 131865 ---|> + a public + classrelation_ref 131865 // + b parent class_ref 129945 // manualContourModel + end + + classrelation 131993 // + relation 131993 ---> + a role_name "" private + classrelation_ref 131993 // + b parent class_ref 129945 // manualContourModel + end + + classrelation 133657 // + relation 133657 ---> + a role_name "" private + classrelation_ref 133657 // + b parent class_ref 129945 // manualContourModel + end + end + + class 131481 "manualViewBullEye" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 133913 // + relation 133913 ---|> + a public + classrelation_ref 133913 // + b parent class_ref 132249 // manualViewRoi + end + + classrelation 134041 // + relation 134041 ---> + a role_name "" private + classrelation_ref 134041 // + b parent class_ref 131609 // manualViewBullEyeSector + end + + classrelation 134169 // + relation 134169 ---> + a role_name "" private + classrelation_ref 134169 // + b parent class_ref 130073 // manualContourModelBullEye + end + end + + class 131609 "manualViewBullEyeSector" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 129689 // + relation 129689 ---|> + a public + classrelation_ref 129689 // + b parent class_ref 131865 // manualViewContour + end + end + + class 131737 "manualViewCircle" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 129305 // + relation 129305 ---|> + a public + classrelation_ref 129305 // + b parent class_ref 131865 // manualViewContour + end + end + + class 131865 "manualViewContour" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 130073 // + relation 130073 ---|> + a public + classrelation_ref 130073 // + b parent class_ref 131353 // manualViewBaseContour + end + + classrelation 134553 // + relation 134553 -_-> + a default + classrelation_ref 134553 // + b parent class_ref 132505 // wxVTKRenderWindowInteractor + end + + classrelation 134681 // + relation 134681 -_-> + a default + classrelation_ref 134681 // + b parent class_ref 133017 // wxVtkBaseView + end + + classrelation 134809 // + relation 134809 ---> + a role_name "" private + classrelation_ref 134809 // + b parent class_ref 132633 // vtkPolyData + end + + classrelation 134937 // + relation 134937 ---> + a role_name "" private + classrelation_ref 134937 // + b parent class_ref 132761 // vtkActor + end + + classrelation 135065 // + relation 135065 ---> + a role_name "" private + classrelation_ref 135065 // + b parent class_ref 133017 // wxVtkBaseView + end + + classrelation 135193 // + relation 135193 ---> + a role_name "" private + classrelation_ref 135193 // + b parent class_ref 132889 // vtkPolyDataMapper + end + end + + class 131993 "manualViewLine" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 129177 // + relation 129177 ---|> + a public + classrelation_ref 129177 // + b parent class_ref 131865 // manualViewContour + end + end + + class 132121 "manualViewPoint" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + class 132249 "manualViewRoi" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + classrelation 129433 // + relation 129433 ---|> + a public + classrelation_ref 129433 // + b parent class_ref 131865 // manualViewContour + end + end + + class 132377 "manualPoint" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + end + + classview 129305 "maracasVisu" + //class diagram settings + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default show_stereotype_properties default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default show_stereotype_properties default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default show_stereotype_properties default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default show_stereotype_properties default + //class settings + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default show_stereotype_properties default + class 132505 "wxVTKRenderWindowInteractor" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + class 133017 "wxVtkBaseView" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + end + + classview 129433 "vtk" + //class diagram settings + draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default + //collaboration diagram settings + show_full_operations_definition default show_hierarchical_rank default write_horizontally default drawing_language default package_name_in_tab default show_context default draw_all_relations default shadow default show_stereotype_properties default + //object diagram settings + write_horizontally default package_name_in_tab default show_context default auto_label_position default draw_all_relations default shadow default show_stereotype_properties default + //sequence diagram settings + show_full_operations_definition default write_horizontally default class_drawing_mode default drawing_language default draw_all_relations default shadow default show_stereotype_properties default + //state diagram settings + package_name_in_tab default show_context default auto_label_position default write_trans_label_horizontally default show_trans_definition default draw_all_relations default shadow default + show_activities default region_horizontally default drawing_language default show_stereotype_properties default + //class settings + //activity diagram settings + package_name_in_tab default show_context default show_opaque_action_definition default auto_label_position default write_flow_label_horizontally default draw_all_relations default shadow default + show_infonote default drawing_language default show_stereotype_properties default + class 132633 "vtkPolyData" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + class 132761 "vtkActor" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + class 132889 "vtkPolyDataMapper" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + + class 133145 "vtkKochanekSpline" + visibility package + cpp_decl "" + java_decl "" + php_decl "" + python_2_2 python_decl "" + idl_decl "" + explicit_switch_type "" + + end + end +end diff --git a/lib/doxygen/bouml/manualContour/python_imports b/lib/doxygen/bouml/manualContour/python_imports new file mode 100644 index 0000000..4a1bd3a --- /dev/null +++ b/lib/doxygen/bouml/manualContour/python_imports @@ -0,0 +1 @@ +// "a type" "needed python_imports" diff --git a/lib/doxygen/bouml/manualContour/stereotypes b/lib/doxygen/bouml/manualContour/stereotypes new file mode 100644 index 0000000..40fa627 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/stereotypes @@ -0,0 +1,58 @@ + + package_stereotypes 6 "facade" "framework" "model library" "stub" "toplevel" "profile" + -_-> 3 "access" "import" "from" + end + + class_stereotypes 19 "actor" "auxiliary" "boundary" "control" "entity" "enum" "enum_pattern" "exception" "focus" "implementationClass" "interface" "@interface" "metaclass" "stereotype" "struct" "type" "typedef" "union" "utility" + ---- 4 "list" "set" "vector" "map" + ---> 4 "list" "set" "vector" "map" + ---|> 4 "{complete,disjoint}" "{incomplete,disjoint}" "{complete,overlapping}" "{incomplete,overlapping}" + o--- 4 "list" "set" "vector" "map" + *--- 4 "list" "set" "vector" "map" + o--> 4 "list" "set" "vector" "map" + *--> 4 "list" "set" "vector" "map" + -_-> 4 "friend" "from" "import" "instantiate" + -_-|> 1 "bind" + end + + use_case_stereotypes 2 "realization" "realization" + + ---|> 4 "{complete,disjoint}" "{incomplete,disjoint}" "{complete,overlapping}" "{incomplete,overlapping}" + -_-> 2 "include" "extend" + end + + artifact_stereotypes 7 "document" "file" "script" "source" "text" "library" "executable" + -_-> 4 "deploy" "manifest" "import" "from" + end + + attribute_stereotypes 4 "list" "set" "vector" "map" + operation_stereotypes 0 + state_stereotypes 3 "machine" "submachine" "top" + activity_stereotypes 0 + flow_stereotypes 3 "interrupt" "multicast" "multireceive" + interruptibleactivityregion_stereotypes 0 + pseudostate_stereotypes 0 + stateaction_stereotypes 2 "send-signal" "receive-signal" + parameter_stereotypes 0 + parameterset_stereotypes 0 + activitynode_stereotypes 0 + activityaction_stereotypes 0 + activityobject_stereotypes 2 "datastore" "centralBuffer" + expansionregion_stereotypes 0 + activitypartition_stereotypes 0 + pin_stereotypes 0 + component_stereotypes 6 "buildComponent" "entity" "implement" "process" "service" "subsystem" + deploymentnode_stereotypes 3 "cpu" "device" "executionEnvironment" + classview_stereotypes 0 + usecaseview_stereotypes 0 + componentview_stereotypes 0 + deploymentview_stereotypes 0 + classdiagram_stereotypes 0 + seqdiagram_stereotypes 0 + coldiagram_stereotypes 0 + usecasediagram_stereotypes 0 + statediagram_stereotypes 0 + activitydiagram_stereotypes 0 + componentdiagram_stereotypes 0 + deploymentdiagram_stereotypes 0 +end diff --git a/lib/doxygen/bouml/manualContour/tools b/lib/doxygen/bouml/manualContour/tools new file mode 100644 index 0000000..3579028 --- /dev/null +++ b/lib/doxygen/bouml/manualContour/tools @@ -0,0 +1,18 @@ +// 'tool' "the executable" "displayed string" {target}+ +tool "HTML documentation" "ghtml" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "HTML doc. (flat)" "ghtml -flat" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "HTML doc. (svg)" "ghtml -svg" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "HTML doc. (flat, svg)" "ghtml -flat -svg" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue ExtraMember ClassInstance State Region StateAction Initial EntryPoint Final Terminate ExitPoint DeepHistory ShallowHistory Junction Choice Fork Join Transition Activity InterruptibleActivityRegion ExpansionRegion ActivityObject ActivityAction Parameter ParameterSet Pin ExpansionNode InitialActivityNode FinalActivityNode ExitPointActivityNode DecisionActivityNode MergeActivityNode ForkActivityNode JoinActivityNode Flow Project Package UseCaseView ClassView ComponentView DeploymentView UseCaseDiagram SeqDiagram ColDiagram ClassDiagram ObjectDiagram StateDiagram ActivityDiagram ComponentDiagram DeploymentDiagram UseCase Component Node Artifact Inherit DependOn +tool "Generate .pro" "gpro" Artifact +tool "Import Rose" "irose" Project Package +tool "C++ utilities" "cpp_util" Class +tool "Generate XMI 1.2" "gxmi" Project +tool "Generate XMI 2.1" "gxmi2" Project +tool "Import XMI 2.1" "ixmi2" Project Package +tool "C++ state machine" "stmgen" State +tool "Use case wizard" "usecasewizard" UseCase +tool "Check-in" "file_control ci" Project Package +tool "Check-out" "file_control co" Project Package +tool "Deploy classes" "deplcl" ClassView +tool "Global Change" "global_change" Class Project Package ClassView DeploymentView +tool "Uml projection" "uml_proj" Class Operation Attribute Generalisation Realize Dependency Association DirectionalAssociation Aggregation AggregationByValue DirectionalAggregation DirectionalAggregationByValue Project Package ClassView diff --git a/lib/maracasVisuLib/src/interface/wxWindows/temp/_CPPIncludes.cpp b/lib/maracasVisuLib/src/interface/wxWindows/temp/_CPPIncludes.cpp new file mode 100644 index 0000000..d22fbee --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/temp/_CPPIncludes.cpp @@ -0,0 +1,16 @@ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "widgets/UtilVtk3DGeometriSelection.h" + + + + diff --git a/lib/maracasVisuLib/src/interface/wxWindows/temp/_HIncludes.h b/lib/maracasVisuLib/src/interface/wxWindows/temp/_HIncludes.h new file mode 100644 index 0000000..e5f0636 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/temp/_HIncludes.h @@ -0,0 +1,26 @@ +#include "vtkRenderWindow.h" + +#include "vtkRenderer.h" +#include "vtkRenderWindowInteractor.h" //extremely important with VC++ don't remove ! +#include "vtkCommand.h" +#include "vtkPolyData.h" +#include "vtkCellArray.h" +#include "vtkPolyDataMapper.h" +#include "vtkInteractorObserver.h" +#include "vtkInteractorStyleImage.h" +#include + +#include + + +#include +#include +#include +#include + +#include "wxVTKRenderWindowInteractor.h" + +//-- +#include +#include "wxVtkBaseView.h" +#include "marTypes.h" diff --git a/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContour.cpp new file mode 100644 index 0000000..af53c28 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContour.cpp @@ -0,0 +1,5457 @@ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "widgets/UtilVtk3DGeometriSelection.h" + + +#include "manualContour.h" + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +manualPoint::manualPoint(){ +} +// ---------------------------------------------------------------------------- +manualPoint::~manualPoint(){ +} +// ---------------------------------------------------------------------------- +void manualPoint::SetPoint(double x,double y,double z){ + _x=x; + _y=y; + _z=z; +} +// ---------------------------------------------------------------------------- +void manualPoint::SetPointX(double x){ + _x=x; +} +// ---------------------------------------------------------------------------- +void manualPoint::SetPointY(double y){ + _y=y; +} +// ---------------------------------------------------------------------------- +void manualPoint::SetPointZ(double z){ + _z=z; +} +// ---------------------------------------------------------------------------- +double manualPoint::GetX(){ + return _x; +} +// ---------------------------------------------------------------------------- +double manualPoint::GetY(){ + return _y; +} +// ---------------------------------------------------------------------------- +double manualPoint::GetZ(){ + return _z; +} +// ---------------------------------------------------------------------------- +manualPoint * manualPoint :: Clone() +{ + manualPoint * clone = new manualPoint(); + clone->SetPoint( GetX(), GetY(), GetZ()); + return clone; +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +manualContourModelCircle::manualContourModelCircle() +: manualContourModel() +{ +} + +manualContourModelCircle::~manualContourModelCircle() +{ +} + + +// ---------------------------------------------------------------------------- +manualContourModelCircle * manualContourModelCircle :: Clone() // virtual +{ + manualContourModelCircle * clone = new manualContourModelCircle(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualContourModelCircle::CopyAttributesTo( manualContourModelCircle * cloneObject) +{ + // Fathers object + manualContourModel::CopyAttributesTo(cloneObject); +} + +//---------------------------------------------------------------- +int manualContourModelCircle::GetTypeModel() //virtual +{ + return 3; +} + +//---------------------------------------------------------------- +void manualContourModelCircle::GetSpline_i_Point(int i, double *x, double *y, double *z) // virtal +{ + double angle = _deltaAngle*i; + *x = _radio*cos(angle) + _centerX; + *y = _radio*sin(angle) + _centerY; + *z = _centerZ; +} + +// +// --------------------------------------------------------------------------- +void manualContourModelCircle::UpdateSpline() // virtal +{ + manualPoint *mpA,*mpB; + double difX,difY; + int np = GetSizeLstPoints( ); + int nps = GetNumberOfPointsSpline(); + _deltaAngle=(3.14159265*2)/(nps-1); + + if (np==2){ + mpA = GetManualPoint(0); + mpB = GetManualPoint(1); + difX = mpA->GetX() - mpB->GetX(); + difY = mpA->GetY() - mpB->GetY(); + _radio = sqrt( difX*difX + difY*difY ); + _centerX = mpA->GetX(); + _centerY = mpA->GetY(); + _centerZ = mpA->GetZ(); + } else { + _radio = -1; + _centerX = -1; + _centerY = -1; + _centerZ = -1; + } +} + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +//AD: 02-09 + +manualContourModelLine::manualContourModelLine() +: manualContourModel() +{ + SetNumberOfPointsSpline(20); + this->SetCloseContour(false); +} + +manualContourModelLine::~manualContourModelLine() +{ +} + + +// ---------------------------------------------------------------------------- +manualContourModelLine * manualContourModelLine :: Clone() // virtual +{ + manualContourModelLine * clone = new manualContourModelLine(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualContourModelLine::CopyAttributesTo( manualContourModelLine * cloneObject) +{ + manualContourModel::CopyAttributesTo(cloneObject); +} + +//---------------------------------------------------------------- +int manualContourModelLine::GetTypeModel() //virtual +{ + return 6; +} + + +//---------------------------------------------------------------- +/* +void manualContourModelLine::GetSpline_i_Point(int i, double *x, double *y, double *z) // virtual +{ + int np = GetSizeLstPoints(); + if (np==0) + { + *x = 0; + *y = 0; + *z = 0; + } + if (np==1) + { + manualPoint *mp; + mp = GetManualPoint(0); + *x = mp->GetX(); + *y = mp->GetY(); + *z = mp->GetZ(); + } + if (np==2) + { + manualPoint *mp; + + if (i==0) + { + mp = GetManualPoint(0); + } + else if (i==1) + { + mp = GetManualPoint(1); + } + + *x = mp->GetX(); + *y = mp->GetY(); + *z = mp->GetZ(); + } + +} +*/ + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +manualContourModelBullEye::manualContourModelBullEye() +: manualContourModel() +{ + _numberPointsSlineBySector=101; // impaire +} + +manualContourModelBullEye::~manualContourModelBullEye() +{ +} + + +// ---------------------------------------------------------------------------- +manualContourModelBullEye * manualContourModelBullEye :: Clone() // virtual +{ + manualContourModelBullEye * clone = new manualContourModelBullEye(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualContourModelBullEye::CopyAttributesTo( manualContourModelBullEye * cloneObject) +{ + // Fathers object + manualContourModel::CopyAttributesTo(cloneObject); +} + +//---------------------------------------------------------------- +int manualContourModelBullEye::GetTypeModel() //virtual +{ + return 4; +} + +//---------------------------------------------------------------- +int manualContourModelBullEye::GetNumberOfPointsSplineSectorBulleEje() +{ + return _numberPointsSlineBySector; +} + +//---------------------------------------------------------------- +void manualContourModelBullEye::SetNumberOfPointsSplineSectorBulleEje(int numpoints) +{ + this->_numberPointsSlineBySector = numpoints; +} + +//---------------------------------------------------------------- +void manualContourModelBullEye::AddSector( double radioA, + double radioB, + double ang, + double angDelta) +{ + manualContourModelBullEyeSector *modelSector = new manualContourModelBullEyeSector(); + modelSector->SetSector(radioA,radioB,ang,angDelta); + modelSector->SetNumberOfPointsSpline( this->GetNumberOfPointsSplineSectorBulleEje() ); + _lstModelBullEyeSector.push_back(modelSector); +} + +//---------------------------------------------------------------- +manualContourModelBullEyeSector * manualContourModelBullEye::GetModelSector(int id) +{ + return _lstModelBullEyeSector[id]; +} + +//---------------------------------------------------------------- +void manualContourModelBullEye::GetSector(int id, + double *radioA, + double *radioB, + double *ang, + double *angDelta) +{ + _lstModelBullEyeSector[id]->GetSector(radioA,radioB,ang,angDelta); +} + +void manualContourModelBullEye::UpdateSpline() // virtual +{ + manualContourModel::UpdateSpline(); + + if (this->GetSizeLstPoints()>2){ + double cx,cy; + double ww,hh; + manualPoint *mpA = GetManualPoint(0); + manualPoint *mpB = GetManualPoint(2); + cx = (mpA->GetX() + mpB->GetX()) / 2.0; + cy = (mpA->GetY() + mpB->GetY()) / 2.0; + ww = fabs( mpA->GetX() - mpB->GetX() )/2.0; + hh = fabs( mpA->GetY() - mpB->GetY() )/2.0; + int i,size = _lstModelBullEyeSector.size(); + for (i=0;iSetCenter(cx,cy); + _lstModelBullEyeSector[i]->SetSize(ww,hh); + } // for + } +} + + +//---------------------------------------------------------------- +void manualContourModelBullEye::ResetSectors() +{ + int i,size=_lstModelBullEyeSector.size(); + for (i=0;iSave(ff); + } +} + +//---------------------------------------------------------------- +void manualContourModelBullEye::Open(FILE *ff) // virtual +{ + manualContourModel::Open(ff); + + ResetSectors(); + + char tmp[255]; + int i; + int numberOfSections; +// double radioA,radioB,ang,deltaAng; + + fscanf(ff,"%s",tmp); // NumberOfSections + fscanf(ff,"%s",tmp); // ## + numberOfSections = atoi(tmp); + for (i=0;iOpen(ff); + } + +} + +// ---------------------------------------------------------------------------- +std::vector manualContourModelBullEye::ExploseModel( ) +{ +//EED004 + std::vector lstTmp; + int i,iSize=_lstModelBullEyeSector.size(); + for (i=0;iSetCloseContour(true); + + _cntSplineX->SetDefaultTension( 0 ); + _cntSplineX->SetDefaultBias( 0 ); + _cntSplineX->SetDefaultContinuity( 0 ); + + _cntSplineY->SetDefaultTension( 0 ); + _cntSplineY->SetDefaultBias( 0 ); + _cntSplineY->SetDefaultContinuity( 0 ); + + _cntSplineZ->SetDefaultTension( 0 ); + _cntSplineZ->SetDefaultBias( 0 ); + _cntSplineZ->SetDefaultContinuity( 0 ); + +//JSTG 25-02-08 ------------------------------------------------------------------------------------------------- + + // this parameter is reset in the VIRTUAL manualContourBaseControler::Configure + _sizePointsContour = 100; //JSTG 25-02-08 The change in the inisialization of these variable is critical. + + _delta_JSTG = 0.0; +//--------------------------------------------------------------------------------------------------------------- +} + +// ---------------------------------------------------------------------------- +manualContourModel::~manualContourModel() +{ + int i,size=_lstPoints.size(); + for (i=0;iRemoveAllPoints(); + _cntSplineY->RemoveAllPoints(); + _cntSplineZ->RemoveAllPoints(); + + _cntSplineX->Delete(); + _cntSplineY->Delete(); + _cntSplineZ->Delete(); +} +// ---------------------------------------------------------------------------- +int manualContourModel::AddPoint(double x,double y,double z) +{ + manualPoint *mp = new manualPoint(); + mp->SetPoint(x,y,z); + AddManualPoint(mp); + //UpdateSpline(); + + return _lstPoints.size()-1; +} +// ---------------------------------------------------------------------------- +int manualContourModel::InsertPoint(double x,double y,double z) +{ + double dd,ddmin=9999999; + int ibak=0; + double xx,x1,x2; + double yy,y1,y2; + double zz,z1,z2; + int i,ii,iii,size=_lstPoints.size(); + double j,MaxDivisions=20,porcentage; + int sizeB=size; + + if (_closeContour==false) + { + size=size-1; + } + + double jbak; + + for ( i=0 ; iGetX(); + y1=_lstPoints[ii]->GetY(); + z1=_lstPoints[ii]->GetZ(); + x2=_lstPoints[iii]->GetX(); + y2=_lstPoints[iii]->GetY(); + z2=_lstPoints[iii]->GetZ(); + for (j=0; j<=MaxDivisions; j++) + { + porcentage=(j/MaxDivisions); + xx=(x2-x1)*porcentage+x1; + yy=(y2-y1)*porcentage+y1; + zz=(z2-z1)*porcentage+z1; + dd=sqrt( (xx-x)*(xx-x) + (yy-y)*(yy-y) + (zz-z)*(zz-z) ); + if ( ddSetPoint(x,y,z); + //std::vector::iterator itNum = _lstPoints.begin() + ibak; + //_lstPoints.insert(itNum,mp); + InsertPoint_id(ibak,x,y,z); +//---------------------------------------------------------------------------- + + return ibak; +} +// ---------------------------------------------------------------------------- +void manualContourModel::InsertPoint_id(int id, double x, double y, double z) +{ + manualPoint *mp = new manualPoint(); + mp->SetPoint(x,y,z); + std::vector::iterator itNum = _lstPoints.begin() + id; + _lstPoints.insert(itNum,mp); +} +// ---------------------------------------------------------------------------- + +void manualContourModel::DeletePoint(int i) +{ + std::vector::iterator itNum = _lstPoints.begin() + i; + _lstPoints.erase(itNum); +} +// ---------------------------------------------------------------------------- +void manualContourModel::DeleteAllPoints() +{ + int i,size=_lstPoints.size(); + for (i=0;iUpdateSpline(); +} +// ---------------------------------------------------------------------------- + +void manualContourModel::MovePoint(int i,double dx,double dy,double dz) +{ + manualPoint *mp=_lstPoints[i]; + double x=mp->GetX()+dx; + double y=mp->GetY()+dy; + double z=mp->GetZ()+dz; + mp->SetPoint(x,y,z); +} +// ---------------------------------------------------------------------------- +void manualContourModel::MoveLstPoints(double dx,double dy,double dz) +{ + // ToDo +} +// ---------------------------------------------------------------------------- +void manualContourModel::MoveAllPoints(double dx,double dy,double dz) +{ + int i,size=_lstPoints.size(); + for (i=0;iGetX(); + yy=mp->GetY(); + zz=mp->GetZ(); + + if (type==-1) + { + if ((fabs(xx-x)ClosedOn(); + _cntSplineY->ClosedOn(); + _cntSplineZ->ClosedOn(); + } else { + _cntSplineX->ClosedOff(); + _cntSplineY->ClosedOff(); + _cntSplineZ->ClosedOff(); + } +} + +// ---------------------------------------------------------------------------- +bool manualContourModel::IfCloseContour() +{ + return _closeContour; +} + +// ---------------------------------------------------------------------------- + +void manualContourModel::UpdateSpline() // virtual +{ + int i, np; + np = _lstPoints.size(); + manualPoint *mp; + _cntSplineX->RemoveAllPoints(); + _cntSplineY->RemoveAllPoints(); + _cntSplineZ->RemoveAllPoints(); + for( i = 0; i < np; i++ ) { + mp = GetManualPoint(i); + _cntSplineX->AddPoint( i, mp->GetX() ); + _cntSplineY->AddPoint( i, mp->GetY() ); + _cntSplineZ->AddPoint( i, mp->GetZ() ); + } // rof + +//JSTG 25-02-08 --------------------------------------------------------------------------------------------- + if (this->_closeContour==true) + { + _delta_JSTG = (double) (np) / double (_sizePointsContour - 1); //Without the -1 the curve is not close + } else { +// _delta_JSTG = (double) (np-1) / double (_sizePointsContour ); //Without the -1 the curve is not close + _delta_JSTG = (double) (np) / double (_sizePointsContour-1 ); //Without the -1 the curve is not close + } +//----------------------------------------------------------------------------------------------------------- +} + +//--------------------------------------------------------------------------------- + +/*void manualContourModel::GetSplineiPoint(int i, double &x, double &y, double &z) +{ + double delta=(double)(_lstPoints.size()) / (double)(_sizePointsContour); + double t = delta*(double)i; + GetSplinePoint(t, x, y, z); +}*/ + +//----------------------------------------------------------------------------- + +//JSTG 25-02-08 --------------------------------------------------------------- +void manualContourModel::GetSpline_i_Point(int i, double *x, double *y, double *z) // virtal +{ + GetSpline_t_Point(i*_delta_JSTG,x,y,z); +} + +// ---------------------------------------------------------------------------- + +//JSTG 25-02-08 --------------------------------------------------------------- +void manualContourModel::GetSpline_t_Point(double t, double *x, double *y, double *z) +{ + if (_lstPoints.size()==0) + { + *x = 0; + *y = 0; + *z = 0; + } + if (_lstPoints.size()==1) + { + manualPoint *mp; + mp = GetManualPoint(0); + *x = mp->GetX(); + *y = mp->GetY(); + *z = mp->GetZ(); + } + if (_lstPoints.size()>=2) + { + *x = _cntSplineX->Evaluate(t); + *y = _cntSplineY->Evaluate(t); + *z = _cntSplineZ->Evaluate(t); + } +} + +// ---------------------------------------------------------------------------- + + +/*void manualContourModel::GetSplinePoint(double t, double &x, double &y, double &z) +{ + if (_lstPoints.size()==0) + { + x = 0; + y = 0; + z = 0; + } + if (_lstPoints.size()==1) + { + manualPoint *mp; + mp = GetManualPoint(0); + x = mp->GetX(); + y = mp->GetY(); + z = mp->GetZ(); + } + if (_lstPoints.size()>=2) + { + x = _cntSplineX->Evaluate(t); + y = _cntSplineY->Evaluate(t); + z = _cntSplineZ->Evaluate(t); + } +}*/ +// ---------------------------------------------------------------------------- +double manualContourModel::GetPathSize() +{ + double result = 0; + double x1,y1,z1; + double x2,y2,z2; + +// JSTG 25-02-08 ----------------------------- + //double t,delta; + //int i,np,nps; + int i; +//-------------------------------------------- + + if (_lstPoints.size()==2) + { + x1=_lstPoints[0]->GetX(); + y1=_lstPoints[0]->GetY(); + z1=_lstPoints[0]->GetZ(); + x2=_lstPoints[1]->GetX(); + y2=_lstPoints[1]->GetY(); + z2=_lstPoints[1]->GetZ(); + result = sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1) ); + } + if (_lstPoints.size()>2) + { + +// JSTG 25-02-08 ------------------------------------------ + //np = _lstPoints.size( ); + //nps = 200; + //delta=( double ) ( np ) / ( double ) ( nps ); + UpdateSpline(); + //GetSplinePoint(0,x1,y1,z1); + GetSpline_i_Point(0,&x1,&y1,&z1); + + //for( i = 1; i < nps; i++ ) + for( i = 1; i < GetNumberOfPointsSpline(); i++ ) + { + //t = delta * (double)i; + //GetSplinePoint(t,x2,y2,z2); + GetSpline_i_Point(i,&x2,&y2,&z2); +//--------------------------------------------------------- + result=result + sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1) ); + x1=x2; + y1=y2; + z1=z2; + }// for + } + + return result; +} +// ---------------------------------------------------------------------------- +double manualContourModel::GetPathArea() +{ + double result = 555; + if ((_lstPoints.size()>=3) && IfCloseContour()==true ) + { + double area; +//JSTG 25-02-08 --------------------------------------------- + //double ti,tj; +//----------------------------------------------------------- + double x1,y1,z1; + double x2,y2,z2; + bool okArea=true; + int i, j; + + // This uses Green's theorem: + // A = 1/2 * sum( xiyi+1 - xi+1yi); pO == pN + // A < 0 -> A = |A| (a negative value could raise because points are + // given in clockwise order). + +//JSTG 25-02-08 ------------------------------------------------- + //int np = _lstPoints.size( ); + //int nps = 200; + int nps = GetNumberOfPointsSpline(); + //double delta=( double ) ( np ) / ( double ) ( nps ); + UpdateSpline(); + for( i = 0, area = 0.0; i < nps; i++ ) + { + j = ( i + 1 ) % nps; + //ti = delta * (double)i; + //tj = delta * (double)j; + //GetSplinePoint(ti,x1,y1,z1); + //GetSplinePoint(tj,x2,y2,z2); + GetSpline_i_Point(i,&x1,&y1,&z1); + GetSpline_i_Point(j,&x2,&y2,&z2); +//---------------------------------------------------------------- + area += + (x1 * y2 ) - + ( x2 * y1 ); + if (z1!=z2) + { + okArea=false; + } + }// for + area /= 2.0; + area = fabs( area ); + +/* + for( i = 0, area = 0.0; i < _lstPoints.size(); i++ ) + { + j = ( i + 1 ) % _lstPoints.size(); + // Area + area += + (_lstPoints[i]->GetX() * _lstPoints[j]->GetY() ) - + ( _lstPoints[j]->GetX() * _lstPoints[i]->GetY() ); + if (_lstPoints[0]->GetZ()!=_lstPoints[i]->GetZ()) + { + okArea=false; + } + } // rof + area /= 2.0; + area = fabs( area ); +*/ + + if (okArea==true) + { + result = area; + } else { + result = -1; + } + + } else { + result = 0; + } + return result; +} + +// ---------------------------------------------------------------------------- +// p[x,y,z] : data in +// rp[x,y,z] : data out result point +// rn[x,y,z] : data out result normal + +void manualContourModel::GetNearestPointAndNormal(double *p, double *rp, double *rn) +{ + double distMin=999999999; + double dist,dx,dy,dz; + double x1,y1,z1; + double x2,y2,z2; + int i,np,nps; + +//JSTG 25-02-08 ------------------- + //double tback; + int iback; + //double t,delta; +//--------------------------------- + + np = _lstPoints.size( ); + if (np>=2) + { +// JSTG 25-02-08 ------------------------------------------ + //nps = 200; + nps = GetNumberOfPointsSpline(); + //delta = ( double ) ( np ) / ( double ) ( nps ); + UpdateSpline(); + //GetSplinePoint(0,x1,y1,z1); + GetSpline_i_Point(0,&x1,&y1,&z1); + for( i = 0; i < nps; i++ ) + { + //t = delta * (double)i; + //GetSplinePoint(t,x1,y1,z1); + GetSpline_i_Point(i,&x1,&y1,&z1); +//---------------------------------------------------------- + dx= x1-p[0]; + dy= y1-p[1]; + dz= z1-p[2]; + dist = sqrt( dx*dx + dy*dy + dz*dz ); + if (distGetX(), mp->GetY(), mp->GetZ() ); + } +} + + +// --------------------------------------------------------------------------- + +void manualContourModel::CopyAttributesTo( manualContourModel * cloneObject) +{ + // Fathers object + //XXXX::CopyAttributesTo(cloneObject); + + cloneObject->SetCloseContour( this->IfCloseContour() ); + int i, size = GetSizeLstPoints(); + for( i=0; iAddManualPoint( GetManualPoint( i )->Clone() ); + } + cloneObject->SetNumberOfPointsSpline( GetNumberOfPointsSpline () ); + cloneObject->SetCloseContour( _closeContour ); + cloneObject->UpdateSpline(); +} + + +// --------------------------------------------------------------------------- +void manualContourModel::AddManualPoint( manualPoint* theManualPoint )//private +{ + _lstPoints.push_back( theManualPoint ); +} + +std::vector manualContourModel::ExploseModel( ) +{ + std::vector lstTmp; + lstTmp.push_back(this); + return lstTmp; +} + + +// --------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +//int manualViewPoint::range=1; + + +manualViewPoint::manualViewPoint(wxVtkBaseView *wxvtkbaseview){ + _selected = false; + _posibleSelected = false; + _pts = NULL; + _pd = NULL; + _pointVtkActor = NULL; + _bboxMapper = NULL; + _wxvtkbaseview = wxvtkbaseview; + _spc[0] = 1; + _spc[1] = 1; + _spc[2] = 1; + + _widthline = 1; + +} +// ---------------------------------------------------------------------------- +manualViewPoint::~manualViewPoint(){ + DeleteVtkObjects(); +} + +// ---------------------------------------------------------------------------- +void manualViewPoint::SetWidthLine( double width) +{ + _widthline = width; +} + +// ---------------------------------------------------------------------------- +void manualViewPoint::SetSelected(bool selected){ + _selected=selected; +} +// ---------------------------------------------------------------------------- +void manualViewPoint::SetPosibleSelected(bool posibleSelected){ + _posibleSelected=posibleSelected; +} +// ---------------------------------------------------------------------------- +bool manualViewPoint::GetSelected(){ + return _selected; +} +// ---------------------------------------------------------------------------- +bool manualViewPoint::GetPosibleSelected(){ + return _posibleSelected; +} +// ---------------------------------------------------------------------------- +void manualViewPoint::DeleteVtkObjects(){ + if (_pointVtkActor !=NULL) { _pointVtkActor->Delete(); } + if (_bboxMapper !=NULL) { _bboxMapper ->Delete(); } + if (_pts !=NULL) { _pts ->Delete(); } + if (_pd !=NULL) { _pd ->Delete(); } + _pointVtkActor = NULL; + _bboxMapper = NULL; + _pts = NULL; + _pd = NULL; +} + + + +// ---------------------------------------------------------------------------- +vtkActor* manualViewPoint::CreateVtkPointActor() +{ + DeleteVtkObjects(); + + _pts = vtkPoints::New(); + _pts->SetNumberOfPoints(8); + + _pts->SetPoint(0, -1000 , -1000 , 0 ); + _pts->SetPoint(1, 1000 , -1000 , 0 ); + _pts->SetPoint(2, 1000 , 1000 , 0 ); + _pts->SetPoint(3, -1000 , 1000 , 0 ); + _pts->SetPoint(4, -1000 , 1000 , 0 ); + _pts->SetPoint(5, -1000 , 1000 , 0 ); + _pts->SetPoint(6, -1000 , 1000 , 0 ); + _pts->SetPoint(7, -1000 , 1000 , 0 ); + + vtkCellArray *lines = vtkCellArray::New(); + lines->InsertNextCell(17); + lines->InsertCellPoint(0); + lines->InsertCellPoint(1); + lines->InsertCellPoint(2); + lines->InsertCellPoint(3); + lines->InsertCellPoint(0); + lines->InsertCellPoint(4); + lines->InsertCellPoint(5); + lines->InsertCellPoint(6); + lines->InsertCellPoint(7); + lines->InsertCellPoint(4); + lines->InsertCellPoint(0); + lines->InsertCellPoint(3); + lines->InsertCellPoint(7); + lines->InsertCellPoint(6); + lines->InsertCellPoint(2); + lines->InsertCellPoint(1); + lines->InsertCellPoint(5); + + _pd = vtkPolyData::New(); + _pd->SetPoints( _pts ); + _pd->SetLines( lines ); +// lines->Delete(); //do not delete lines ?? + + _pointVtkActor = vtkActor::New(); + _bboxMapper = vtkPolyDataMapper::New(); + + _bboxMapper->SetInput(_pd); +// _bboxMapper->ImmediateModeRenderingOn(); + _pointVtkActor->SetMapper(_bboxMapper); +// _pointVtkActor->GetProperty()->BackfaceCullingOn(); + UpdateColorActor(); +// _pd->ComputeBounds(); + + return _pointVtkActor; +} +// ---------------------------------------------------------------------------- +vtkActor* manualViewPoint::GetVtkActor(){ + return _pointVtkActor; +} +// ---------------------------------------------------------------------------- +void manualViewPoint::SetPositionXY(double x, double y,double i_range,double posZ) +{ +// double range=0.2; // i_range; +// double range=(double)manualViewPoint::range; + + double range=i_range; + +//EED 27 sep 2006 + x = x * _spc[0]; + y = y * _spc[1]; + posZ = posZ * _spc[2]; + + if (_pts!=NULL){ + _pts->SetPoint(0, x-range, y+range, posZ-range); + _pts->SetPoint(1, x+range, y+range, posZ-range); + _pts->SetPoint(2, x+range, y-range, posZ-range); + _pts->SetPoint(3, x-range, y-range, posZ-range); + _pts->SetPoint(4, x-range, y+range, posZ+range); + _pts->SetPoint(5, x+range, y+range, posZ+range); + _pts->SetPoint(6, x+range, y-range, posZ+range); + _pts->SetPoint(7, x-range, y-range, posZ+range); + } +} + + +// ---------------------------------------------------------------------------- +void manualViewPoint::UpdateColorActor() +{ + if (_pointVtkActor!=NULL){ +//EED03 + _pointVtkActor->GetProperty()->SetLineWidth( _widthline ); + _pointVtkActor->GetProperty()->SetDiffuseColor(1,0,0); + if (_posibleSelected==true){ + _pointVtkActor->GetProperty()->SetDiffuseColor(1,1,0); + } + } +} +// ---------------------------------------------------------------------------- +void manualViewPoint::GetSpacing(double spc[3]) +{ + spc[0] = _spc[0]; + spc[1] = _spc[1]; + spc[2] = _spc[2]; +} +// ---------------------------------------------------------------------------- +void manualViewPoint::SetSpacing(double spc[3]) +{ + _spc[0] = spc[0]; + _spc[1] = spc[1]; + _spc[2] = spc[2]; +} + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +manualViewContour::manualViewContour() +{ + _id_viewPoint_for_text = 0; + _mesureScale = 1; + _initialConoturModel = new manualContourModel(); +} +// ---------------------------------------------------------------------------- +manualViewContour::~manualViewContour() +{ + delete _initialConoturModel; +} +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +manualViewContour * manualViewContour :: Clone() +{ + manualViewContour * clone = new manualViewContour(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualViewContour::CopyAttributesTo( manualViewContour * cloneObject) +{ + // Call to Fathers object + manualViewBaseContour::CopyAttributesTo(cloneObject); + + cloneObject->SetMesureScale(_mesureScale); +} + +// --------------------------------------------------------------------------- + +int manualViewContour::GetType() // virtual +{ + return 1; +} + +// ---------------------------------------------------------------------------- + +void manualViewContour::Save(FILE *pFile) +{ + manualViewBaseContour::Save(pFile); +} + +// ---------------------------------------------------------------------------- + +void manualViewContour::Open(FILE *pFile) +{ +} + + + +// ---------------------------------------------------------------------------- +void manualViewContour::RefreshContour() // virtual +{ + + int i,np,nps; + +//JSTG 25-02-08 -------------------- + //double t,delta, x,y,z; + double x,y,z; +//---------------------------------- + + _manContModel->UpdateSpline(); + np = GetNumberOfPoints( ); + //nps = GetNumberOfPointsSpline(); + nps = _manContModel->GetNumberOfPointsSpline(); + //delta=( double ) ( np ) / ( double ) ( nps-1 ); //JSTG 25-02-08 + + + if ( _pts!=NULL ) + { + if (np>=2 ) + { + for( i = 0; i < nps; i++ ) + { +//JSTG 25-02-08 ------------------------------------------------ + //t = delta * (double)i; + //_manContModel->GetSplinePoint(t,x,y,z); + _manContModel->GetSpline_i_Point(i,&x,&y,&z); +//-------------------------------------------------------------- + // EED 27 sep 2006 + // _pts->SetPoint(i, x,y,z ); + _pts->SetPoint(i , x*_spc[0] , y*_spc[1] , z*_spc[2] ); + + + }// for + } + else + { + _pts->SetPoint(0, 0 , 0 , 0); + _pts->SetPoint(1, 0 , 0 , 0); + } // if + } +} + +// ---------------------------------------------------------------------------- +void manualViewContour::RefreshText() // virtual +{ + if ((_textActor!=NULL) && ( _textActor->GetProperty()->GetOpacity()!=0 )){ + int size = GetNumberOfPoints(); + char text[50]; + char resultText[50]; + strcpy(resultText," "); + if (size==2) + { + strcpy(resultText,"L= "); + gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text ); + strcat(resultText,text); + } + if (size>2) + { + if (_manContModel->IfCloseContour()==true) + { + strcpy(resultText,"P= "); + gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text ); + strcat(resultText,text); + gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea() , 5, text ); + strcat(resultText," A= "); + strcat(resultText,text); + } else { + strcpy(resultText,"L= "); + gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text ); + strcat(resultText,text); + } + } + + _textActor->SetInput(resultText); + + if (size>=1){ + + int i; + for (i=0; iGetPosibleSelected()==true) + { + _id_viewPoint_for_text = i; + } + } + + int id = _id_viewPoint_for_text; + double px = _manContModel->GetManualPoint(id)->GetX(); + double py = _manContModel->GetManualPoint(id)->GetY(); + + //EED 27 sep 2006 + px=px*_spc[0]; + py=py*_spc[1]; + + _textActor->SetPosition(px+GetRange()+1,py); + } + + } +} + +// ---------------------------------------------------------------------------- +bool manualViewContour::ifTouchContour(int x,int y,int z){ + bool result=false; + double xx=x; + double yy=y; + double zz=z; + double ppA[3]; + double ppB[3]; + double d1,d2,d3; + TransfromeCoordViewWorld(xx,yy,zz); + +//EED 27 sep 2006 + xx = xx * _spc[0]; + yy = yy * _spc[1]; + zz = zz * _spc[2]; + + unsigned int i, nps,nps_t; + nps = _sizePointsContour; + + if (this->_manContModel->IfCloseContour()==true) + { + nps_t = nps; + } else { + nps_t = nps-1; + } + + + for( i = 0; i < nps_t; i++ ) + { + _pts->GetPoint(i%nps, ppA); + _pts->GetPoint((i+1)%nps, ppB); + d1= sqrt( (ppA[0]-xx)*(ppA[0]-xx) + (ppA[1]-yy)*(ppA[1]-yy) + (ppA[2]-zz)*(ppA[2]-zz)); + d2= sqrt( (ppB[0]-xx)*(ppB[0]-xx) + (ppB[1]-yy)*(ppB[1]-yy) + (ppB[2]-zz)*(ppB[2]-zz)); + d3= sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2])); + + + if ( ((d1+d2)>=d3) && ((d1+d2)<=d3*1.3) ) + { + result=true; + i=nps; + } + } + + return result; +} + +// ---------------------------------------------------------------------------- +void manualViewContour::DeletePoint(int id) // virtual +{ + if (_lstViewPoints.size()>2) + { + manualViewBaseContour::DeletePoint( id ); + } +} +// ---------------------------------------------------------------------------- + +void manualViewContour::ClearPoint(int id) +{ + manualViewBaseContour::DeletePoint( id ); +} + +//------------------------------------------------------------------- +void manualViewContour::SetMesureScale(double mesureScale) +{ + _mesureScale = mesureScale; +} +//------------------------------------------------------------------- +void manualViewContour::InitMove(int x, int y, int z) +{ + _initialConoturModel->DeleteAllPoints(); + + manualPoint *mp = NULL; + double XX=x; + double YY=y; + double ZZ=z; + TransfromeCoordViewWorld(XX,YY,ZZ); + + int i, manualPointsSZ = _manContModel->GetSizeLstPoints(); + for ( i=0; iGetManualPoint( i ); + this->_initialConoturModel->AddPoint( mp->GetX() - XX, mp->GetY() - YY, mp->GetZ() ); + } +} +//------------------------------------------------------------------- +void manualViewContour::MoveContour(int x, int y, int z) +{ + manualPoint *mpOrigin = NULL; + manualPoint *mpMoving = NULL; + double XX=x; + double YY=y; + double ZZ=z; + + TransfromeCoordViewWorld(XX,YY,ZZ); + + int i, manualPointsSZ = _manContModel->GetSizeLstPoints(); + for ( i=0; iGetManualPoint( i ); + mpMoving = _initialConoturModel->GetManualPoint(i); + mpOrigin->SetPoint( mpMoving->GetX()+XX, mpMoving->GetY() + YY, mpMoving->GetZ() ); + } + UpdateViewPoints(); +} +void manualViewContour::MoveContour(int horizontalUnits, int verticalUnits ) +{ + manualPoint *mpOrigin = NULL; + + int i, manualPointsSZ = _manContModel->GetSizeLstPoints(); + for ( i=0; iGetManualPoint( i ); + mpOrigin->SetPoint( mpOrigin->GetX()+horizontalUnits, mpOrigin->GetY()+verticalUnits, mpOrigin->GetZ() ); + } + UpdateViewPoints(); +} +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +manualView3VContour::manualView3VContour(int type) +{ + _type=type; +// JSTG 25-02-08 ------------------------------ + //_manContModel= new manualContourModel(); +//--------------------------------------------- +} +// ---------------------------------------------------------------------------- +manualView3VContour::~manualView3VContour() +{ +} + + + +// ---------------------------------------------------------------------------- +manualView3VContour * manualView3VContour :: Clone() +{ + manualView3VContour * clone = new manualView3VContour( GetType() ); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualView3VContour::CopyAttributesTo( manualView3VContour * cloneObject) +{ + // Fathers object + manualViewContour::CopyAttributesTo(cloneObject); +} + +int manualView3VContour::GetType() +{ + return _type; +} + +// ---------------------------------------------------------------------------- +void manualView3VContour::FilterCordinateXYZ(double &x,double &y,double &z) +{ + if (_type==0) + { + x=-1000; + } + if (_type==1) + { + y=500; + } + if (_type==2) + { + z=-1000; + } +} +// ---------------------------------------------------------------------------- + +void manualView3VContour::RefreshContour() // virtula +{ + manualViewContour::RefreshContour(); + int i; + double pp[3]; +// JSTG 25-02-08 ---------------------------------------- + //int nps = GetNumberOfPointsSpline(); + int nps = _manContModel->GetNumberOfPointsSpline(); +//------------------------------------------------------- + for( i = 0; i < nps; i++ ) + { + _pts->GetPoint( i, pp ); + FilterCordinateXYZ(pp[0],pp[1],pp[2]); + +//EED 27 sep 2006 + _pts->SetPoint( i, pp[0] , pp[1] ,pp[2] ); + } + +} + +// ---------------------------------------------------------------------------- + +void manualView3VContour::UpdateViewPoint(int id){ // virtual + double x,y,z; + manualPoint *mp = _manContModel->GetManualPoint(id); + x=mp->GetX(); + y=mp->GetY(); + z=mp->GetZ(); + + FilterCordinateXYZ(x,y,z); + _lstViewPoints[id]->SetPositionXY( x , y ,GetRange(), z ); +} + +// ---------------------------------------------------------------------------- + +int manualView3VContour::GetIdPoint(int x, int y, int z) // virtual +{ + int ii=-1; + if (_manContModel!=NULL){ + double xx=x; + double yy=y; + double zz=z; + TransfromeCoordViewWorld(xx,yy,zz,-1); + ii=_manContModel->GetIdPoint(xx,yy,zz,GetRange(),_type); + } + return ii; +} + +// ---------------------------------------------------------------------------- +bool manualView3VContour::ifTouchContour(int x,int y,int z){ // virtual + bool result=false; + double xx=x; + double yy=y; + double zz=z; + double ppA[3]; + double ppB[3]; + double d1,d2,d3; + TransfromeCoordViewWorld(xx,yy,zz,-1); + +//EED 27 sep 2006 + xx = xx * _spc[0]; + yy = yy * _spc[1]; + zz = zz * _spc[2]; + + unsigned int i, nps,nps_t; + nps = _sizePointsContour; + if (this->_manContModel->IfCloseContour()==true) + { + nps_t = nps; + } else { + nps_t = nps-1; + } + FilterCordinateXYZ(xx,yy,zz); + + for( i = 0; i < nps_t; i++ ) { + _pts->GetPoint(i%nps, ppA); + _pts->GetPoint((i+1)%nps, ppB); + FilterCordinateXYZ(ppA[0],ppA[1],ppA[2]); + FilterCordinateXYZ(ppB[0],ppB[1],ppB[2]); + d1= sqrt( (ppA[0]-xx)*(ppA[0]-xx) + (ppA[1]-yy)*(ppA[1]-yy) + (ppA[2]-zz)*(ppA[2]-zz)); + d2= sqrt( (ppB[0]-xx)*(ppB[0]-xx) + (ppB[1]-yy)*(ppB[1]-yy) + (ppB[2]-zz)*(ppB[2]-zz)); + d3= sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2])); + if ( ((d1+d2)>=d3) && ((d1+d2)<=d3*1.3) ) { + result=true; + i=nps; + } + } + return result; +} +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +manualView3DContour::manualView3DContour() +{ +} +// ---------------------------------------------------------------------------- +manualView3DContour::~manualView3DContour() +{ +} + +// ---------------------------------------------------------------------------- +manualView3DContour * manualView3DContour :: Clone() +{ + manualView3DContour * clone = new manualView3DContour(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualView3DContour::CopyAttributesTo( manualView3DContour * cloneObject) +{ + // Fathers object + manualViewContour::CopyAttributesTo(cloneObject); + + cloneObject->SetDimensions ( _w , _h , _d ); +} +// ---------------------------------------------------------------------------- +void manualView3DContour::SetDimensions(int w, int h, int d) +{ + _w = w; + _h = h; + _d = d; +} +// ---------------------------------------------------------------------------- +void manualView3DContour::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) +{ + X = _vtkmprbasedata->GetX(); + Y = _vtkmprbasedata->GetY(); + Z = _vtkmprbasedata->GetZ(); +} +// ---------------------------------------------------------------------------- +void manualView3DContour::SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata) +{ + _vtkmprbasedata = vtkmprbasedata; +} +// ---------------------------------------------------------------------------- +int manualView3DContour::GetIdPoint2(int x, int y) +{ + int id = -1; + double p[3],pA[3],pB[3]; + + double pickPoint[ 3 ], cameraPos[ 3 ]; + vtkPointPicker* picker = vtkPointPicker::New( ); + vtkRenderer *pRenderer = this->GetWxVtkBaseView()->GetRenderer(); + picker->Pick( x, y, 0.0, pRenderer ); + pRenderer->GetActiveCamera( )->GetPosition( cameraPos ); + picker->GetPickPosition( pickPoint ); + picker->Delete( ); + + UtilVtk3DGeometriSelection utilVtk3Dgeometriselection; + utilVtk3Dgeometriselection.SetDimentions(_w,_h,_d); + + if( utilVtk3Dgeometriselection.FindCubePointsFromPoints( pA, pB, pickPoint, cameraPos ) ) + { + double dist,distMin=999999999; + int i,size=this->_manContModel->GetSizeLstPoints(); + for (i=0;i_manContModel->GetManualPoint(i); + p[0] = mp->GetX(); + p[1] = mp->GetY(); + p[2] = mp->GetZ(); + dist=utilVtk3Dgeometriselection.DistanceMinPointToLine(p,pA,pB); + if ( (dist<=2*GetRange()) && (distUpdateSpline(); + nps = _manContModel->GetNumberOfPointsSpline(); + + if ( _pts!=NULL ) + { + for( i = 0; i < nps; i++ ) + { + _manContModel->GetSpline_i_Point(i,&x,&y,&z); + _pts->SetPoint(i , x*_spc[0] , y*_spc[1] , z*_spc[2] ); + }// for + } + +} + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +manualViewBullEye::manualViewBullEye() +{ +} + +// ---------------------------------------------------------------------------- +manualViewBullEye::~manualViewBullEye() +{ + // BullEye(s) + int i,size=lstSectorBullEye.size(); + for (i=0;iUpdateSpline(); + int np = GetNumberOfPoints( ); + // Refres sectors of BullEye(s) + + if (np>=2 ) + { + int i,size = lstSectorBullEye.size(); + for (i=0;iRefreshContour(); + } // for + } // if + + +} + +// ---------------------------------------------------------------------------- +void manualViewBullEye::ConstructVTKObjects() // virtual +{ + manualViewRoi::ConstructVTKObjects(); + + double spc[3]; + this->GetSpacing(spc); + manualViewBullEyeSector *mvbc; + manualContourModelBullEye *mcmbe = (manualContourModelBullEye*)this->_manContModel; + int i,size = mcmbe->GetSizeOfSectorLst(); + for ( i=0 ; iSetModel( mcmbe->GetModelSector(i) ); + mvbc->SetWxVtkBaseView( this->GetWxVtkBaseView() ); + mvbc->SetRange( 2 ); + mvbc->SetZ( 1000 ); + mvbc->SetSpacing(spc); + mvbc->SetColorNormalContour(1, 0, 0); +// mvbc->SetColorEditContour(0.5, 0.5, 0.5); +// mvbc->SetColorSelectContour(1, 0.8, 0); + mvbc->SetWidthLine( this->GetWidthLine() ); +//EED004 + mvbc->ConstructVTKObjects(); + lstSectorBullEye.push_back( mvbc ); + } + + +} + +// ---------------------------------------------------------------------------- +void manualViewBullEye::AddSplineActor() // virtual +{ + manualViewRoi::AddSplineActor(); + int i,size=lstSectorBullEye.size(); + for (i=0;iAddSplineActor(); + } +} + +// ---------------------------------------------------------------------------- +void manualViewBullEye::RemoveSplineActor() // virtual +{ + manualViewRoi::RemoveSplineActor(); + int i,size=lstSectorBullEye.size(); + for (i=0;iRemoveSplineActor(); + } +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +manualViewRoi::manualViewRoi() +{ + _sizePointsContour=5; +} +// ---------------------------------------------------------------------------- +manualViewRoi::~manualViewRoi() +{ +} + + +// ---------------------------------------------------------------------------- +manualViewRoi * manualViewRoi :: Clone() +{ + manualViewRoi * clone = new manualViewRoi(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualViewRoi::CopyAttributesTo( manualViewRoi * cloneObject) +{ + // Fathers object + manualViewBaseContour::CopyAttributesTo(cloneObject); +} + +// ---------------------------------------------------------------------------- +void manualViewRoi::RefreshContour() // virtual +{ + unsigned int i,ii, np; + np = GetNumberOfPoints( ); +//EED01 + if ( np > 0) + { + if (np>=2) + { + manualPoint *mp; + for( i = 0; i < np+1; i++ ) { + ii=i%np; + mp = _manContModel->GetManualPoint(ii); + + //EEDx6 + double XX=mp->GetX(),YY=mp->GetY(),ZZ=mp->GetZ(); + // wxVtk2DBaseView *wxvtk2Dbasevie = (wxVtk2DBaseView*)this->GetWxVtkBaseView(); + // wxvtk2Dbasevie->TransformCoordinate_spacing_ModelToView(XX,YY,ZZ); + + //EED 27 sep 2007 + // _pts->SetPoint(i, XX,YY,ZZ ); + _pts->SetPoint(i, XX*_spc[0] , YY*_spc[1] , ZZ*_spc[2] ); + } // rof + + } else { + _pts->SetPoint(0, 0 , 0 , 0); + _pts->SetPoint(1, 0 , 0 , 0); + } // if + } +} + +// ---------------------------------------------------------------------------- +int manualViewRoi::GetType() // virtual +{ + return 2; +} + +// ---------------------------------------------------------------------------- + +void manualViewRoi::GetMinMax(double &minX,double &minY, double &maxX, double &maxY) +{ + double pp[3]; + manualPoint *mp; + unsigned int i; + + minX=99999; + minY=99999; + maxX=-99999; + maxY=-99999; + + unsigned int size=(unsigned int) _manContModel->GetSizeLstPoints(); + + for( i = 0; i < size; i++ ) + { + + mp=_manContModel->GetManualPoint(i); + pp[0]=mp->GetX(); + pp[1]=mp->GetY(); + + // min X + if (pp[0]maxX) + { + maxX=pp[0]; + } + // max Y + if (pp[1]>maxY) + { + maxY=pp[1]; + } + } + + if ( size<1 ) + { + minX=0; + maxX=0; + minY=0; + maxY=0; + } +} + +// ---------------------------------------------------------------------------- + + +bool manualViewRoi::ifTouchContour(int x,int y, int z) // virtual +{ + bool result=false; + double px1=99999,py1=99999,px2=-99999,py2=-99999; + + GetMinMax(px1,py1, px2, py2); + + double xx=x; + double yy=y; + double zz=z; + TransfromeCoordViewWorld(xx,yy,zz); + + bool ok1=false; + bool ok2=false; + double ddx=GetRange(); + double ddy=GetRange(); + + if ((xx>px1-ddx)&&(xxpy1-ddy)&&(yypx1+ddx)&&(xxpy1+ddy)&&(yyGetSizeLstPoints()==4){ + mp = _manContModel->GetManualPoint(0); + _dp0[0]= mp->GetX() - XX; + _dp0[1]= mp->GetY() - YY; + _dp0[2]= mp->GetZ(); + + mp = _manContModel->GetManualPoint(1); + _dp1[0]= mp->GetX() - XX; + _dp1[1]= mp->GetY() - YY; + _dp1[2]= mp->GetZ(); + + mp = _manContModel->GetManualPoint(2); + _dp2[0]= mp->GetX() - XX; + _dp2[1]= mp->GetY() - YY; + _dp2[2]= mp->GetZ(); + + mp = _manContModel->GetManualPoint(3); + _dp3[0]= mp->GetX() - XX; + _dp3[1]= mp->GetY() - YY; + _dp3[2]= mp->GetZ(); + } +} + +// ---------------------------------------------------------------------------- + +void manualViewRoi::MoveContour(int x, int y, int z) // virtual +{ + manualPoint *mp; + double XX=x; + double YY=y; + double ZZ=z; + TransfromeCoordViewWorld(XX,YY,ZZ); + + mp = _manContModel->GetManualPoint(0); + mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]); + + mp = _manContModel->GetManualPoint(1); + mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]); + + mp = _manContModel->GetManualPoint(2); + mp->SetPoint(_dp2[0]+XX,_dp2[1]+YY,_dp0[2]); + + mp = _manContModel->GetManualPoint(3); + mp->SetPoint(_dp3[0]+XX,_dp3[1]+YY,_dp0[2]); + + UpdateViewPoint(0); + UpdateViewPoint(1); + UpdateViewPoint(2); + UpdateViewPoint(3); + +} + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// EED08 + +manualViewCircle::manualViewCircle() +{ +// _sizePointsContour=5; // default 100 +} +// ---------------------------------------------------------------------------- +manualViewCircle::~manualViewCircle() +{ +} + + +// ---------------------------------------------------------------------------- +manualViewCircle * manualViewCircle :: Clone() +{ + manualViewCircle * clone = new manualViewCircle(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualViewCircle::CopyAttributesTo( manualViewCircle * cloneObject) +{ + // Fathers object + manualViewBaseContour::CopyAttributesTo(cloneObject); +} + + +// ---------------------------------------------------------------------------- +/* +void manualViewCircle::RefreshContour(){ // virtual + + manualPoint *mpA,*mpB; + unsigned int i, np,nps; + double angle,radio; + double difX,difY; + double XX,YY,ZZ; + np = GetNumberOfPoints( ); + nps = _manContModel->GetNumberOfPointsSpline(); + double deltaAngle=(3.14159265*2)/(nps-1); + if ( np > 0) + { + if (np==2) + { + mpA = _manContModel->GetManualPoint(0); + mpB = _manContModel->GetManualPoint(1); + difX = mpA->GetX() - mpB->GetX(); + difY = mpA->GetY() - mpB->GetY(); + radio = sqrt( difX*difX + difY*difY ); + manualContourModelCircle *manContModelCir = (manualContourModelCircle*)_manContModel; + manContModelCir->SetRadio(radio); + + for( i = 0; i < nps; i++ ) { + manContModelCir->GetSpline_i_Point(i, &XX, &YY, &ZZ); +// angle = deltaAngle*i; +// XX = cos(angle)*radio+mpA->GetX(); +// YY = sin(angle)*radio+mpA->GetY(); + ZZ = mpA->GetZ(); + _pts->SetPoint(i, XX*_spc[0] , YY*_spc[1] , ZZ*_spc[2] ); + } // rof + } else { + _pts->SetPoint(0, 0 , 0 , 0); + _pts->SetPoint(1, 0 , 0 , 0); + } // if + } +} +*/ + +// ---------------------------------------------------------------------------- +int manualViewCircle::GetType() // virtual +{ + return 3; +} + +// ---------------------------------------------------------------------------- + +void manualViewCircle::GetMinMax(double &minX,double &minY, double &maxX, double &maxY) +{ + manualPoint *mpA,*mpB; + unsigned int np; + double radio; + double difX,difY; + np = GetNumberOfPoints( ); + if (np==2) + { + mpA = _manContModel->GetManualPoint(0); + mpB = _manContModel->GetManualPoint(1); + difX = mpA->GetX() - mpB->GetX(); + difY = mpA->GetY() - mpB->GetY(); + radio = sqrt( difX*difX + difY*difY ); + minX=mpA->GetX()-radio; + minY=mpA->GetY()-radio; + maxX=mpA->GetX()+radio; + maxY=mpA->GetY()+radio; + } else { + minX=0; + maxX=0; + minY=0; + maxY=0; + } +} + +/* +// ---------------------------------------------------------------------------- +bool manualViewCircle::ifTouchContour(int x,int y, int z) // virtual +{ + bool result=false; + double px1=99999,py1=99999,px2=-9999,py2=-99999; + + GetMinMax(px1,py1, px2, py2); + + double xx=x; + double yy=y; + double zz=z; + TransfromeCoordViewWorld(xx,yy,zz); + + bool ok1=false; + bool ok2=false; + double ddx=GetRange(); + double ddy=GetRange(); + + if ((xx>px1-ddx)&&(xxpy1-ddy)&&(yypx1+ddx)&&(xxpy1+ddy)&&(yyGetSizeLstPoints()==2){ + mp = _manContModel->GetManualPoint(0); + _dp0[0]= mp->GetX() - XX; + _dp0[1]= mp->GetY() - YY; + _dp0[2]= mp->GetZ(); + + mp = _manContModel->GetManualPoint(1); + _dp1[0]= mp->GetX() - XX; + _dp1[1]= mp->GetY() - YY; + _dp1[2]= mp->GetZ(); +/* + mp = _manContModel->GetManualPoint(2); + _dp2[0]= mp->GetX() - XX; + _dp2[1]= mp->GetY() - YY; + _dp2[2]= mp->GetZ(); + + mp = _manContModel->GetManualPoint(3); + _dp3[0]= mp->GetX() - XX; + _dp3[1]= mp->GetY() - YY; + _dp3[2]= mp->GetZ(); +*/ + } +} + + +// ---------------------------------------------------------------------------- +void manualViewCircle::MoveContour(int x, int y, int z) // virtual +{ + manualPoint *mp; + double XX=x; + double YY=y; + double ZZ=z; + TransfromeCoordViewWorld(XX,YY,ZZ); + + mp = _manContModel->GetManualPoint(0); + mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]); + + mp = _manContModel->GetManualPoint(1); + mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]); + +// mp = _manContModel->GetManualPoint(2); +// mp->SetPoint(_dp2[0]+XX,_dp2[1]+YY,_dp0[2]); + +// mp = _manContModel->GetManualPoint(3); +// mp->SetPoint(_dp3[0]+XX,_dp3[1]+YY,_dp0[2]); + + UpdateViewPoint(0); + UpdateViewPoint(1); +// UpdateViewPoint(2); +// UpdateViewPoint(3); + +} + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// AD:02-09 + +manualViewLine::manualViewLine() +{ + _sizePointsContour=20; +} +// ---------------------------------------------------------------------------- +manualViewLine::~manualViewLine() +{ +} + + +// ---------------------------------------------------------------------------- +manualViewLine * manualViewLine :: Clone() +{ + manualViewLine * clone = new manualViewLine(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualViewLine::CopyAttributesTo( manualViewLine * cloneObject) +{ + // Fathers object + manualViewBaseContour::CopyAttributesTo(cloneObject); +} + +// ---------------------------------------------------------------------------- +int manualViewLine::GetType() // virtual +{ + return 6; +} + + +// ---------------------------------------------------------------------------- + +void manualViewLine::InitMove(int x, int y, int z) // virtual +{ + manualPoint *mp; + double XX=x; + double YY=y; + double ZZ=z; + TransfromeCoordViewWorld(XX,YY,ZZ); + + if (_manContModel->GetSizeLstPoints()==2) + { + mp = _manContModel->GetManualPoint(0); + _dp0[0]= mp->GetX() - XX; + _dp0[1]= mp->GetY() - YY; + _dp0[2]= mp->GetZ(); + + mp = _manContModel->GetManualPoint(1); + _dp1[0]= mp->GetX() - XX; + _dp1[1]= mp->GetY() - YY; + _dp1[2]= mp->GetZ(); + + } +} + + +// ---------------------------------------------------------------------------- +void manualViewLine::MoveContour(int x, int y, int z) // virtual +{ + manualPoint *mp; + double XX=x; + double YY=y; + double ZZ=z; + TransfromeCoordViewWorld(XX,YY,ZZ); + + mp = _manContModel->GetManualPoint(0); + mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]); + + mp = _manContModel->GetManualPoint(1); + mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]); + + + UpdateViewPoint(0); + UpdateViewPoint(1); +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +manualViewBaseContour::manualViewBaseContour() +{ + _show_text = true; + _textActor = NULL; + _manContModel = NULL; + _wxvtkbaseview = NULL; + _selected = false; + _posibleSelected = false; + _viewControlPoints = false; + _pts = NULL; + _pd = NULL; + _contourVtkActor = NULL; + _bboxMapper = NULL; + _range = 1; + _sizePointsContour = 100; + _spc[0] = 1; + _spc[1] = 1; + _spc[2] = 1; + + _coulorEdit_r = 1; + _coulorEdit_g = 1; + _coulorEdit_b = 0; + + _coulorNormal_r = 1; + _coulorNormal_g = 0; + _coulorNormal_b = 1; + + _coulorSelection_r = 0; + _coulorSelection_g = 1; + _coulorSelection_b = 0; + + _widthline = 1; + +} +// ---------------------------------------------------------------------------- +manualViewBaseContour::~manualViewBaseContour() +{ + int i,size=_lstViewPoints.size(); + for (i=0;iGetRenderer(); // JPRx ?? + //Adding the spline + AddSplineActor(); + + AddTextActor(); + //Adding each control point + if( ifControlPoints ) + AddControlPoints(); + RefreshContour(); + Refresh(); +} +// --------------------------------------------------------------------------- + +void manualViewBaseContour :: RemoveCompleteContourActor() +{ + /*vtkRenderer * theRenderer =*/ _wxvtkbaseview->GetRenderer(); // JPRx ?? + //Removing the spline + RemoveSplineActor(); + RemoveTextActor(); + + //Removing each point + RemoveControlPoints(); + RefreshContour(); + Refresh(); +} +// --------------------------------------------------------------------------- +manualViewBaseContour * manualViewBaseContour :: Clone( )//virtual +{ + manualViewBaseContour * clone = new manualViewBaseContour(); + CopyAttributesTo(clone); + return clone; + +} + +// --------------------------------------------------------------------------- + +void manualViewBaseContour::CopyAttributesTo( manualViewBaseContour * cloneObject) +{ + // Fathers object + //XXXX::CopyAttributesTo(cloneObject); + + cloneObject-> SetWxVtkBaseView( this->_wxvtkbaseview ); + cloneObject-> SetSelected( this->GetSelected() ); + cloneObject-> SetPosibleSelected( this->GetPosibleSelected() ); + cloneObject-> SetIfViewControlPoints( this->GetIfViewControlPoints() ); + cloneObject-> SetRange( this->GetRange() ); + cloneObject-> SetZ( this->GetZ() ); + cloneObject-> SetSpacing( _spc ); + cloneObject-> SetColorNormalContour( _coulorNormal_r, _coulorNormal_g, _coulorNormal_b ); + cloneObject-> SetColorEditContour( _coulorEdit_r, _coulorEdit_g, _coulorEdit_b ); + cloneObject-> SetColorSelectContour( _coulorSelection_r, _coulorSelection_g, _coulorSelection_b ); + + int i, size = _lstViewPoints.size(); + for ( i=0; iAddPoint( ); + } +} + +// ---------------------------------------------------------------------------- +void manualViewBaseContour :: AddSplineActor() +{ + vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); + if (_contourVtkActor!=NULL) + theRenderer->AddActor( _contourVtkActor ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour :: RemoveSplineActor() // virtual +{ + vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); + if (_contourVtkActor!=NULL) + theRenderer->RemoveActor( _contourVtkActor ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour :: RemoveControlPoints() +{ + if (_wxvtkbaseview!=NULL){ + vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); + int i,size=_lstViewPoints.size(); + for (i=0;iGetVtkActor(); + theRenderer->RemoveActor( pointActor ); + } // for + } // if + SetIfViewControlPoints( false ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::AddControlPoints() +{ + vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); + SetIfViewControlPoints( true ); + if( _viewControlPoints ) + { + int i,size=_lstViewPoints.size(); + for (i=0;iGetVtkActor(); + theRenderer->AddActor( pointActor ); + } + } +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::AddTextActor() +{ + _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::RemoveTextActor() +{ + _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::DeleteVtkObjects() +{ + if ( _contourVtkActor != NULL ) { _contourVtkActor -> Delete(); } + if ( _bboxMapper != NULL ) { _bboxMapper -> Delete(); } + if ( _pts != NULL ) { _pts -> Delete(); } + if ( _pd != NULL ) { _pd -> Delete(); } + _contourVtkActor = NULL; + _bboxMapper = NULL; + _pts = NULL; + _pd = NULL; +} + + +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetWidthLine(double width) +{ + _widthline = width; + this->UpdateColorActor(); + + // for the control points + int id, size = _lstViewPoints.size(); + for( id=0; id_lstViewPoints[id]->SetWidthLine(_widthline); + } + +} + +// ---------------------------------------------------------------------------- +double manualViewBaseContour::GetWidthLine() +{ + return _widthline; +} + +// ---------------------------------------------------------------------------- +void manualViewBaseContour::ConstructVTKObjects() +{ +//JSTG 29-02-08 ----------------------------------------------- + //int i , nps = _sizePointsContour; + int i; + int nps = _manContModel->GetNumberOfPointsSpline(); +//------------------------------------------------------------- + DeleteVtkObjects(); + _pts = vtkPoints::New(); + _pts->SetNumberOfPoints(nps); + + for (i=0 ; iSetPoint(i, 0 , 0 , 0 ); + } + // This is for the boundaring inicialisation + +//EED 29Mars2009 + _pts->SetPoint(0, 0 , 0 , -1000 ); + _pts->SetPoint(1, 0 , 0 , 1000 ); +// _pts->SetPoint(0, -1000 , -1000 , -1000 ); +// _pts->SetPoint(1, 1000 , 1000 , 1000 ); + + + vtkCellArray *lines = vtkCellArray::New(); + lines->InsertNextCell( nps /* +1 */ ); + for ( i=0 ; iInsertCellPoint(i % nps ); + } + + _pd = vtkPolyData::New(); + _pd->SetPoints( _pts ); + _pd->SetLines( lines ); + lines->Delete(); //do not delete lines ?? + + _contourVtkActor = vtkActor::New(); + _bboxMapper = vtkPolyDataMapper::New(); + _bboxMapper->ScalarVisibilityOff( ); + + _bboxMapper->SetInput(_pd); + _bboxMapper->ImmediateModeRenderingOn(); + _contourVtkActor->SetMapper(_bboxMapper); + _contourVtkActor->GetProperty()->BackfaceCullingOff(); + + UpdateColorActor(); + + _pd->ComputeBounds(); + + // Text + _textActor = vtkTextActor::New(); +// _textActor->SetDisplayPosition(200, 200); + _textActor->SetInput("00"); + // Set coordinates to match the old vtkScaledTextActor default value +// _textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport(); +// _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 ); + _textActor->GetPositionCoordinate()->SetCoordinateSystemToWorld (); +// _textActor->GetPositionCoordinate()->SetValue( 0.8 , 0.8 ); + + vtkTextProperty *tprop = _textActor->GetTextProperty(); + tprop->SetFontSize(14); + tprop->SetFontFamilyToArial(); + tprop->SetColor(0, 0, 1); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::CreateNewContour() +{ + ConstructVTKObjects(); + /* + _wxvtkbaseview->GetRenderer()->AddActor( _contourVtkActor ); + _wxvtkbaseview->GetRenderer()->AddActor2D(_textActor);*/ + AddCompleteContourActor(); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::UpdateViewPoint(int id) // virtual +{ + manualPoint *mp = _manContModel->GetManualPoint(id); + +//EEDx6 + double XX=mp->GetX(),YY=mp->GetY(),ZZ=mp->GetZ(); +// wxVtk2DBaseView *wxvtk2Dbasevie = (wxVtk2DBaseView*)this->GetWxVtkBaseView(); +// wxvtk2Dbasevie->TransformCoordinate_spacing_ModelToView(XX,YY,ZZ); + + _lstViewPoints[id]->SetPositionXY( XX , YY ,_range, ZZ ); +} + +// ---------------------------------------------------------------------------- +void manualViewBaseContour::UpdateViewPoints() +{ + int id, size = _lstViewPoints.size(); + for( id=0; idGetWxVtkBaseView() ); + AddPoint( mvp ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::AddPoint( manualViewPoint * manualViewPoint ) +{ + _lstViewPoints.push_back( manualViewPoint ); + + // EED 3 oct 2006 + manualViewPoint->SetSpacing(_spc); + + vtkActor *actor = manualViewPoint->CreateVtkPointActor(); + _wxvtkbaseview->GetRenderer()->AddActor( actor ); +} + +// ---------------------------------------------------------------------------- +void manualViewBaseContour::InsertPoint(int id) +{ + manualViewPoint *mvp = new manualViewPoint( this->GetWxVtkBaseView() ); + +// EED 3 oct 2006 + mvp->SetSpacing(_spc); + + std::vector::iterator itNum = _lstViewPoints.begin() + id; + _lstViewPoints.insert(itNum,mvp); + _wxvtkbaseview->GetRenderer()->AddActor( mvp->CreateVtkPointActor() ); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::DeleteContour() +{ + RemoveCompleteContourActor(); + /*if (_contourVtkActor!=NULL){ + _wxvtkbaseview->GetRenderer()->RemoveActor( _contourVtkActor ); + }*/ + DeleteVtkObjects(); + int i,size=_lstViewPoints.size(); + for (i=0;i=0) && (idDeletePickList(mvp->GetVtkActor()); + _wxvtkbaseview->GetRenderer()->RemoveActor( mvp->GetVtkActor() ); + std::vector::iterator itNum = _lstViewPoints.begin() + id; + _lstViewPoints.erase(itNum); + delete mvp; + Refresh(); + } +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::DeletePoint(int x, int y, int z) +{ + int id=GetIdPoint(x,y,z); + if (id!=-1){ + DeletePoint(id); + } +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetSelected(bool selected) +{ + _selected=selected; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetPosibleSelected(bool posibleSelected) +{ + _posibleSelected=posibleSelected; +} +// ---------------------------------------------------------------------------- +bool manualViewBaseContour::GetEditable() +{ + return *_editable; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetEditable( bool * condition ) +{ + _editable = condition; +} +// ---------------------------------------------------------------------------- +bool manualViewBaseContour::GetSelected() +{ + return _selected; +} +// ---------------------------------------------------------------------------- +bool manualViewBaseContour::GetPosibleSelected() +{ + return _posibleSelected; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::DeleteSelectedPoints() +{ + int i,size=_lstViewPoints.size(); + for (i=size-1;i>=0;i--){ + if (_lstViewPoints[i]->GetSelected()==true){ + DeletePoint(i); + } + } + Refresh(); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SelectPoint(int i, bool select) +{ + _lstViewPoints[i]->SetSelected(select); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SelectLstPoints() +{ + // ToDo +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SelectAllPoints(bool select) +{ + int i,size=_lstViewPoints.size(); + for (i=0;iSetPosibleSelected(select); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetPointSelected(int id,bool select) +{ + _lstViewPoints[id]->SetSelected(select); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SelectAllPossibleSelected(bool select) +{ + int i,size=_lstViewPoints.size(); + for (i=0;i_lstViewPoints.size()>=2) ) + { + if (ifTouchContour(x,y,z)==true) + { + result=true; + SetPosibleSelected(result); + } + } + + if (GetEditable()==false) + { + if (ifTouchContour(x,y,z)==true) + { + result=true; + SetPosibleSelected(result); + } + } + + + } + return result; +} +// ---------------------------------------------------------------------------- +bool manualViewBaseContour::ifTouchContour(int x,int y, int z) // virtual +{ + return false; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::UnSelectPoint(int i){ + _lstViewPoints[i]->SetSelected(false); + Refresh(); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::UnSelectLstPoints(){ + // ToDo +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::UnSelectAllPoints(){ + int i,size=_lstViewPoints.size(); + for (i=0;iGetPoint(i,pp); + vx[i]=pp[0]; + } + return vx; +} +// ---------------------------------------------------------------------------- +double* manualViewBaseContour::GetVectorPointsYManualContour() +{ + double pp[3]; + int i,size = _sizePointsContour; + double *vy = (double*)malloc(sizeof(double)*size); + for (i=0;iGetPoint(i,pp); + vy[i]=pp[1]; + } + return vy; +} +// ---------------------------------------------------------------------------- +double* manualViewBaseContour::GetVectorPointsZManualContour() +{ + double pp[3]; + int i,size = _sizePointsContour; + double *vz = (double*)malloc(sizeof(double)*size); + for (i=0;iGetPoint(i,pp); + vz[i]=pp[2]; + } + return vz; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::Refresh() // virtual +{ + if (_contourVtkActor!=NULL){ + RefreshContour(); + } + int i,size=_lstViewPoints.size(); + for (i=0;iUpdateColorActor(); + } + UpdateColorActor(); + + if (_show_text==true) + { + RefreshText(); + } + + vtkRenderWindowInteractor *vri = _wxvtkbaseview->GetWxVTKRenderWindowInteractor (); + if (vri==NULL) + { + _wxvtkbaseview->GetRenWin()->Render(); + } + +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::RefreshText() // virtual +{ + if( _textActor!=NULL) + _textActor -> SetInput("00"); +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetColorNormalContour(double r, double g, double b) +{ + _coulorNormal_r = r; + _coulorNormal_g = g; + _coulorNormal_b = b; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::GetColorNormalContour(double &r, double &g, double &b) +{ + r = _coulorNormal_r; + g = _coulorNormal_g; + b = _coulorNormal_b; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetColorEditContour(double r, double g, double b) +{ + _coulorEdit_r = r; + _coulorEdit_g = g; + _coulorEdit_b = b; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::GetColorEditContour(double &r, double &g, double &b) +{ + r = _coulorEdit_r; + g = _coulorEdit_g; + b = _coulorEdit_b; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetColorSelectContour(double r, double g, double b) +{ + _coulorSelection_r = r; + _coulorSelection_g = g; + _coulorSelection_b = b; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::GetColorSelectContour(double &r, double &g, double &b) +{ + r = _coulorSelection_r; + g = _coulorSelection_g; + b = _coulorSelection_b; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::UpdateColorActor() +{ + if (_contourVtkActor!=NULL) + { + _contourVtkActor->GetProperty()->SetLineWidth( _widthline ); + _contourVtkActor->GetProperty()->SetDiffuseColor( _coulorNormal_r , _coulorNormal_g , _coulorNormal_b ); + if (_posibleSelected || (_posibleSelected && GetEditable() ) ) + { + _contourVtkActor->GetProperty()->SetDiffuseColor( _coulorEdit_r , _coulorEdit_g , _coulorEdit_b ); + } + if( _selected ) + { + _contourVtkActor->GetProperty()->SetDiffuseColor( _coulorSelection_r , _coulorSelection_g , _coulorSelection_b ); + } + } +} +// ---------------------------------------------------------------------------- +int manualViewBaseContour::GetIdPoint(int x, int y, int z) // virtual +{ + int ii = -1; + if (_manContModel!=NULL){ + double xx = x; + double yy = y; + double zz = z; + TransfromeCoordViewWorld(xx,yy,zz); + ii=_manContModel->GetIdPoint(xx,yy,zz,_range,-1); + } + return ii; +} + +// ---------------------------------------------------------------------------- + + +int manualViewBaseContour::GetNumberOfPoints() +{ + return _lstViewPoints.size(); +} + +// ---------------------------------------------------------------------------- + +//JSTG 25-02-08 --------------------------------------------------------------- +/*int manualViewBaseContour::GetNumberOfPointsSpline() +{ + return _sizePointsContour; +}*/ +//---------------------------------------------------------------------------- + +//JSTG 25-02-08 --------------------------------------------------------------- +/*void manualViewBaseContour::SetNumberOfPointsSpline(int size) +{ + _sizePointsContour = size; +}*/ +//---------------------------------------------------------------------------- +// virtual +void manualViewBaseContour::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // Virtual +{ + _wxvtkbaseview->TransfromeCoordScreenToWorld(X, Y, Z, type); + + +//EED 27 sep 2007 +// //EEDx6 +// wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*)_wxvtkbaseview; +// wxvtk2Dbaseview->TransformCoordinate_spacing_ModelToView(X,Y,Z); + +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetRange(int range) +{ + _range=range; +} +// ---------------------------------------------------------------------------- +int manualViewBaseContour::GetRange() +{ + return _range; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetZ(int z) +{ +// _Z=z; +} +// ---------------------------------------------------------------------------- +int manualViewBaseContour::GetZ() +{ +// return _Z; + return 0; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::InitMove(int x, int y, int z) // virtual +{ + +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::MoveContour(int x, int y, int z) // virtual +{ +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::MoveContour(int horizontalUnits, int verticalUnits )// virtual +{ + +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::GetMinMax( double &minX,double &minY, double &minZ, double &maxX, double &maxY, double &maxZ )// virtual +{ + double pp[3]; + manualPoint *mp; + int i; + int size=_manContModel->GetSizeLstPoints(); + minX=99999; + minY=99999; + maxX=-99999; + maxY=-99999; + bool ifFindZ = minZ!=-1.0 && maxZ!=-1.0; + if ( ifFindZ ) + { + minZ=99999; + maxZ=-99999; + } + for( i = 0; i < size; i++ ) + { + mp=_manContModel->GetManualPoint(i); + pp[0]=mp->GetX(); + pp[1]=mp->GetY(); + if ( ifFindZ ) + pp[2]=mp->GetZ(); + + // min X + if (pp[0]maxX) + { + maxX=pp[0]; + } + // max Y + if (pp[1]>maxY) + { + maxY=pp[1]; + } + if ( ifFindZ ) + { + // min Z + if (pp[2]maxZ) + { + maxZ=pp[2]; + } + } + } + if ( size<1 ) + { + minX = 0; + maxX = 0; + + minY = 0; + maxY = 0; + + minZ = 0; + maxZ = 0; + } +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::ClearContour() +{ + if (_contourVtkActor!=NULL){ + _wxvtkbaseview->GetRenderer()->RemoveActor( _contourVtkActor ); + } + DeleteVtkObjects(); + int i,size=_lstViewPoints.size(); + for (i=0;iGetVtkActor(); + actor->GetProperty()->SetOpacity( opacity ); + } + _contourVtkActor->GetProperty()->SetOpacity( opacity ); + _textActor->GetProperty()->SetOpacity( opacity ); + _textActor->SetInput("00"); + +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetShowText(bool ok) +{ + _show_text = ok; + if (_show_text==false) + { + _textActor->SetInput("00"); + } +} +// ---------------------------------------------------------------------------- +wxVtkBaseView *manualViewBaseContour::GetWxVtkBaseView() +{ + return this->_wxvtkbaseview; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::GetSpacing(double spc[3]) +{ + spc[0] = _spc[0]; + spc[1] = _spc[1]; + spc[2] = _spc[2]; +} +// ---------------------------------------------------------------------------- +void manualViewBaseContour::SetSpacing(double spc[3]) +{ + _spc[0] = spc[0]; + _spc[1] = spc[1]; + _spc[2] = spc[2]; +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// _type = 0 Sagital +// _type = 1 Coronal +// _type = 2 Axial +// _type = -1 View 3D + +manualContour3VControler::manualContour3VControler(int type) +{ + _type=type; + +//EEDhh +// _manViewBaseCont1 = NULL; +// _manViewBaseCont2 = NULL; +// _manViewBaseCont3 = NULL; +} +//---------------------------------------------------------------------------- +manualContour3VControler::~manualContour3VControler() +{ +} + +// ---------------------------------------------------------------------------- +manualContour3VControler * manualContour3VControler :: Clone() // virtual +{ + manualContour3VControler * clone = new manualContour3VControler( this->GetType() ); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualContour3VControler::CopyAttributesTo( manualContour3VControler * cloneObject) +{ + // Fathers object + manualContourControler::CopyAttributesTo(cloneObject); + + cloneObject->SetVtkMPRBaseData( this->GetVtkMPRBaseData() ); + + // Remember to add ManualViewBaseContour with "AddManualViewBaseContour" + +} +// ---------------------------------------------------------------------------- +int manualContour3VControler::GetType() +{ + return _type; +} + +// ---------------------------------------------------------------------------- +void manualContour3VControler::AddPoint_Others() +{ + manualViewBaseContour *mvbc; + int i,size=this->_lstManualViewBaseContour.size(); + for ( i = 0 ; i < size ; i++ ) + { + mvbc = _lstManualViewBaseContour[i]; + mvbc->AddPoint(); + } + +// EEDhh +// if (_manViewBaseCont1!=NULL){ +// _manViewBaseCont1->AddPoint(); +// _manViewBaseCont2->AddPoint(); +// _manViewBaseCont3->AddPoint(); +// this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); +// } + + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::AddPoint( int x, int y, int z ) // virtual +{ + + z=(int)_vtkmprbasedata->GetZ(); + if (GetManualContourModel()!=NULL){ + double xx = x; + double yy = y; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz,_type); + + if (_type==0) + { + xx=_vtkmprbasedata->GetX(); + } + + if (_type==1) + { + yy=_vtkmprbasedata->GetY(); + } + + + /*int id = */ GetManualContourModel()->AddPoint(xx,yy,zz); // JPRx + GetManualViewBaseContour()->AddPoint(); + AddPoint_Others(); + + } +} + +// ---------------------------------------------------------------------------- +void manualContour3VControler::InsertPoint_Others(int id) +{ + + manualViewBaseContour *mvbc; + int i,size=this->_lstManualViewBaseContour.size(); + for ( i = 0 ; i < size ; i++ ) + { + mvbc = _lstManualViewBaseContour[i]; + mvbc->InsertPoint(id); + } + +/*EEDhh + if (_manViewBaseCont1!=NULL){ + _manViewBaseCont1->InsertPoint(id); + _manViewBaseCont2->InsertPoint(id); + _manViewBaseCont3->InsertPoint(id); + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + } +*/ + + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::InsertPoint(int x, int y, int z) +{ + int id=-1; + if (GetManualContourModel()!=NULL){ + if (GetManualContourModel()->GetSizeLstPoints()>1){ + z=(int)_vtkmprbasedata->GetZ(); + double xx = x; + double yy = y; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz,_type); + if (_type==0) + { + xx=_vtkmprbasedata->GetX(); + } + + if (_type==1) + { + yy=_vtkmprbasedata->GetY(); + } + + id = GetManualContourModel()->InsertPoint(xx,yy,zz); + + GetManualViewBaseContour()->InsertPoint(id); + InsertPoint_Others(0); + + } else { + AddPoint(x,y,z); + } + } +} +// ---------------------------------------------------------------------------- + +// EEDhh +/* +void manualContour3VControler::SetModelView ( manualContourModel *manContModel, + manualViewBaseContour *manViewBaseCont0, + manualViewBaseContour *manViewBaseCont1, + manualViewBaseContour *manViewBaseCont2, + manualViewBaseContour *manViewBaseCont3) +{ + manualContourControler::SetModelView(manContModel,manViewBaseCont0); + _manViewBaseCont1 = manViewBaseCont1; + _manViewBaseCont2 = manViewBaseCont2; + _manViewBaseCont3 = manViewBaseCont3; +} +*/ + +// ---------------------------------------------------------------------------- +void manualContour3VControler::AddManualViewBaseContour( manualViewBaseContour *manViewBaseCont ) +{ + _lstManualViewBaseContour.push_back( manViewBaseCont ); +} + +// ---------------------------------------------------------------------------- +void manualContour3VControler::SetVtkMPRBaseData (vtkMPRBaseData *vtkmprbasedata ) +{ + _vtkmprbasedata=vtkmprbasedata; +} +// ---------------------------------------------------------------------------- +vtkMPRBaseData *manualContour3VControler::GetVtkMPRBaseData() +{ + return _vtkmprbasedata; +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::SetPoint( int id ,int x ,int y ,int z ) // virtual +{ + z=(int)_vtkmprbasedata->GetZ(); + if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ + double xx = x; + double yy = y; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz,_type); + + if (_type==0) + { + xx=_vtkmprbasedata->GetX(); + } + if (_type==1) + { + yy=_vtkmprbasedata->GetY(); + } + + manualPoint *mp = GetManualContourModel()->GetManualPoint(id); + mp->SetPoint(xx,yy,zz); + + } +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::DeleteActualMousePoint_Others(int id) +{ + manualViewBaseContour *mvbc; + int i,size=this->_lstManualViewBaseContour.size(); + for ( i = 0 ; i < size ; i++ ) + { + mvbc = _lstManualViewBaseContour[i]; + mvbc->DeletePoint(id); + mvbc->Refresh(); + } + +/* + if (_manViewBaseCont1!=NULL){ + _manViewBaseCont1->DeletePoint(id); + _manViewBaseCont2->DeletePoint(id); + _manViewBaseCont3->DeletePoint(id); + + _manViewBaseCont1->Refresh(); + _manViewBaseCont2->Refresh(); + _manViewBaseCont3->Refresh(); + + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + } +*/ + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::DeleteActualMousePoint(int x, int y)// virtual +{ + int id=GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() ); + if (id!=-1){ + manualContourBaseControler::DeleteActualMousePoint( x , y ); + DeleteActualMousePoint_Others( id ); + } +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::MouseMove_Others(int id) // virtual +{ + manualViewBaseContour *mvbc; + int i,size=this->_lstManualViewBaseContour.size(); + for ( i = 0 ; i < size ; i++ ) + { + mvbc = _lstManualViewBaseContour[i]; + mvbc->SelectAllPossibleSelected(false); + if (id!=-1) + { + mvbc->SetPointPosibleSelected(id,true); + } + mvbc->SetPosibleSelected ( GetManualViewBaseContour()->GetPosibleSelected() ); + mvbc->Refresh(); + } + +// EEDhh +/* + if (_manViewBaseCont1!=NULL){ + _manViewBaseCont1->SelectAllPossibleSelected(false); + _manViewBaseCont2->SelectAllPossibleSelected(false); + _manViewBaseCont3->SelectAllPossibleSelected(false); + if (id!=-1){ + _manViewBaseCont1->SetPointPosibleSelected(id,true); + _manViewBaseCont2->SetPointPosibleSelected(id,true); + _manViewBaseCont3->SetPointPosibleSelected(id,true); + } + _manViewBaseCont1->SetPosibleSelected ( GetManualViewBaseContour()->GetPosibleSelected() ); + _manViewBaseCont2->SetPosibleSelected ( GetManualViewBaseContour()->GetPosibleSelected() ); + _manViewBaseCont3->SetPosibleSelected ( GetManualViewBaseContour()->GetPosibleSelected() ); + + _manViewBaseCont1->Refresh(); + _manViewBaseCont2->Refresh(); + _manViewBaseCont3->Refresh(); + + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + } +*/ + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + +} + +// ---------------------------------------------------------------------------- +void manualContour3VControler::MouseMove(int x, int y) // virtual +{ + manualContourControler::MouseMove( x , y ); + int id=GetManualViewBaseContour()->GetIdPoint(x,y,GetZ()); + MouseMove_Others( id ); +} + +// ---------------------------------------------------------------------------- +void manualContour3VControler::OnChar_Others() +{ + manualViewBaseContour *mvbc; + int i,size=this->_lstManualViewBaseContour.size(); + for ( i = 0 ; i < size ; i++ ) + { + mvbc = _lstManualViewBaseContour[i]; + mvbc->Refresh(); + } +// EEDhh +/* + _manViewBaseCont1->Refresh(); + _manViewBaseCont2->Refresh(); + _manViewBaseCont3->Refresh(); +*/ + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); +} +// ---------------------------------------------------------------------------- +bool manualContour3VControler::OnChar() +{ + manualContourControler::OnChar(); + OnChar_Others(); + return true; +} +// ---------------------------------------------------------------------------- +void manualContour3VControler::ResetContour() // virtual +{ + manualContourControler::ResetContour(); + ResetContour_Others(); +} + +// ---------------------------------------------------------------------------- +void manualContour3VControler::ResetContour_Others() +{ + manualViewBaseContour *mvbc; + int i,size=this->_lstManualViewBaseContour.size(); + for ( i = 0 ; i < size ; i++ ) + { + mvbc = _lstManualViewBaseContour[i]; + mvbc->DeleteContour(); + mvbc->CreateNewContour(); + } + +// EEDhh +/* + _manViewBaseCont1->DeleteContour(); + _manViewBaseCont2->DeleteContour(); + _manViewBaseCont3->DeleteContour(); + _manViewBaseCont1->CreateNewContour(); + _manViewBaseCont2->CreateNewContour(); + _manViewBaseCont3->CreateNewContour(); +*/ +} + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +manualContour3DControler::manualContour3DControler() +{ +} +// ---------------------------------------------------------------------------- +manualContour3DControler::~manualContour3DControler() +{ +} +// ---------------------------------------------------------------------------- +manualContour3DControler * manualContour3DControler :: Clone() // virtual +{ + manualContour3DControler * clone = new manualContour3DControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualContour3DControler::CopyAttributesTo( manualContour3DControler * cloneObject) +{ + // Fathers object + manualContourControler::CopyAttributesTo(cloneObject); + + cloneObject->SetVtkMPRBaseData( this->GetVtkMPRBaseData() ); +} + +// ---------------------------------------------------------------------------- +bool manualContour3DControler::OnLeftButtonDown() +{ + int X,Y; + wxVTKRenderWindowInteractor *wxVTKiren; + wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor(); + wxVTKiren->GetEventPosition(X,Y); + MouseClickLeft(X,Y); + return true; +} +// ---------------------------------------------------------------------------- +void manualContour3DControler::ResetOrientationPlane() +{ + double p[3],rp[3],rn[3]; + p[0] = this->GetVtkMPRBaseData()->GetX( ); + p[1] = this->GetVtkMPRBaseData()->GetY( ); + p[2] = this->GetVtkMPRBaseData()->GetZ( ); + this->GetManualContourModel()->GetNearestPointAndNormal(p,rp,rn); + this->GetVtkMPRBaseData()->SetNormal(rn[0],rn[1],rn[2]); +} +// ---------------------------------------------------------------------------- +void manualContour3DControler::MouseClickLeft(int x, int y) // virtual +{ + manualView3DContour *manualview3Dcontour=(manualView3DContour*)GetManualViewBaseContour(); + int id=manualview3Dcontour->GetIdPoint2(x,y); + if ( (GetState()==0) && (id!=-1) ) + { + manualPoint *mp = this->GetManualContourModel()->GetManualPoint(id); + + this->GetVtkMPRBaseData()->SetX( mp->GetX() ); + this->GetVtkMPRBaseData()->SetY( mp->GetY() ); + this->GetVtkMPRBaseData()->SetZ( mp->GetZ() ); + ResetOrientationPlane(); + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + } + + + manualContourControler::MouseClickLeft(x,y); + +} +// ---------------------------------------------------------------------------- +bool manualContour3DControler::OnChar() +{ + bool ok=true; + manualContourControler::OnChar(); + char keyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode(); + if (keyCode==32){ + ok=false; + ResetOrientationPlane(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } + return ok; +} + +// ---------------------------------------------------------------------------- +void manualContour3DControler::SetVtkMPRBaseData (vtkMPRBaseData *vtkmprbasedata ) +{ + _vtkmprbasedata=vtkmprbasedata; +} +// ---------------------------------------------------------------------------- +vtkMPRBaseData *manualContour3DControler::GetVtkMPRBaseData() +{ + return _vtkmprbasedata; +} + +// ---------------------------------------------------------------------------- +void manualContour3DControler::InsertPoint(int x, int y, int z ) // virtual +{ + manualContourControler::InsertPoint( x, y, z ); + ResetOrientationPlane(); +} + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +manualContour3V3DControler::manualContour3V3DControler() +{ +} +// ---------------------------------------------------------------------------- +manualContour3V3DControler::~manualContour3V3DControler() +{ +} + +// ---------------------------------------------------------------------------- +manualContour3V3DControler * manualContour3V3DControler :: Clone() // virtual +{ + manualContour3V3DControler * clone = new manualContour3V3DControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualContour3V3DControler::CopyAttributesTo( manualContour3V3DControler * cloneObject) +{ + // Fathers object + manualContour3DControler::CopyAttributesTo(cloneObject); + + cloneObject->SetManualContour3VControler( this->GetManualContour3VControler() ); +} +// ---------------------------------------------------------------------------- +void manualContour3V3DControler::InsertPoint(int x, int y, int z ) // virtual +{ + manualContour3DControler::InsertPoint( x, y, z ); + _manualcontour3Vcontroler->InsertPoint_Others(0); +} +// ---------------------------------------------------------------------------- +void manualContour3V3DControler::AddPoint( int x, int y, int z ) +{ + manualContour3DControler::AddPoint( x, y, z ); + _manualcontour3Vcontroler->AddPoint_Others(); +} +// ---------------------------------------------------------------------------- +void manualContour3V3DControler::DeleteActualMousePoint(int x, int y) +{ + int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() ); + manualContour3DControler::DeleteActualMousePoint( x , y ); + _manualcontour3Vcontroler->DeleteActualMousePoint_Others(id); +} +// ---------------------------------------------------------------------------- +void manualContour3V3DControler::MouseMove( int x, int y ) +{ + int ss =this->_vtkInteractorStyleBaseView->vtkInteractorStyle::GetState(); + if ((this->GetState()!=7) && (ss!=1)){ + manualContour3DControler::MouseMove( x , y ); + int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() ); + _manualcontour3Vcontroler->MouseMove_Others(id); + } +} +// ---------------------------------------------------------------------------- +void manualContour3V3DControler::SetManualContour3VControler(manualContour3VControler *manualcontour3Vcontroler) +{ + _manualcontour3Vcontroler = manualcontour3Vcontroler; +} +// ---------------------------------------------------------------------------- +manualContour3VControler *manualContour3V3DControler::GetManualContour3VControler() +{ + return _manualcontour3Vcontroler; +} +// ---------------------------------------------------------------------------- +bool manualContour3V3DControler::OnChar() // virtual +{ + if (manualContour3DControler::OnChar()==false ) + { + _manualcontour3Vcontroler->OnChar_Others(); + } + return true; +} + +// ---------------------------------------------------------------------------- +void manualContour3V3DControler::ResetContour() // virtual +{ + manualContourControler::ResetContour(); + _manualcontour3Vcontroler->ResetContour_Others(); +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// _state = 0 // ..nothing.. +// _state = 1 // move with add point +// _state = 5 // move +// _state = 6 // move with insert point +// _state = 7 // move with non selection + +manualContourControler::manualContourControler() +{ + _easyCreation = true; + +} +// ---------------------------------------------------------------------------- +manualContourControler::~manualContourControler() +{ +} +// ---------------------------------------------------------------------------- +manualContourControler * manualContourControler :: Clone() // virtual +{ + manualContourControler * clone = new manualContourControler(); + CopyAttributesTo(clone); + return clone; +} +// --------------------------------------------------------------------------- +void manualContourControler::CopyAttributesTo( manualContourControler * cloneObject) +{ + // Fathers object + manualContourBaseControler::CopyAttributesTo(cloneObject); + cloneObject->SetEasyCreation( this->GetEasyCreation() ); +} + +// ---------------------------------------------------------------------------- +void manualContourControler::Configure() //virtual +{ + // this->_manContModel->SetNumberOfPointsSpline(100); +} + +// ---------------------------------------------------------------------------- +void manualContourControler::MouseClickLeft(int x, int y){ + + + bool ok = false; + int z = GetZ(); + int size= GetManualViewBaseContour()->GetNumberOfPoints(); + + // Insert a Control Point with shift+ClickLeft + // int tt = GetState(); // JPRx + vtkRenderWindowInteractor *vtkrenderwindowinteractor = _vtkInteractorStyleBaseView->GetInteractor(); +//EED3131 + if( IsEditable() ) + { + if ( (_vtkInteractorStyleBaseView!=NULL) && (GetState()==0) && ( (vtkrenderwindowinteractor!=NULL) && (vtkrenderwindowinteractor->GetShiftKey()==1) ) ) + { + ok=true; + InsertPoint(x,y,z); + size++; + } + // Start to Insert Control Points with ClickLeft (Empty contour) + if ((GetState()==0) && (size==0) && (_easyCreation==true) ) + { + ok=true; + SetState(1); + AddPoint(x,y,z); + } + // Continuie to Insert Control Points with ClickLeft (After being empty the contour) + if ((GetState()==1) && (_easyCreation==true) ) + { + ok=true; + AddPoint(x,y,z); + _bakIdPoint=GetNumberOfPointsManualContour() - 1; + } + // Insert Control Points IF Contour si Selected + if ((GetState()==0) && GetManualViewBaseContour()->GetPosibleSelected() ) + { + ok=true; + InsertPoint(x,y,z); + _bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(6); + } + // Chose id of Control Point to be move + if ( (GetState()==0 || GetState()==6) && (GetManualViewBaseContour()->GetIdPoint(x,y,z)!=-1 ) ) + { + ok=true; + _bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } + // If nothing selected _state=7 + if ( (GetState()==0) && (GetManualViewBaseContour()->GetIdPoint(x,y,z)==-1 ) ) + { + //ok=true; + _bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(7); + } + }else{ + SetPosibleToMove( true ); + GetManualViewBaseContour()->SetSelected( GetManualViewBaseContour()->GetPosibleSelected() ); + } // IsEditable + + if ( GetState() == 0 && GetManualViewBaseContour()->GetPosibleSelected() ) + { + SetMoving( true ); + ok=true; + GetManualViewBaseContour()->InitMove(x,y,z); + SetState(6); + } + if (ok==true) + { + GetManualViewBaseContour()->Refresh(); + } +} +// ---------------------------------------------------------------------------- +void manualContourControler::MouseMove(int x, int y) // virtual +{ + int z=GetZ(); + GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); + GetManualViewBaseContour()->SelectPosibleContour(x,y,z); + if (GetState()==1){ SetPoint( _bakIdPoint , x , y ,z); } + if (GetState()==5){ SetPoint( _bakIdPoint , x , y ,z); } + if ( GetState()==6 && !IsEditable() && GetPosibleToMove() &&IsMoving() ) + { + GetManualViewBaseContour()->MoveContour(x,y,z); + } + if (GetState()!=7 || GetManualViewBaseContour()->GetPosibleSelected() ){ + GetManualViewBaseContour()->Refresh(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } + if (!IsEditable()) + { + GetManualViewBaseContour()->RemoveControlPoints(); +// GetManualViewBaseContour()->RemoveTextActor(); + GetManualViewBaseContour()->Refresh(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } + +} + +// ---------------------------------------------------------------------------- +void manualContourControler::MouseDLeft( int x, int y)//virtual +{ + manualContourBaseControler::MouseDLeft( x, y); + if ( IsEditable() ) + { + GetManualViewBaseContour()->AddControlPoints(); + GetManualViewBaseContour()->AddTextActor(); + GetManualViewBaseContour()->Refresh(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } +} +// ---------------------------------------------------------------------------- +void manualContourControler::SetEasyCreation(bool easyCreation) +{ + _easyCreation=easyCreation; +} +// ---------------------------------------------------------------------------- +bool manualContourControler::GetEasyCreation() +{ + return _easyCreation; +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +manualContourPerpPlaneControler::manualContourPerpPlaneControler() +{ + _flagMouseMove = true; +} +// ---------------------------------------------------------------------------- +manualContourPerpPlaneControler::~manualContourPerpPlaneControler() +{ +} +// ---------------------------------------------------------------------------- +manualContourPerpPlaneControler * manualContourPerpPlaneControler :: Clone() // virtual +{ + manualContourPerpPlaneControler * clone = new manualContourPerpPlaneControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualContourPerpPlaneControler::CopyAttributesTo( manualContourPerpPlaneControler * cloneObject) +{ + // Fathers object + manualContourControler::CopyAttributesTo(cloneObject); + + cloneObject->SetVtkMPRBaseData( this->GetVtkMPRBaseData() ); + cloneObject->SetManualContour3VControler( this->GetManualContour3VControler() ); + cloneObject->SetVtkInteractorStylePlane2D( this->GetVtkInteractorStylePlane2D() ); +} + +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata) +{ + _vtkmprbasedata = vtkmprbasedata; +} + +// ---------------------------------------------------------------------------- +vtkMPRBaseData *manualContourPerpPlaneControler::GetVtkMPRBaseData() +{ + return _vtkmprbasedata; +} + + +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::InsertPoint(int x, int y, int z ) // virtual +{ + manualContourControler::InsertPoint( x, y, z ); + _manualcontour3Vcontroler->InsertPoint_Others(0); +} +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::AddPoint( int x, int y, int z ) +{ + manualContourControler::AddPoint( x, y, z ); + _manualcontour3Vcontroler->AddPoint_Others(); +} +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::DeleteActualMousePoint(int x, int y) +{ + int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() ); + manualContourControler::DeleteActualMousePoint( x , y ); + _manualcontour3Vcontroler->DeleteActualMousePoint_Others(id); +} +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::MouseMove( int x, int y ) +{ + _flagMouseMove = true; + int ss =this->_vtkInteractorStyleBaseView->vtkInteractorStyle::GetState(); + if ((this->GetState()!=7) && (ss!=1)){ + manualContourControler::MouseMove( x , y ); + int id = GetManualViewBaseContour()->GetIdPoint ( x , y , GetZ() ); + if (id!=-1) + { + _manualcontour3Vcontroler->MouseMove_Others(id); + _flagMouseMove = false; + } + } +} +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::SetManualContour3VControler(manualContour3VControler *manualcontour3Vcontroler) +{ + _manualcontour3Vcontroler = manualcontour3Vcontroler; +} +// ---------------------------------------------------------------------------- +manualContour3VControler * manualContourPerpPlaneControler::GetManualContour3VControler() +{ + return _manualcontour3Vcontroler; +} +// ---------------------------------------------------------------------------- +bool manualContourPerpPlaneControler::OnChar() // virtual +{ + if (manualContourControler::OnChar()==false ) + { + _manualcontour3Vcontroler->OnChar_Others(); + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourPerpPlaneControler::OnMouseMove() // virtual +{ + manualContourControler::OnMouseMove(); + return _flagMouseMove; +} +// ---------------------------------------------------------------------------- +bool manualContourPerpPlaneControler::OnLeftDClick() // virtual +{ + manualContourControler::OnLeftDClick(); + return _flagMouseDClick; +} +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::ResetContour() // virtual +{ + manualContourControler::ResetContour(); + _manualcontour3Vcontroler->ResetContour_Others(); +} + +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::MouseDLeft( int x, int y) // virtual +{ + _flagMouseDClick=true; + manualContourControler::MouseDLeft(x,y); + + if (GetManualViewBaseContour()->ifTouchContour(x,y,0)==true) + { + _flagMouseDClick = false; + _vtkinteractorstyleplane2D->OnLeftDClick(); + ResetOrientationPlane(); + this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); + } + +// int id=GetManualViewBaseContour()->GetIdPoint(x,y,GetZ()); +// if ( (GetState()==0) && (id!=-1) ) +// { +// manualPoint *mp = this->GetManualContourModel()->GetManualPoint(id); +// _vtkmprbasedata->SetX( mp->GetX() ); +// _vtkmprbasedata->SetY( mp->GetY() ); +// _vtkmprbasedata->SetZ( mp->GetZ() ); +// ResetOrientationPlane(); +// this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting(); +// } +} + + + +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::ResetOrientationPlane() +{ + double p[3],rp[3],rn[3]; + p[0] = _vtkmprbasedata->GetX( ); + p[1] = _vtkmprbasedata->GetY( ); + p[2] = _vtkmprbasedata->GetZ( ); + this->GetManualContourModel()->GetNearestPointAndNormal(p,rp,rn); + + _vtkmprbasedata->SetNormal(rn[0],rn[1],rn[2]); +} + +// ---------------------------------------------------------------------------- +void manualContourPerpPlaneControler::SetVtkInteractorStylePlane2D(InteractorStyleMaracas *vtkinteractorstyleplane2D) +{ + _vtkinteractorstyleplane2D = vtkinteractorstyleplane2D; +} +// ---------------------------------------------------------------------------- +InteractorStyleMaracas * manualContourPerpPlaneControler::GetVtkInteractorStylePlane2D() +{ + return _vtkinteractorstyleplane2D; +} + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// _state = 0 // ..nothing.. +// _state = 5 // move point +// _state = 6 // move all +// _state = 7 // Empty mouse drag + +manualRoiControler::manualRoiControler() +{ +} +// ---------------------------------------------------------------------------- +manualRoiControler::~manualRoiControler() +{ +} +// ---------------------------------------------------------------------------- +manualRoiControler * manualRoiControler :: Clone() // virtual +{ + manualRoiControler * clone = new manualRoiControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualRoiControler::CopyAttributesTo( manualRoiControler * cloneObject) +{ + // Fathers object + manualContourBaseControler::CopyAttributesTo(cloneObject); +} + +// ---------------------------------------------------------------------------- +void manualRoiControler::Configure() //virtual +{ + this->GetManualContourModel()->SetNumberOfPointsSpline(5); +} + +// ---------------------------------------------------------------------------- + +void manualRoiControler::MouseClickLeft(int x, int y){ + int z = GetZ(); + + if( IsEditable() ) + { // move control point + if ( (GetState()==0) && (GetManualViewBaseContour()->GetIdPoint(x,y,z)!=-1 ) ){ + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } + } // IsEditable + + // Move contour + if ((GetState()==0) && (GetManualViewBaseContour()->GetPosibleSelected()==true)) { + GetManualViewBaseContour()->InitMove(x,y,z); + SetState(6); + } + + // if the firs time create 4 control points and move one point + int size=GetManualViewBaseContour()->GetNumberOfPoints(); + if (GetState()==0) { + if (size==0){ + AddPoint(x,y,z); + AddPoint(x,y,z); + AddPoint(x,y,z); + AddPoint(x,y,z); + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(1); + } + } + +/*EED 21 Avril 2009 + if (GetState()==0) { + if (size==0){ + AddPoint(x,y,z); + AddPoint(x,y,z); + AddPoint(x,y,z); + AddPoint(x,y,z); + } else { + SetPoint(0,x,y,z); + SetPoint(1,x,y,z); + SetPoint(2,x,y,z); + SetPoint(3,x,y,z); + } + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } +*/ + + GetManualViewBaseContour()->Refresh(); +} + +// ---------------------------------------------------------------------------- +void manualRoiControler::MouseMove(int x, int y) // virtual +{ + int z=GetZ(); + +// this->_vtkInteractorStyleBaseView-> + + + GetManualViewBaseContour()->SelectPosibleContour(x,y,z); + GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); + + + if ( (GetState()==5) || (GetState()==1) ){ + SetPoint( bakIdPoint , x , y ,z); + if (bakIdPoint==0) + { + SetPointX( 1 , x ); + SetPointY( 3 , y ); + } + if (bakIdPoint==1) + { + SetPointX( 0 , x ); + SetPointY( 2 , y ); + } + if (bakIdPoint==2) + { + SetPointX( 3 , x ); + SetPointY( 1 , y ); + } + if (bakIdPoint==3) + { + SetPointX( 2 , x ); + SetPointY( 0 , y ); + } + } + if (GetState()==6){ + GetManualViewBaseContour()->MoveContour(x,y,z); + } + GetManualViewBaseContour()->Refresh(); +} +// ---------------------------------------------------------------------------- +void manualRoiControler::DeleteActualMousePoint(int x, int y) // virtual +{ +} +// ---------------------------------------------------------------------------- +void manualRoiControler::InitRoi(int ww, int hh, double porcentage) +{ + int zz; + manualPoint *mp; + + if (GetManualContourModel()->GetSizeLstPoints() ==0) + { + zz = GetZ(); + AddPoint(0,0,zz); + AddPoint(0,0,zz); + AddPoint(0,0,zz); + AddPoint(0,0,zz); + } + + double pp1=porcentage; + double pp2=1-porcentage; + + mp = GetManualContourModel()->GetManualPoint(2); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp1,hh*pp1,zz); + + mp = GetManualContourModel()->GetManualPoint(1); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp2,hh*pp1,zz); + + mp = GetManualContourModel()->GetManualPoint(0); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp2,hh*pp2,zz); + + mp = GetManualContourModel()->GetManualPoint(3); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp1,hh*pp2,zz); + + GetManualViewBaseContour() ->UpdateViewPoint(0); + GetManualViewBaseContour() ->UpdateViewPoint(1); + GetManualViewBaseContour() ->UpdateViewPoint(2); + GetManualViewBaseContour() ->UpdateViewPoint(3); + + SetState(0); + GetManualViewBaseContour()->Refresh(); +} + +// ---------------------------------------------------------------------------- +void manualRoiControler::SetRoi(int x1, int y1,int x2, int y2) +{ + manualPoint *mp; + InitRoi( 0 , 0 , 0.2 ); + mp = GetManualContourModel()->GetManualPoint(2); + mp->SetPointX(x1); + mp->SetPointY(y1); + + mp = GetManualContourModel()->GetManualPoint(1); + mp->SetPointX(x2); + mp->SetPointY(y1); + + mp = GetManualContourModel()->GetManualPoint(0); + mp->SetPointX(x2); + mp->SetPointY(y2); + + mp = GetManualContourModel()->GetManualPoint(3); + mp->SetPointX(x1); + mp->SetPointY(y2); + + GetManualViewBaseContour() ->UpdateViewPoint(0); + GetManualViewBaseContour() ->UpdateViewPoint(1); + GetManualViewBaseContour() ->UpdateViewPoint(2); + GetManualViewBaseContour() ->UpdateViewPoint(3); +} + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// EED08 + +// _state = 0 // ..nothing.. +// _state = 5 // move point +// _state = 6 // move all +// _state = 7 // Empty mouse drag + +manualCircleControler::manualCircleControler() +{ +} +// ---------------------------------------------------------------------------- +manualCircleControler::~manualCircleControler() +{ +} +// ---------------------------------------------------------------------------- +manualCircleControler * manualCircleControler :: Clone() // virtual +{ + manualCircleControler * clone = new manualCircleControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualCircleControler::CopyAttributesTo( manualCircleControler * cloneObject) +{ + // Fathers object + manualContourBaseControler::CopyAttributesTo(cloneObject); +} + +// ---------------------------------------------------------------------------- +void manualCircleControler::Configure() //virtual +{ +// this->GetManualContourModel()->SetNumberOfPointsSpline(5); +} + +// ---------------------------------------------------------------------------- +void manualCircleControler::MouseClickLeft(int x, int y){ + int z = GetZ(); + + if( IsEditable() ) + { // move control point + if ( (GetState()==0) && (GetManualViewBaseContour()->GetIdPoint(x,y,z)!=-1 ) ){ + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } + }// IsEditable + + // move contour + if ((GetState()==0) && (GetManualViewBaseContour()->GetPosibleSelected()==true)) { + GetManualViewBaseContour()->InitMove(x,y,z); + SetState(6); + } + + // firstime create 2 control points and move one control point + int size=GetManualViewBaseContour()->GetNumberOfPoints(); + if (GetState()==0) { + if (size==0){ + AddPoint(x,y,z); + AddPoint(x,y,z); + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(1); + } + } + +/*EED 21 Avril 2009 + if (GetState()==0) { + if (size==0){ + AddPoint(x,y,z); + AddPoint(x,y,z); + } else { + SetPoint(0,x,y,z); + SetPoint(1,x,y,z); + } + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } +*/ + + GetManualViewBaseContour()->Refresh(); +} +// ---------------------------------------------------------------------------- + +void manualCircleControler::MouseMove(int x, int y) // virtual +{ + int z=GetZ(); +// this->_vtkInteractorStyleBaseView-> + + GetManualViewBaseContour()->SelectPosibleContour(x,y,z); + GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); + + if (GetState()==1){ SetPoint( bakIdPoint , x , y ,z); } + if (GetState()==5){ SetPoint( bakIdPoint , x , y ,z); } + + if (GetState()==6){ + GetManualViewBaseContour()->MoveContour(x,y,z); + } + GetManualViewBaseContour()->Refresh(); +} + + +// ---------------------------------------------------------------------------- +void manualCircleControler::DeleteActualMousePoint(int x, int y) // virtual +{ +} +// ---------------------------------------------------------------------------- + +void manualCircleControler::InitRoi(int ww, int hh, double porcentage) +{ + int zz; + manualPoint *mp; + + if (GetManualContourModel()->GetSizeLstPoints() ==0) + { + zz = GetZ(); + AddPoint(0,0,zz); + AddPoint(0,0,zz); +// AddPoint(0,0,zz); +// AddPoint(0,0,zz); + } + + double pp1=porcentage; + double pp2=1-porcentage; + +// mp = GetManualContourModel()->GetManualPoint(2); +// zz=(int)mp->GetZ(); +// mp->SetPoint(ww*pp1,hh*pp1,zz); + + mp = GetManualContourModel()->GetManualPoint(1); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp2,hh*pp1,zz); + + mp = GetManualContourModel()->GetManualPoint(0); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp2,hh*pp2,zz); + +// mp = GetManualContourModel()->GetManualPoint(3); +// zz=(int)mp->GetZ(); +// mp->SetPoint(ww*pp1,hh*pp2,zz); + + GetManualViewBaseContour() ->UpdateViewPoint(0); + GetManualViewBaseContour() ->UpdateViewPoint(1); +// GetManualViewBaseContour() ->UpdateViewPoint(2); +// GetManualViewBaseContour() ->UpdateViewPoint(3); + + SetState(0); + GetManualViewBaseContour()->Refresh(); +} + +// ---------------------------------------------------------------------------- +/* +void manualCircleControler::SetRoi(int x1, int y1,int x2, int y2) +{ + manualPoint *mp; + InitRoi( 0 , 0 , 0.2 ); + mp = GetManualContourModel()->GetManualPoint(2); + mp->SetPointX(x1); + mp->SetPointY(y1); + + mp = GetManualContourModel()->GetManualPoint(1); + mp->SetPointX(x2); + mp->SetPointY(y1); + + mp = GetManualContourModel()->GetManualPoint(0); + mp->SetPointX(x2); + mp->SetPointY(y2); + + mp = GetManualContourModel()->GetManualPoint(3); + mp->SetPointX(x1); + mp->SetPointY(y2); + + GetManualViewBaseContour() ->UpdateViewPoint(0); + GetManualViewBaseContour() ->UpdateViewPoint(1); + GetManualViewBaseContour() ->UpdateViewPoint(2); + GetManualViewBaseContour() ->UpdateViewPoint(3); +} +*/ + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// AD:02-09 + +// _state = 0 // ..nothing.. +// _state = 5 // move point +// _state = 6 // move all +// _state = 7 // Empty mouse drag + +manualLineControler::manualLineControler() +{ +} +// ---------------------------------------------------------------------------- +manualLineControler::~manualLineControler() +{ +} +// ---------------------------------------------------------------------------- +manualLineControler * manualLineControler :: Clone() // virtual +{ + manualLineControler * clone = new manualLineControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- +void manualLineControler::CopyAttributesTo( manualLineControler * cloneObject) +{ + // Fathers object + manualContourBaseControler::CopyAttributesTo(cloneObject); +} + + +// ---------------------------------------------------------------------------- +void manualLineControler::MouseClickLeft(int x, int y){ + int z = GetZ(); + + if( IsEditable() ) + { // move control point + if ( (GetState()==0) && (GetManualViewBaseContour()->GetIdPoint(x,y,z)!=-1 ) ){ + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } + } //IsEditable + + // move contour + if ((GetState()==0) && (GetManualViewBaseContour()->GetPosibleSelected()==true)) { + GetManualViewBaseContour()->InitMove(x,y,z); + SetState(6); + } + + // fist time create 2 control points and move a control point + int size=GetManualViewBaseContour()->GetNumberOfPoints(); + if (GetState()==0) { + if (size==0){ + AddPoint(x,y,z); + AddPoint(x,y,z); + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(1); + } + } + + +/*EED 21 Avril 2009 + if (GetState()==0) { + if (size==0){ + AddPoint(x,y,z); + AddPoint(x,y,z); + } else { + SetPoint(0,x,y,z); + SetPoint(1,x,y,z); + } + bakIdPoint = GetManualViewBaseContour()->GetIdPoint(x,y,z); + SetState(5); + } +*/ + + GetManualViewBaseContour()->Refresh(); +} +// ---------------------------------------------------------------------------- + +void manualLineControler::MouseMove(int x, int y) // virtual +{ + int z=GetZ(); + + GetManualViewBaseContour()->SelectPosibleContour(x,y,z); + GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); + + if (GetState()==1) { SetPoint( bakIdPoint , x , y ,z); } + if (GetState()==5) { SetPoint( bakIdPoint , x , y ,z); } + + if (GetState()==6) + { + GetManualViewBaseContour()->MoveContour(x,y,z); + } + GetManualViewBaseContour()->Refresh(); +} + + +// ---------------------------------------------------------------------------- +void manualLineControler::DeleteActualMousePoint(int x, int y) // virtual +{ +} +// ---------------------------------------------------------------------------- + +void manualLineControler::InitRoi(int ww, int hh, double porcentage) +{ + int zz; + manualPoint *mp; + + if (GetManualContourModel()->GetSizeLstPoints() ==0) + { + zz = GetZ(); + AddPoint(0,0,zz); + AddPoint(0,0,zz); + } + + double pp1=porcentage; + double pp2=1-porcentage; + + mp = GetManualContourModel()->GetManualPoint(0); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp2,hh*pp2,zz); + + mp = GetManualContourModel()->GetManualPoint(1); + zz=(int)mp->GetZ(); + mp->SetPoint(ww*pp2,hh*pp1,zz); + + GetManualViewBaseContour() ->UpdateViewPoint(0); + GetManualViewBaseContour() ->UpdateViewPoint(1); + + SetState(0); + GetManualViewBaseContour()->Refresh(); +} + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +manualContourBaseControler::manualContourBaseControler() +{ + _manViewBaseCont = NULL; + _manContModel = NULL; + _state = 0; + _z = 900; + _editable = true; + _posibleToMove = true; + _moving = false; + _created = false; + _keyBoardMoving = false; +} +// ---------------------------------------------------------------------------- +manualContourBaseControler::~manualContourBaseControler() +{ +} + +// ---------------------------------------------------------------------------- +manualContourBaseControler * manualContourBaseControler :: Clone() // virtual +{ + manualContourBaseControler * clone = new manualContourBaseControler(); + CopyAttributesTo(clone); + return clone; +} + +// --------------------------------------------------------------------------- + +void manualContourBaseControler::CopyAttributesTo( manualContourBaseControler * cloneObject) +{ + // Fathers object + InteractorStyleMaracas::CopyAttributesTo(cloneObject); + cloneObject->SetZ( this->GetZ() ); + cloneObject->SetState( this->GetState() ); + cloneObject->SetEditable( this->IsEditable() ); + cloneObject->SetPosibleToMove( this->GetPosibleToMove() ); + cloneObject->SetMoving( this->IsMoving() ); + cloneObject->SetCompleteCreation( this->GetIfCompleteCreation() ); + cloneObject->SetKeyBoardMoving( this->GetKeyBoardMoving() ); +} + +// ---------------------------------------------------------------------------- +void manualContourBaseControler::Configure() //virtual +{ +} + +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnChar() +{ + if ( _vtkInteractorStyleBaseView!=NULL ) + { + char keyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode(); + + int X,Y; + wxVTKRenderWindowInteractor *_wxVTKiren; + _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + _wxVTKiren->GetEventPosition(X, Y); + //int Z = GetZ(); // JPRx + // Delete Point + if ((keyCode==8) || (keyCode==127)) + { + + if (!GetManualViewBaseContour()->GetPosibleSelected()==true) + { + DeleteActualMousePoint(X,Y); + } + GetManualViewBaseContour()->Refresh(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } + else + { + // Magnet + if (keyCode==32) + { + Magnet(X,Y); + GetManualViewBaseContour()->Refresh(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } + else if( !IsEditable() ) + { + if ( keyCode == 'L' ) + { + GetManualViewBaseContour()->MoveContour( -1, 0 ); + SetKeyBoardMoving( true ); + } + else if ( keyCode == 'R' ) + { + GetManualViewBaseContour()->MoveContour( 1, 0 ); + SetKeyBoardMoving( true ); + } + else if ( keyCode == 'U' ) + { + GetManualViewBaseContour()->MoveContour( 0, -1 ); + SetKeyBoardMoving( true ); + } + else if ( keyCode == 'D' ) + { + GetManualViewBaseContour()->MoveContour( 0, 1 ); + SetKeyBoardMoving( true ); + } + else if ( keyCode == 'W' )//Diagonal left down + { + GetManualViewBaseContour()->MoveContour( -1, 1 ); + SetKeyBoardMoving( true ); + } + else if ( keyCode == 'Q' )//Diagonal left up + { + GetManualViewBaseContour()->MoveContour( -1, -1 ); + SetKeyBoardMoving( true ); + } + else if( keyCode == 'P' )//Diagonal right up + { + GetManualViewBaseContour()->MoveContour( 1, -1 ); + SetKeyBoardMoving( true ); + } + else if( keyCode == 'M' )//Diagonal right down + { + GetManualViewBaseContour()->MoveContour( 1, 1 ); + SetKeyBoardMoving( true ); + } + if( GetKeyBoardMoving() ) + { + GetManualViewBaseContour()->Refresh(); + this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); + } + } + } + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnMouseMove() +{ + + if ( _vtkInteractorStyleBaseView!=NULL) + { + int X,Y; + wxVTKRenderWindowInteractor *_wxVTKiren; + _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + _wxVTKiren->GetEventPosition( X , Y ); + + + if ( (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && + (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ) { + MouseMove(X,Y); + } + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnLeftButtonDown() +{ + SetKeyBoardMoving( false ); + if ( _vtkInteractorStyleBaseView!=NULL ) + { + int X,Y; + wxVTKRenderWindowInteractor *wxVTKiren; + wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + wxVTKiren->GetEventPosition(X,Y); + + MouseClickLeft(X,Y); + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnLeftButtonUp() +{ + if ( _vtkInteractorStyleBaseView!=NULL ) + { + int X,Y; + wxVTKRenderWindowInteractor *wxVTKiren; + wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + wxVTKiren->GetEventPosition(X,Y); + MouseReleaseLeft(X,Y); + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnLeftDClick() +{ + if ( _vtkInteractorStyleBaseView!=NULL ) + { + int X,Y; + wxVTKRenderWindowInteractor *wxVTKiren; + wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + wxVTKiren->GetEventPosition(X,Y); + + this->MouseDLeft(X,Y); + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnMiddleButtonDown() +{ +// SetKeyBoardMoving( false ); + if ( _vtkInteractorStyleBaseView!=NULL ) + { + int X,Y; + wxVTKRenderWindowInteractor *wxVTKiren; + wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + wxVTKiren->GetEventPosition(X,Y); + GetManualViewBaseContour()->InitMove( X, Y,GetZ()); + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnMiddleButtonUp() +{ + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnRightButtonDown() +{ + if( _vtkInteractorStyleBaseView!= NULL ) + { + int X,Y; + wxVTKRenderWindowInteractor *wxVTKiren; + wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); + wxVTKiren->GetEventPosition(X, Y); + + SetCompleteCreation( true ); + SetKeyBoardMoving( false ); + MouseClickRight(X,Y); + } + return true; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::OnRightButtonUp() +{ + return true; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetModelView(manualContourModel *manContModel, manualViewBaseContour *manViewBaseCont){ + _manContModel = manContModel; + _manViewBaseCont = manViewBaseCont; + _manViewBaseCont->SetEditable( &_editable ); +} +// ---------------------------------------------------------------------------- +manualContourModel* manualContourBaseControler::GetManualContourModel() +{ + return _manContModel; +} +// ---------------------------------------------------------------------------- +manualViewBaseContour* manualContourBaseControler::GetManualViewBaseContour() +{ + return _manViewBaseCont; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::MouseClickLeft(int x, int y) // virtual +{ + +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::MouseClickRight(int x, int y) +{ +// if (_state==1) +// { +// _state=0; +// } + SetEditable( false ); + SetPosibleToMove( false ); + _state = 0; + +//EED 24Avril2009 _state=7; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::MouseReleaseLeft(int x, int y) +{ + if (_state==5){ _state = 0; } + if (_state==6){ _state = 0; } + if (_state==7){ _state = 0; } + SetMoving( false ); + GetManualViewBaseContour()->SelectPosibleContour(x,y,GetZ()); + if( GetIfCompleteCreation() && IsEditable() && !GetManualViewBaseContour()->GetPosibleSelected() && (GetManualViewBaseContour()->GetIdPoint(x,y,GetZ())==-1) ) + { + SetEditable( false ); + SetPosibleToMove( false ); + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::MouseDLeft(int x, int y ) +{ + if (_state==0) + { + int z=GetZ(); + GetManualViewBaseContour()->SelectPosibleContour(x,y,z); + GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); + if ( GetManualViewBaseContour()->GetPosibleSelected() ) + { + _editable = true; + } + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::MouseMove(int x, int y) // virtual +{ +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetState(int state) +{ + _state=state; +} +// ---------------------------------------------------------------------------- +int manualContourBaseControler::GetState() +{ + return _state; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::IsEditable( ) +{ + return _editable; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetEditable( bool condition ) +{ + if (GetManualViewBaseContour()!=NULL) { + if( !condition ) + { + GetManualViewBaseContour()->RemoveControlPoints(); + } + GetManualViewBaseContour()->SetSelected( condition ); + } + _editable = condition; +} + +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::GetPosibleToMove() +{ + return _posibleToMove; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetPosibleToMove( bool condition ) +{ + _posibleToMove = condition; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::IsMoving() +{ + return _moving; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetMoving( bool condition ) +{ + _moving = condition; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetCompleteCreation( bool condition ) +{ + _created = condition; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::GetIfCompleteCreation ( ) +{ + return _created; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetKeyBoardMoving( bool condition ) +{ + _keyBoardMoving = condition; +} +// ---------------------------------------------------------------------------- +bool manualContourBaseControler::GetKeyBoardMoving( ) +{ + return _keyBoardMoving; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::CreateNewManualContour(){ + _manViewBaseCont->CreateNewContour(); +} +// ---------------------------------------------------------------------------- +int manualContourBaseControler::GetNumberOfPointsManualContour(){ + return _manViewBaseCont->GetNumberOfPoints(); +} +// ---------------------------------------------------------------------------- + +//JSTG - 25-02-08 ------------------------------------------------------------- +int manualContourBaseControler::GetNumberOfPointsSplineManualContour(){ + //return _manViewBaseCont->GetNumberOfPointsSpline(); + return _manContModel->GetNumberOfPointsSpline(); +} +// ---------------------------------------------------------------------------- + +double* manualContourBaseControler::GetVectorPointsXManualContour(){ + return _manViewBaseCont->GetVectorPointsXManualContour(); +} +// ---------------------------------------------------------------------------- +double* manualContourBaseControler::GetVectorPointsYManualContour(){ + return _manViewBaseCont->GetVectorPointsYManualContour(); +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::DeleteContour(){ + _manViewBaseCont->DeleteContour(); + _manContModel->DeleteAllPoints(); +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::DeleteActualMousePoint(int x, int y)// virtual +{ + if ((_manContModel!=NULL) && (_manViewBaseCont!=NULL) ) + { + int id=_manViewBaseCont->GetIdPoint(x,y,GetZ()); + if ((id!=-1) && (_manContModel->GetSizeLstPoints()>2) ){ + _manContModel->DeletePoint(id); + _manViewBaseCont->DeletePoint(id); + } + } + _state = 0; +} + +// ---------------------------------------------------------------------------- +void manualContourBaseControler::Magnet(int x, int y) +{ + if( IsEditable()) + { + /*int id= */ _manViewBaseCont->GetIdPoint(x,y,GetZ()); // JPRx + if (GetManualContourModel()!=NULL){ + double xx = x; + double yy = y; + double zz = GetZ(); + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + int id = GetManualContourModel()->GetIdPoint(xx,yy,zz,32000,-1); + if (id!=-1) + { + manualPoint *mp = GetManualContourModel()->GetManualPoint(id); + mp->SetPoint(xx,yy,zz); + } + // GetManualViewBaseContour()->UpdateViewPoint(id); + } + _state = 0; + } +} + +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetZ(int z) +{ + _z=z; +} +// ---------------------------------------------------------------------------- +int manualContourBaseControler::GetZ() +{ + return _z; +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::AddPoint(int x, int y, int z) // virtual +{ + if (GetManualContourModel()!=NULL){ + double xx = x; + double yy = y; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + /*int id =*/ GetManualContourModel()->AddPoint(xx,yy,zz); // JPRx + GetManualViewBaseContour()->AddPoint(); +// GetManualViewBaseContour()->UpdateViewPoint(id); + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::InsertPoint(int x,int y,int z) // virtual +{ +//EEDzz + int id=-1; + if (GetManualContourModel()!=NULL){ + double xx = x; + double yy = y; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + if (GetManualContourModel()->GetSizeLstPoints()>1){ + id = GetManualContourModel()->InsertPoint(xx,yy,zz); + GetManualViewBaseContour()->InsertPoint(id); +// GetManualViewBaseContour()->UpdateViewPoint(id); + } else { + GetManualContourModel()->AddPoint(xx,yy,zz); + GetManualViewBaseContour()->AddPoint(); +// AddPoint(x,y,z); +// GetManualViewBaseContour()->UpdateViewPoint(id); + } + } +} + +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetPoint( int id ,int x , int y , int z){ // virtual + if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ + double xx = x; + double yy = y; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + manualPoint *mp = _manContModel->GetManualPoint(id); + mp->SetPoint(xx,yy,zz); + GetManualViewBaseContour()->UpdateViewPoint(id); + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetPointX( int id ,int x ){ + if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ + double xx = x; + double yy = 0; + double zz = 0; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + manualPoint *mp = _manContModel->GetManualPoint(id); + mp->SetPointX(xx); + GetManualViewBaseContour()->UpdateViewPoint(id); + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetPointY( int id ,int y ){ + if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ + double xx = 0; + double yy = y; + double zz = 0; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + manualPoint *mp = _manContModel->GetManualPoint(id); + mp->SetPointY(yy); + GetManualViewBaseContour()->UpdateViewPoint(id); + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::SetPointZ( int id ,int z ){ + if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ + double xx = 0; + double yy = 0; + double zz = z; + GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz); + manualPoint *mp = _manContModel->GetManualPoint(id); + mp->SetPointZ(zz); + GetManualViewBaseContour()->UpdateViewPoint(id); + } +} +// ---------------------------------------------------------------------------- +void manualContourBaseControler::ResetContour() // virtual +{ + this->DeleteContour(); + GetManualViewBaseContour()->CreateNewContour(); + this->SetState(0); +} + diff --git a/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContour.h b/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContour.h new file mode 100644 index 0000000..7b43bbe --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContour.h @@ -0,0 +1,1039 @@ + +#ifndef MANUAL_CONTOUR_H +#define MANUAL_CONTOUR_H + + +//-- +/* // EEDxx include +#include +#include "vtkActor.h" +#include "vtkPoints.h" +#include "vtkImageViewer2.h" +#include "vtkImageData.h" +*/ + +#include "vtkRenderWindow.h" + +#include "vtkRenderer.h" +#include "vtkRenderWindowInteractor.h" //extremely important with VC++ don't remove ! +#include "vtkCommand.h" +#include "vtkPolyData.h" +#include "vtkCellArray.h" +#include "vtkPolyDataMapper.h" +#include "vtkInteractorObserver.h" +#include "vtkInteractorStyleImage.h" +#include + +#include + + +#include +#include +#include +#include + +#include "wxVTKRenderWindowInteractor.h" + +#include "InteractorStyleMaracas.h" +//-- + +#include + + +#include "wxVtkBaseView.h" +#include "marTypes.h" + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + + +class manualPoint{ +public: + manualPoint(); + virtual ~manualPoint(); + void SetPoint(double x,double y,double z); + void SetPointX(double x); + void SetPointY(double y); + void SetPointZ(double z); + double GetX(); + double GetY(); + double GetZ(); + virtual manualPoint * Clone(); +private: + double _x; + double _y; + double _z; +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualContourModel{ +public: + manualContourModel(); + virtual ~manualContourModel(); + + virtual manualContourModel * Clone(); + void CopyAttributesTo( manualContourModel *cloneObject ); + virtual void Open(FILE *ff); // virtual + virtual void Save(FILE *ff); // virtual + virtual int GetTypeModel(); // virtual + + int AddPoint(double x,double y,double z); + int InsertPoint(double x,double y,double z); +//JSTG 25-04-08 ------------------------------------------------------- + void InsertPoint_id(int id, double x,double y,double z); +//--------------------------------------------------------------------- + void AddManualPoint( manualPoint* theManualPoint ); + + void DeletePoint(int i); + void DeleteAllPoints(); + + void MovePoint(int i,double dx,double dy,double dz); + void MoveLstPoints(double dx,double dy,double dz); + void MoveAllPoints(double dx,double dy,double dz); + + int GetIdPoint(double x, double y, double z, int i_range,int type); + manualPoint* GetManualPoint(int id); + int GetSizeLstPoints(); + int GetNumberOfPointsSpline(); + void SetNumberOfPointsSpline(int size); + + virtual void UpdateSpline(); + void SetCloseContour(bool closeContour); + bool IfCloseContour(); +//JSTG 25-02-08 ----------------------------------------------------------------- + //void GetSplinePoint(double t, double &x, double &y, double &z); //Method Original + //void GetSplineiPoint(int i, double &x, double &y, double &z); //Method Original +//------------------------------------------------------------------------------- + double GetPathSize(); + double GetPathArea(); + + void GetNearestPointAndNormal(double *p, double *rp, double *rn); + +// JSTG 25-02-08 ----------------------------------------------------------------- + virtual void GetSpline_i_Point(int i, double *x, double *y, double *z); + void GetSpline_t_Point(double t, double *x, double *y, double *z); +//-------------------------------------------------------------------------------- + + virtual std::vector ExploseModel( ); + + +private: + int _sizePointsContour; + std::vector _lstPoints; + bool _closeContour; + vtkKochanekSpline *_cntSplineX; + vtkKochanekSpline *_cntSplineY; + vtkKochanekSpline *_cntSplineZ; + +//JSTG 25-02-08 ---------------------------------------- + double _delta_JSTG; +//------------------------------------------------------ + +}; + + +//-------------------------------------------------------- + +class creaMaracasVisu_EXPORT manualContourModelCircle : public manualContourModel +{ +public: + manualContourModelCircle(); + virtual ~manualContourModelCircle(); + virtual manualContourModelCircle *Clone(); + void CopyAttributesTo( manualContourModelCircle *cloneObject); + virtual void GetSpline_i_Point(int i, double *x, double *y, double *z); +private: + double _deltaAngle; + double _radio; + double _centerX; + double _centerY; + double _centerZ; + + virtual int GetTypeModel(); + virtual void UpdateSpline(); +}; + +//-------------------------------------------------------- + +class creaMaracasVisu_EXPORT manualContourModelLine : public manualContourModel +{ +public: + manualContourModelLine(); + virtual ~manualContourModelLine(); + virtual manualContourModelLine *Clone(); + void CopyAttributesTo( manualContourModelLine *cloneObject); +// virtual void GetSpline_i_Point(int i, double *x, double *y, double *z); +private: + virtual int GetTypeModel(); +}; + +//-------------------------------------------------------- + +class manualContourModelBullEyeSector : public manualContourModel +{ +public: + manualContourModelBullEyeSector(); + virtual ~manualContourModelBullEyeSector(); + virtual manualContourModelBullEyeSector *Clone(); + void CopyAttributesTo( manualContourModelBullEyeSector *cloneObject); + void SetSector( double radioA, + double radioB, + double ang, + double angDelta); + void GetSector( double *radioA, + double *radioB, + double *ang, + double *angDelta); + void SetSize(double ww,double hh); + void SetCenter(double cx,double cy); + virtual void GetSpline_i_Point(int i, double *x, double *y, double *z); + virtual void Save(FILE *ff); + virtual void Open(FILE *ff); + +private: + double _radioA; + double _radioB; + double _ang; + double _angDelta; + double _ww; + double _hh; + double _cx; + double _cy; + + virtual int GetTypeModel(); +}; + + +//-------------------------------------------------------- +//eed004 +class creaMaracasVisu_EXPORT manualContourModelBullEye : public manualContourModel +{ +public: + manualContourModelBullEye(); + virtual ~manualContourModelBullEye(); + virtual manualContourModelBullEye *Clone(); + void CopyAttributesTo( manualContourModelBullEye *cloneObject); + virtual void Save(FILE *ff); + virtual void Open(FILE *ff); + + int GetNumberOfPointsSplineSectorBulleEje(); + void SetNumberOfPointsSplineSectorBulleEje(int); + void AddSector( double radioA, + double radioB, + double ang, + double angDelta); + void GetSector( int id, + double *radioA, + double *radioB, + double *ang, + double *angDelta); + manualContourModelBullEyeSector * GetModelSector(int id); + + void ResetSectors(); + int GetSizeOfSectorLst(); + virtual void UpdateSpline(); // virtual + virtual std::vector ExploseModel( ); + + + +private: + int _numberPointsSlineBySector; + std::vector _lstModelBullEyeSector; + +/* Borrame Eduardo + std::vector _lstRadioA; + std::vector _lstRadioB; + std::vector _lstAng; + std::vector _lstAngDelta; +*/ + + virtual int GetTypeModel(); +}; + + + +//-------------------------------------------------------- + +//JSTG 25-02-08 ------------------------------------------ +class creaMaracasVisu_EXPORT manualContourModelRoi : public manualContourModel +{ + public: + manualContourModelRoi(); + virtual ~manualContourModelRoi(); + virtual manualContourModelRoi *Clone(); + void CopyAttributesTo( manualContourModelRoi *cloneObject); +private: + virtual int GetTypeModel(); +}; +//-------------------------------------------------------- + + +class manualViewPoint{ +public: + +// static int range; + + manualViewPoint(wxVtkBaseView *wxvtkbaseview); + ~manualViewPoint(); + void SetSelected(bool selected); + void SetPosibleSelected(bool posibleSelected); + bool GetSelected(); + bool GetPosibleSelected(); + void DeleteVtkObjects(); + vtkActor* CreateVtkPointActor(); + void SetPositionXY(double x, double y, double range, double posZ); + vtkActor* GetVtkActor(); + void UpdateColorActor(); + void GetSpacing(double spc[3]); + void SetSpacing(double spc[3]); + void SetWidthLine( double width); + + +private: + bool _selected; + bool _posibleSelected; + vtkPoints *_pts; + vtkPolyData *_pd; + vtkActor *_pointVtkActor; + vtkPolyDataMapper *_bboxMapper; + wxVtkBaseView *_wxvtkbaseview; + double _widthline; +protected: + double _spc[3]; +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualViewBaseContour{ +public: + manualViewBaseContour(); + virtual ~manualViewBaseContour(); + + virtual int GetType(); + virtual void Save(FILE *pFile); + virtual void Open(FILE *pFile); + + void AddPoint(); + void AddPoint( manualViewPoint * manualViewPoint ); + void InsertPoint(int id); + void DeleteContour(); + void DeletePoint(int x, int y,int z); + virtual void DeletePoint(int id); + + virtual void UpdateViewPoint(int id); + virtual void UpdateViewPoints(); + + void SetSelected(bool selected); + void SetPosibleSelected(bool posibleSelected); + bool GetSelected(); + bool GetPosibleSelected(); + void DeleteSelectedPoints(); + bool GetEditable(); + void SetEditable( bool * condition ); + + + + virtual int GetIdPoint(int x, int y, int z); + + void SelectPoint(int i,bool select); + void SelectLstPoints(); + void SelectAllPoints(bool select); + virtual int SelectPosiblePoint(int x, int y ,int z); + bool SelectPosibleContour(int x, int y ,int z); + void SelectAllPossibleSelected(bool select); + void SetPointSelected(int id,bool select); + void SetPointPosibleSelected(int id,bool select); + void SetIfViewControlPoints(bool ifShow); + bool GetIfViewControlPoints(); + + void UnSelectPoint(int i); + void UnSelectLstPoints(); + void UnSelectAllPoints(); + + void SetModel(manualContourModel *manContModel); + void SetWxVtkBaseView(wxVtkBaseView *wxvtkbaseview); + + virtual void Refresh(); + int GetNumberOfPoints(); // ??? + //int GetNumberOfPointsSpline(); //JSTG 25-02-08 In ContourModel is the same method + //void SetNumberOfPointsSpline(int size); //JSTG 25-02-08 In ContourModel is the same method + + void CreateNewContour(); + double* GetVectorPointsXManualContour(); + double* GetVectorPointsYManualContour(); + double* GetVectorPointsZManualContour(); + + virtual bool ifTouchContour(int x,int y, int z); + void UpdateColorActor(); + + void SetRange(int range); + int GetRange(); + void SetZ(int z); + int GetZ(); + + wxVtkBaseView *GetWxVtkBaseView(); + + virtual void InitMove(int x, int y, int z); + virtual void MoveContour(int x, int y, int z); + virtual void MoveContour(int horizontalUnits, int verticalUnits ); + virtual void GetMinMax( double &minX,double &minY, double &minZ, double &maxX, double &maxY, double &maxZ ); + virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type=2); + + void ClearContour(); + virtual void ClearPoint(int id); + + void SetVisible(bool ok); + void SetShowText(bool ok); + + void GetSpacing(double spc[3]); + void SetSpacing(double spc[3]); + + void SetColorNormalContour(double r, double g, double b); + void GetColorNormalContour(double &r, double &g, double &b); + void SetColorEditContour(double r, double g, double b); + void GetColorEditContour(double &r, double &g, double &b); + void SetColorSelectContour(double r, double g, double b); + void GetColorSelectContour(double &r, double &g, double &b); + + //Addinging and removing from visualization specific actors included in the viewer contour + void AddCompleteContourActor( bool ifControlPoints = false); + void RemoveCompleteContourActor(); + virtual void AddSplineActor(); + virtual void RemoveSplineActor(); + void AddControlPoints(); + void RemoveControlPoints(); + void AddTextActor(); + void RemoveTextActor(); + + virtual manualViewBaseContour * Clone(); + void CopyAttributesTo( manualViewBaseContour *cloneObject ); + virtual void RefreshContour(); + void SetWidthLine(double width); + double GetWidthLine(); + + virtual void ConstructVTKObjects(); + +private: + int _range; + + wxVtkBaseView *_wxvtkbaseview; + bool _selected; + bool *_editable; + bool _posibleSelected; + bool _viewControlPoints; + + + vtkPolyData *_pd; + vtkActor *_contourVtkActor; + vtkPolyDataMapper *_bboxMapper; + + double _coulorEdit_r; + double _coulorEdit_g; + double _coulorEdit_b; + double _coulorNormal_r; + double _coulorNormal_g; + double _coulorNormal_b; + double _coulorSelection_r; + double _coulorSelection_g; + double _coulorSelection_b; + double _widthline; + + void DeleteVtkObjects(); + virtual void RefreshText(); + + +protected: + + // text + bool _show_text; + int _id_viewPoint_for_text; + vtkTextActor *_textActor; + manualContourModel *_manContModel; + vtkPoints *_pts; +// JSTG 25-02-08 -------------------------------------------- + int _sizePointsContour; +//----------------------------------------------------------- + std::vector _lstViewPoints; + double _spc[3]; + +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualViewContour: public manualViewBaseContour +{ +public: + manualViewContour(); + virtual ~manualViewContour(); + virtual manualViewContour * Clone(); + void CopyAttributesTo( manualViewContour *cloneObject ); + + virtual int GetType(); + virtual void Save(FILE *pFile); + virtual void Open(FILE *pFile); + + + virtual void RefreshContour(); + virtual bool ifTouchContour(int x,int y, int z); + virtual void InitMove(int x, int y, int z); + virtual void MoveContour(int x, int y, int z); + virtual void MoveContour(int horizontalUnits, int verticalUnits ); + virtual void DeletePoint(int id); + virtual void ClearPoint(int id); + void SetMesureScale(double mesureScale); +private: + double _mesureScale; + std::vector< std::vector > _initialMovingPoints; + manualContourModel * _initialConoturModel; + + virtual void RefreshText(); +protected: + +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +class manualView3VContour: public manualViewContour +{ +public: + manualView3VContour(int type); + virtual ~manualView3VContour(); + virtual manualView3VContour * Clone(); + void CopyAttributesTo( manualView3VContour *cloneObject ); + + virtual void RefreshContour(); + virtual int GetIdPoint(int x, int y, int z); + virtual void UpdateViewPoint(int id); + virtual bool ifTouchContour(int x,int y,int z); + int GetType(); + +protected: +private: + int _type; + void FilterCordinateXYZ(double &x,double &y,double &z); + +// JSTG 25-02-08 ------------------------------------- + //manualContourModel *_manContModel; +//---------------------------------------------------- + +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +class manualView3DContour: public manualViewContour +{ +public: + manualView3DContour(); + virtual ~manualView3DContour(); + virtual manualView3DContour * Clone(); + void CopyAttributesTo( manualView3DContour *cloneObject ); + + virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type); + void SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata); + + virtual int SelectPosiblePoint ( int x, int y, int z ); + void SetDimensions(int w, int h, int d); + + int GetIdPoint2(int x, int y); + +protected: + vtkMPRBaseData *_vtkmprbasedata; +private: + int _w; + int _h; + int _d; + +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualViewRoi: public manualViewContour +{ +public: + manualViewRoi(); + virtual ~manualViewRoi(); + + virtual int GetType(); + virtual manualViewRoi * Clone(); + void CopyAttributesTo( manualViewRoi *cloneObject ); + + virtual void RefreshContour(); + virtual bool ifTouchContour(int x,int y, int z); + virtual void InitMove(int x, int y, int z); + virtual void MoveContour(int x, int y, int z); + void GetMinMax(double &minX,double &minY, double &maxX, double &maxY); + +private: + double _dp0[3]; + double _dp1[3]; + double _dp2[3]; + double _dp3[3]; +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +class creaMaracasVisu_EXPORT manualViewBullEyeSector: public manualViewContour +{ +public: + manualViewBullEyeSector(); + virtual void RefreshContour(); +}; + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +//EED004 +class creaMaracasVisu_EXPORT manualViewBullEye: public manualViewRoi +{ +public: + manualViewBullEye(); + virtual ~manualViewBullEye(); + + virtual int GetType(); + virtual manualViewBullEye * Clone(); + void CopyAttributesTo( manualViewBullEye *cloneObject ); + +// void UpdateColorActorBullEye(); +// void DeleteVtkObjectsBullEye(); + virtual void RemoveSplineActor(); + virtual void AddSplineActor(); + virtual void ConstructVTKObjects(); + virtual void RefreshContour(); + +private: + +/*EED Borrame + std::vector lstSectorBullEye; +*/ + + std::vector lstSectorBullEye; + +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// EED08 +class creaMaracasVisu_EXPORT manualViewCircle: public manualViewContour +{ +public: + manualViewCircle(); + virtual ~manualViewCircle(); + + virtual int GetType(); + virtual manualViewCircle * Clone(); + void CopyAttributesTo( manualViewCircle *cloneObject ); + + virtual void InitMove(int x, int y, int z); + virtual void MoveContour(int x, int y, int z); + void GetMinMax(double &minX,double &minY, double &maxX, double &maxY); + +private: + double _dp0[3]; + double _dp1[3]; +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// AD:02-09 +class creaMaracasVisu_EXPORT manualViewLine: public manualViewContour +{ +public: + manualViewLine(); + virtual ~manualViewLine(); + + virtual int GetType(); + virtual manualViewLine * Clone(); + void CopyAttributesTo( manualViewLine *cloneObject ); + + virtual void InitMove(int x, int y, int z); + virtual void MoveContour(int x, int y, int z); + +private: + double _dp0[3]; + double _dp1[3]; +}; + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + + +class creaMaracasVisu_EXPORT manualContourBaseControler: public InteractorStyleMaracas +{ +public: + manualContourBaseControler(); + virtual ~manualContourBaseControler(); + + virtual manualContourBaseControler * Clone(); + void CopyAttributesTo( manualContourBaseControler *cloneObject ); + + virtual bool OnChar(); + virtual bool OnMouseMove(); + virtual bool OnLeftButtonDown(); + virtual bool OnLeftButtonUp(); + virtual bool OnLeftDClick(); + virtual bool OnMiddleButtonDown(); + virtual bool OnMiddleButtonUp(); + virtual bool OnRightButtonDown(); + virtual bool OnRightButtonUp(); + + void SetModelView(manualContourModel *manContModel, manualViewBaseContour *manViewBaseCont); + manualContourModel * GetManualContourModel(); + manualViewBaseContour * GetManualViewBaseContour(); + + + virtual void MouseClickLeft(int x, int y); + virtual void MouseClickRight(int x, int y); + virtual void MouseDLeft(int x, int y); + + virtual void MouseMove(int x, int y); + virtual void MouseReleaseLeft(int x, int y); + + void SetState(int state); + int GetState(); + bool IsEditable(); + void SetEditable( bool condition ); + bool GetPosibleToMove(); + void SetPosibleToMove( bool condition ); + bool IsMoving(); + void SetMoving( bool condition ); + void SetCompleteCreation( bool condition ); + bool GetIfCompleteCreation ( ); + void SetKeyBoardMoving( bool condition ); + bool GetKeyBoardMoving( ); + + void CreateNewManualContour(); + int GetNumberOfPointsManualContour(); + int GetNumberOfPointsSplineManualContour(); + void DeleteContour(); + virtual void DeleteActualMousePoint(int x, int y ); + double* GetVectorPointsXManualContour(); + double* GetVectorPointsYManualContour(); + + + void SetZ(int z); + virtual int GetZ(); + + virtual void AddPoint(int x, int y, int z); + virtual void InsertPoint(int x, int y, int z); + + virtual void SetPoint( int id ,int x ,int y ,int z); + void SetPointX( int id ,int x ); + void SetPointY( int id ,int y ); + void SetPointZ( int id ,int z ); + + void Magnet(int x, int y); + virtual void ResetContour(); + + virtual void Configure(); + + +//EED Borrame +// virtual manualContourBaseControler * Clone( manualViewBaseContour * cloneView = NULL, manualContourModel * cloneModel = NULL ); + + +private: + manualViewBaseContour *_manViewBaseCont; + manualContourModel *_manContModel; + + int _z; + int _state; + bool _editable; + bool _posibleToMove; + bool _moving; + bool _created; + bool _keyBoardMoving; + +}; + + + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualContourControler: public manualContourBaseControler +{ +public: + manualContourControler(); + virtual ~manualContourControler(); + virtual manualContourControler * Clone(); + void CopyAttributesTo( manualContourControler *cloneObject ); + + virtual void MouseClickLeft(int x, int y); + virtual void MouseMove(int x, int y); + virtual void MouseDLeft( int x, int y); + void SetEasyCreation(bool easyCreation); + bool GetEasyCreation(); + + virtual void Configure(); + +protected: + int _bakIdPoint; +private: + bool _easyCreation; +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + + + +class creaMaracasVisu_EXPORT manualContour3VControler: public manualContourControler +{ +public: + manualContour3VControler(int type); + virtual ~manualContour3VControler(); + virtual manualContour3VControler * Clone(); + void CopyAttributesTo( manualContour3VControler *cloneObject ); + + virtual bool OnChar(); + virtual void AddPoint(int x, int y, int z); + virtual void InsertPoint(int x, int y, int z); + virtual void MouseMove(int x, int y); + virtual void ResetContour(); + + void AddManualViewBaseContour( manualViewBaseContour *manViewBaseCont ); + + vtkMPRBaseData *GetVtkMPRBaseData(); + void SetVtkMPRBaseData (vtkMPRBaseData *vtkmprbasedata ); + virtual void SetPoint( int id ,int x ,int y ,int z ); + + virtual void DeleteActualMousePoint(int x, int y); + + void AddPoint_Others(); + void DeleteActualMousePoint_Others(int id); + void MouseMove_Others(int id); + void InsertPoint_Others(int id); + void OnChar_Others(); + void ResetContour_Others(); + int GetType(); + +private: + int _type; + + vtkMPRBaseData *_vtkmprbasedata; + + std::vector< manualViewBaseContour* > _lstManualViewBaseContour; +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualContour3DControler: public manualContourControler +{ +public: + manualContour3DControler(); + virtual ~manualContour3DControler(); + virtual manualContour3DControler * Clone(); + void CopyAttributesTo( manualContour3DControler *cloneObject ); + + virtual bool OnLeftButtonDown(); + virtual bool OnChar(); + virtual void InsertPoint(int x, int y, int z); + virtual void MouseClickLeft(int x, int y); + void ResetOrientationPlane(); + + vtkMPRBaseData *GetVtkMPRBaseData(); + void SetVtkMPRBaseData (vtkMPRBaseData *vtkmprbasedata ); + + +protected: +private: + vtkMPRBaseData *_vtkmprbasedata; + +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +class creaMaracasVisu_EXPORT manualContour3V3DControler: public manualContour3DControler +{ +public: + manualContour3V3DControler(); + virtual ~manualContour3V3DControler(); + virtual manualContour3V3DControler * Clone(); + void CopyAttributesTo( manualContour3V3DControler *cloneObject ); + + void SetManualContour3VControler(manualContour3VControler *manualcontour3Vcontroler); + manualContour3VControler *GetManualContour3VControler(); + + virtual bool OnChar(); + virtual void AddPoint( int x, int y, int z ); + virtual void DeleteActualMousePoint(int x, int y); + virtual void MouseMove(int x, int y); + virtual void InsertPoint(int x, int y, int z); + virtual void ResetContour(); + + +protected: +private: + manualContour3VControler *_manualcontour3Vcontroler; + +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +class creaMaracasVisu_EXPORT manualContourPerpPlaneControler: public manualContourControler +{ +public: + manualContourPerpPlaneControler(); + virtual ~manualContourPerpPlaneControler(); + virtual manualContourPerpPlaneControler * Clone(); + void CopyAttributesTo( manualContourPerpPlaneControler *cloneObject ); + + void SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata); + vtkMPRBaseData *GetVtkMPRBaseData(); + + virtual bool OnChar(); + virtual bool OnMouseMove(); + virtual bool OnLeftDClick(); + virtual void AddPoint( int x, int y, int z ); + virtual void DeleteActualMousePoint(int x, int y); + virtual void MouseMove(int x, int y); + virtual void InsertPoint(int x, int y, int z); + virtual void ResetContour(); + + void SetManualContour3VControler(manualContour3VControler *manualcontour3Vcontroler); + manualContour3VControler *GetManualContour3VControler(); + + virtual void MouseDLeft( int x, int y); + void ResetOrientationPlane(); + void SetVtkInteractorStylePlane2D(InteractorStyleMaracas *vtkinteractorstyleplane2D); + InteractorStyleMaracas * GetVtkInteractorStylePlane2D(); + +private: + bool _flagMouseMove; + bool _flagMouseDClick; + InteractorStyleMaracas *_vtkinteractorstyleplane2D; + +protected: + vtkMPRBaseData *_vtkmprbasedata; + manualContour3VControler *_manualcontour3Vcontroler; +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + + +class creaMaracasVisu_EXPORT manualRoiControler: public manualContourControler +{ +public: + manualRoiControler(); + virtual ~manualRoiControler(); + virtual manualRoiControler * Clone(); + void CopyAttributesTo( manualRoiControler *cloneObject ); + + virtual void MouseClickLeft(int x, int y); + virtual void MouseMove(int x, int y ); + virtual void DeleteActualMousePoint(int x, int y); + void InitRoi(int ww, int hh, double porcentage); + void SetRoi(int x1, int y1,int x2, int y2); + virtual void Configure(); + + +private: + int bakIdPoint; +}; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// EED08 +class creaMaracasVisu_EXPORT manualCircleControler: public manualContourControler +{ +public: + manualCircleControler(); + virtual ~manualCircleControler(); + virtual manualCircleControler * Clone(); + void CopyAttributesTo( manualCircleControler *cloneObject ); + + virtual void MouseClickLeft(int x, int y); + virtual void MouseMove(int x, int y ); + virtual void DeleteActualMousePoint(int x, int y); + void InitRoi(int ww, int hh, double porcentage); +// void SetRoi(int x1, int y1,int x2, int y2); + virtual void Configure(); + + +private: + int bakIdPoint; +}; + + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +// AD:02-09 +class creaMaracasVisu_EXPORT manualLineControler: public manualContourControler +{ +public: + manualLineControler(); + virtual ~manualLineControler(); + virtual manualLineControler * Clone(); + void CopyAttributesTo( manualLineControler *cloneObject ); + + virtual void MouseClickLeft(int x, int y); + virtual void MouseMove(int x, int y ); + virtual void DeleteActualMousePoint(int x, int y); + void InitRoi(int ww, int hh, double porcentage); + + + +private: + int bakIdPoint; +}; + + + + +#endif // MANUAL_CONTOUR_H + diff --git a/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContourContainer.h b/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContourContainer.h new file mode 100644 index 0000000..c1955b3 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/temp/manualContourContainer.h @@ -0,0 +1,116 @@ +/*========================================================================= + + Program: wxMaracas + Module: $RCSfile: manualContourContainer.h,v $ + Language: C++ + Date: $Date: 2009/05/28 16:39:50 $ + Version: $Revision: 1.1 $ + + Copyright: (c) 2002, 2003 + License: + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#ifndef MANUAL_CONTOUR_CONTAINER_H +#define MANUAL_CONTOUR_CONTAINER_H + + +#include +//#include "manualContour.h" +#include "manualContourControler.h" +#include "manualContourModel.h" +#include "manualViewContour.h" + +class manualContourContainer +{ +public: + + manualContourContainer(); + virtual ~manualContourContainer(); + + manualContourControler* getWallController(); + manualContourControler* getLumenController(); + manualContourControler* getCalcController(int i); + manualContourControler* getHypoController(int i); + void createWallContour(wxVtk2DBaseView *_imageviewer2D_1); + void createLumenContour(wxVtk2DBaseView *_imageviewer2D_1); + + int addCalcificationContour(wxVtk2DBaseView *_imageviewer2D_1); + int addHypodenseContour(wxVtk2DBaseView *_imageviewer2D_1); + + void setWallVisibility(bool visible); + + void setLumenVisibility(bool visible); + void setCalcVisibility(bool visible); + void setHypoVisibility(bool visible); + void setWallActive(); + void setLumenActive(); + void setCalcActive(); + void setHypoActive(); + void setCalcContourActive(int i); + void setHypoContourActive(int i); + int getNumberOfCalcContours(); + int getNumberOfHypoContours(); + void inactivate(); + + int getNumberOfWallContourPoints(); + int getNumberOfLumenContourPoints(); + int getNumberOfCalcContourPoints(int i); + int getNumberOfHypoContourPoints(int i); + + double* getXVectorWallPoints(); + double* getXVectorLumenPoints(); + double* getXVectorCalcPoints(int i); + double* getXVectorHypoPoints(int i); + + double* getYVectorWallPoints(); + double* getYVectorLumenPoints(); + double* getYVectorCalcPoints(int i); + double* getYVectorHypoPoints(int i); + void clear(); + void clearWall(); + void clearLumen(); + void clearCalc(); + void clearHypo(); + void refreshWall(wxVtk2DBaseView *_imageviewer2D_1); + void refreshLumen(wxVtk2DBaseView *_imageviewer2D_1); + void refreshCalc(int i, wxVtk2DBaseView *_imageviewer2D_1); + void refreshHypo(int i, wxVtk2DBaseView *_imageviewer2D_1); + + void restartWallContour(wxVtk2DBaseView *_imageviewer2D_1); + void restartLumenContour(wxVtk2DBaseView *_imageviewer2D_1); + void restartCalcContours(); + void restartHypoContours(); + +private: + //Manual Contour Wall + + manualContourControler *_manContourControlWall; + manualContourModel *_mContourModelWall; + manualViewContour *_mViewContourWall; + + + //Manual Contour Lumen + manualContourControler *_manContourControlLumen; + manualContourModel *_mContourModelLumen; + manualViewContour *_mViewContourLumen; + + //Manual Contour Calc + std::vector _manContourControlCalc; + std::vector _mContourModelCalc; + std::vector _mViewContourCalc; + + //Manual Contour Hypo + std::vector _manContourControlHypo; + std::vector _mContourModelHypo; + std::vector _mViewContourHypo; + + + +}; + +#endif // diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.cxx new file mode 100644 index 0000000..98f20f7 --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.cxx @@ -0,0 +1,153 @@ +/*========================================================================= + + Program: wxMaracas + Module: $RCSfile: wxMaracasSuperposition.cxx,v $ + Language: C++ + Date: $Date: 2009/05/28 16:39:51 $ + Version: $Revision: 1.1 $ + + Copyright: (c) 2002, 2003 + License: + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#include "wxMaracasSuperposition.h" +#include "creaWx.h" + +wxMaracasSuperposition* wxMaracasSuperposition::instance=NULL; + +wxMaracasSuperposition::wxMaracasSuperposition( wxWindow* parent, std::vector imgs); +: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize) +{ + m_mgr.SetManagedWindow(this); + + _superposition1 = NULL; + _superposition2 = NULL; + _superposition3 = NULL; + + _images = img; + + // set up default notebook style + m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER | wxAUI_NB_CLOSE_ON_ACTIVE_TAB; + m_notebook_theme = 0; + _notebook = this->createNotebook(); + + createPanels(); + configurePanels(); +} + +wxMaracasSuperposition::~wxMaracasSuperposition() +{ + +} + +wxMaracasSuperposition* wxMaracasSuperposition :: getInstance ( wxWindow* parent, std::vector imgs) +{ + if(instance == NULL) + { + instance = new wxMaracasSuperposition(parent, imgs); + } + return instance; +} + +wxMaracasSuperposition* wxMaracasSuperposition :: getInstance() +{ + +} + +//------------------------------------------------------------------------------------------------------------ +// Creational and initialization methods using WxAui +//------------------------------------------------------------------------------------------------------------ +// +wxAuiNotebook * IRMMainFrame :: createNotebook() + +{ + wxSize client_size = GetClientSize(); + wxAuiNotebook* noteBook = new wxAuiNotebook(this, -1, wxPoint(client_size.x, client_size.y), wxSize(430,200), m_notebook_style); + wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)); + + return noteBook; +} + +void wxMaracasSuperposition :: configurePanels() +{ + if( _superposition1!=NULL ) + { + notebook->AddPage( _superposition1, wxT(" Superoposition 1 ") ); + m_mgr.Update(); + } + + if( _superposition2!=NULL ) + { + notebook->AddPage( _superposition2, wxT(" Superoposition 2 ") ); + m_mgr.Update(); + } + + if( _superposition3!=NULL ) + { + notebook->AddPage( _superposition3, wxT((" Superoposition 3 ") ); + m_mgr.Update(); + } + + + m_mgr.AddPane(_notebook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false)); + m_mgr.Update(); + + SetMinSize(wxSize(300,300)); + m_mgr.Update(); +} + +void wxMaracasSuperposition :: createPanels() +{ + if( _superposition1==NULL ) + { + createSuperpositionPanel(1) + } + + else if( _superposition1!=NULL ) + { + + } + + if( _superposition2==NULL ) + { + createSuperpositionPanel(2) + } + + else if( _superposition2!=NULL ) + { + + } + + if( _superposition3==NULL ) + { + createSuperpositionPanel(3) + } + + else if( _superposition3!=NULL ) + { + + } +} + +void wxMaracasSuperposition :: createSuperpositionPanel(int type) +{ + +} + +void wxMaracasSuperposition :: changeImages(std::vector imgs) +{ + _images = imgs; + + createPanels(); + configurePanels(); +} + +std::vector wxMaracasSuperposition :: getImages( ) +{ + return _images; +} diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.h new file mode 100644 index 0000000..eb88f6d --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.h @@ -0,0 +1,76 @@ +/*========================================================================= + + Program: wxMaracas + Module: $RCSfile: wxMaracasSuperposition.h,v $ + Language: C++ + Date: $Date: 2009/05/28 16:39:51 $ + Version: $Revision: 1.1 $ + + Copyright: (c) 2002, 2003 + License: + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notice for more information. + +=========================================================================*/ + +#ifndef __wxMaracasSuperpositionPanelH__ +#define __wxMaracasSuperpositionPanelH__ + +#include +#include +#include "wx/aui/aui.h" +#include "vtkMetaImageReader.h" +#include "vtkImageData.h" + + + + +class creaMaracasVisu_EXPORT wxMaracasSuperposition : public wxPanel +{ + +public: + + wxMaracasSuperposition(wxWindow* parent, std::vector imgs); + + ~wxMaracasSuperposition(); + + static wxMaracasSuperposition* getInstance(wxWindow* parent, std::vector imgs); + + static wxMaracasSuperposition* getInstance(); + + wxAuiNotebook * createNotebook(); + + void createPanels(); + + void createSuperpositionPanel(int type); + + void configurePanels(); + + void changeImages(vtkImageData* img1, vtkImageData* img2); + + std::vector getImages( ); + + +private: + + wxAuiManager m_mgr; + + wxAuiNotebook * _notebook; + + std::vector _images; + + wxMaracasSuperpositionPanel * _superposition1; + + wxMaracasSuperpositionPanel * _superposition2; + + wxMaracasSuperpositionPanel * _superposition3; + + long m_notebook_style; + + long m_notebook_theme; +}; + +#endif + diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperpositionPanel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperpositionPanel.h new file mode 100644 index 0000000..aa1baab --- /dev/null +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperpositionPanel.h @@ -0,0 +1,35 @@ +#ifndef wxMaracasSuperpositionPanel_H_ +#define wxMaracasSuperpositionPanel_H_ + +#include "wx/wx.h" + +//------------------------------------------------------------------------------------------------------------ +// Class definition +//------------------------------------------------------------------------------------------------------------ + +class wxMaracasSuperpositionPanel : public wxPanel +{ + +public: + + wxMaracasSuperpositionPanel( std::vector imgs, int type, wxWindow *parent, + const wxPoint& pos=wxDefaultPosition, const wxSize& size = wxDefaultSize, long style= wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER, + int vertStart=1, int vertEnd=1, int horzStart=1, int horzEnd=1 ); + + ~wxMaracasSuperpositionPanel(); + +//------------------------------------------------------------------------------------------------------------ +// Creational and initialization methods +//------------------------------------------------------------------------------------------------------------ + + void createViewPanel(); + + + + +private: + + +}; + +#endif /*wxMaracasSuperpositionPanel_H_*/