From: Eduardo Davila Date: Fri, 5 Jun 2009 06:07:38 +0000 (+0000) Subject: . X-Git-Tag: EED.02Oct2009~53 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4df00b156385a2dd881c35fd7561ef9eb0885ee0;p=creaMaracasVisu.git . --- diff --git a/bbtk/src/bbmaracasvisuShowNPoints.cxx b/bbtk/src/bbmaracasvisuShowNPoints.cxx index ef31b02..cf0a4de 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.cxx +++ b/bbtk/src/bbmaracasvisuShowNPoints.cxx @@ -79,7 +79,13 @@ std::vector WidgetShowNPoints::GetLstPointsZ() return lstPointsZ; } - +//------------------------------------------------------------------------ + std::vector WidgetShowNPoints::GetLstLabels() +{ + return lstLabels; +} + + //------------------------------------------------------------------------ @@ -122,6 +128,7 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) lstPointsX.push_back( mpoint[0] ); lstPointsY.push_back( mpoint[1] ); lstPointsZ.push_back( mpoint[2] ); + lstLabels.push_back( (const char*) ( textCtrl->GetValue().mb_str() ) ); // Sphere vtkSphereSource *vtksphere = vtkSphereSource::New(); @@ -143,18 +150,15 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) renderer->AddActor( sphereActor ); // Actor - vtkTextActor3D *text = vtkTextActor3D::New(); - text->SetPosition( mradio+spc[0]*mpoint[0] , spc[1]*mpoint[1] , spc[2]*mpoint[2] ); - text->SetInput( (const char*) ( textCtrl->GetValue().mb_str() ) ); - renderer->AddActor( text ); - lstActorsText.push_back(text); + vtkTextActor3D *textActor = vtkTextActor3D::New(); + textActor->SetPosition( mradio+spc[0]*mpoint[0] , spc[1]*mpoint[1] , spc[2]*mpoint[2] ); + textActor->SetInput( (const char*) ( textCtrl->GetValue().mb_str() ) ); + renderer->AddActor( textActor ); + lstActorsText.push_back(textActor); renderer->GetRenderWindow()->Render(); - //--BBTK - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsX")); - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsY")); - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsZ")); + SetOutputBox(); } else {//mpoint.size printf("creaMaracasVisu::ShowNPoints (not match point) \n"); @@ -162,6 +166,18 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) } // renderer } + void WidgetShowNPoints::SetOutputBox() + { + //--BBTK + mbbShowNPoints->bbSetOutputlstPointsX( GetLstPointsX() ); + mbbShowNPoints->bbSetOutputlstPointsY( GetLstPointsY() ); + mbbShowNPoints->bbSetOutputlstPointsZ( GetLstPointsZ() ); + mbbShowNPoints->bbSetOutputlstLabels( GetLstLabels() ); + mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsX")); + mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsY")); + mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsZ")); + mbbShowNPoints->bbSignalOutputModification(std::string("lstLabels")); + } //------------------------------------------------------------------------ void WidgetShowNPoints::ErasePoint(int id) @@ -174,14 +190,15 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) lstActorsText[id]->Delete(); lstActorsSphere.erase( lstActorsSphere.begin()+id ); lstActorsText.erase( lstActorsText.begin()+id ); + lstPointsX.erase( lstPointsX.begin()+id ); lstPointsY.erase( lstPointsY.begin()+id ); lstPointsZ.erase( lstPointsZ.begin()+id ); + lstLabels.erase( lstLabels.begin()+id ); + renderer->GetRenderWindow()->Render(); - //--BBTK - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsX")); - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsY")); - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsZ")); + SetOutputBox(); + } // if id } // if renderer } @@ -217,30 +234,16 @@ void WidgetShowNPoints::OnAddPoint (wxCommandEvent& event) //------------------------------------------------------------------------ void WidgetShowNPoints::OnDeleteAllPoints(wxCommandEvent& event) { - int i,size=lstActorsSphere.size(); - if (this->renderer!=NULL){ - for (i=0;iRemoveActor( lstActorsSphere[i] ); - renderer->RemoveActor( lstActorsText[i] ); - } - lstActorsSphere.clear(); - lstActorsText.clear(); - lstPointsX.clear(); - lstPointsY.clear(); - lstPointsZ.clear(); - renderer->GetRenderWindow()->Render(); - //--BBTK - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsX")); - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsY")); - mbbShowNPoints->bbSignalOutputModification(std::string("lstPointsZ")); - } // renderer + int id,size=lstActorsSphere.size(); + for (id=size-1;id>=0;id--) + { + ErasePoint(id); + } + } - - BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ShowNPoints) BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox); @@ -257,6 +260,7 @@ void ShowNPoints::Process() bbSetOutputlstPointsX( mwxwidget->GetLstPointsX() ); bbSetOutputlstPointsY( mwxwidget->GetLstPointsY() ); bbSetOutputlstPointsZ( mwxwidget->GetLstPointsZ() ); + bbSetOutputlstLabels( mwxwidget->GetLstLabels() ); } // mwxwidget } diff --git a/bbtk/src/bbmaracasvisuShowNPoints.h b/bbtk/src/bbmaracasvisuShowNPoints.h index 8a2feec..46ab8b9 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.h +++ b/bbtk/src/bbmaracasvisuShowNPoints.h @@ -25,6 +25,7 @@ namespace bbcreaMaracasVisu void OnEraseLastPoint(wxCommandEvent &event); void OnDeleteAllPoints(wxCommandEvent &event); + void SetOutputBox(); void SetPoint(std::vector ppoint); void SetColour(std::vector colour); void SetOpacity(double opacity); @@ -34,15 +35,17 @@ namespace bbcreaMaracasVisu std::vector GetLstPointsX(); std::vector GetLstPointsY(); std::vector GetLstPointsZ(); + std::vector GetLstLabels(); private: - ShowNPoints *mbbShowNPoints; - vtkRenderer *renderer; - std::vector lstPointsX; - std::vector lstPointsY; - std::vector lstPointsZ; - std::vector lstActorsSphere; - std::vector lstActorsText; + ShowNPoints *mbbShowNPoints; + vtkRenderer *renderer; + std::vector lstPointsX; + std::vector lstPointsY; + std::vector lstPointsZ; + std::vector lstLabels; + std::vector lstActorsSphere; + std::vector lstActorsText; std::vector mpoint; vtkImageData *mimage; @@ -68,6 +71,7 @@ class /*BBTK_EXPORT*/ ShowNPoints BBTK_DECLARE_OUTPUT( lstPointsX, std::vector ); BBTK_DECLARE_OUTPUT( lstPointsY, std::vector ); BBTK_DECLARE_OUTPUT( lstPointsZ, std::vector ); + BBTK_DECLARE_OUTPUT( lstLabels, std::vector ); BBTK_PROCESS(Process); void Process(); BBTK_CREATE_WIDGET(CreateWidget); @@ -79,19 +83,20 @@ private: }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox); -BBTK_NAME("ShowNPoints"); -BBTK_AUTHOR("Eduardo DAVILA"); -BBTK_DESCRIPTION("widget that shows N moints in 3D (vtkActors)"); -BBTK_CATEGORY("widgetVtk"); -BBTK_INPUT(ShowNPoints,In,"One Point",std::vector,""); -BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,""); -BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,""); -BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector,"colour"); -BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor",double,""); -BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres",double,""); -BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector ,""); -BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector ,""); -BBTK_OUTPUT(ShowNPoints , lstPointsZ , " list of points Z ", std::vector ,""); + BBTK_NAME("ShowNPoints"); + BBTK_AUTHOR("Eduardo DAVILA"); + BBTK_DESCRIPTION("widget that shows N moints in 3D (vtkActors)"); + BBTK_CATEGORY("widgetVtk"); + BBTK_INPUT(ShowNPoints,In,"One Point",std::vector,""); + BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,""); + BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,""); + BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector,"colour"); + BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor",double,""); + BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres",double,""); + BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector ,""); + BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector ,""); + BBTK_OUTPUT(ShowNPoints , lstPointsZ , " list of points Z ", std::vector ,""); + BBTK_OUTPUT(ShowNPoints , lstLabels , " list of labels ", std::vector ,""); BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints); } // EO namespace bbcreaMaracasVisu diff --git a/bbtk/src/bbmaracasvisuViewerNV.cxx b/bbtk/src/bbmaracasvisuViewerNV.cxx index 3fd608f..4dfa24f 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.cxx +++ b/bbtk/src/bbmaracasvisuViewerNV.cxx @@ -46,7 +46,6 @@ void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event) //------------------------------------------------------------- void bbwxMaracas_N_ViewersWidget::OnDClickLeft(wxCommandEvent & event) { -printf("EED bbwxMaracas_N_ViewersWidget::OnDClickLeft \n"); wxMaracas_N_ViewersWidget::OnDClickLeft(event); mbbViewerNV->bbSignalOutputModification(std::string("Point")); } @@ -57,7 +56,6 @@ printf("EED bbwxMaracas_N_ViewersWidget::OnDClickLeft \n"); - BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerNV) BBTK_BLACK_BOX_IMPLEMENTATION(ViewerNV,bbtk::WxBlackBox); //------------------------------------------------------------- @@ -67,8 +65,8 @@ void ViewerNV::Process() vtkImageData* img = bbGetInputIn(); std::vector type = bbGetInputnTypeView(); - std::cout<<"img "< + relation 138882 ---> + a role_name "" private + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value}; +" + classrelation_ref 139010 // + b parent class_ref 130818 // marImageData + end end class 128642 "vtkInfoTextImageInteractor" @@ -709,6 +717,15 @@ ${inlines} classrelation_ref 133250 // b parent class_ref 132354 // vtkMPRBaseDataViewer end + + classrelation 139138 // + relation 139010 ---> + a role_name "" private + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value}; +" + classrelation_ref 139138 // + b parent class_ref 131458 // vtkMPRBaseData + end end class 131330 "wxMaracas_ViewerWidget" @@ -821,6 +838,15 @@ ${inlines} classrelation_ref 136194 // b parent class_ref 132354 // vtkMPRBaseDataViewer end + + classrelation 139266 // + relation 139138 ---> + a role_name "" private + cpp default " ${comment}${static}${mutable}${volatile}${const}${type} * ${name}${value}; +" + classrelation_ref 139266 // + b parent class_ref 131458 // vtkMPRBaseData + end end class 131458 "vtkMPRBaseData" @@ -835,6 +861,13 @@ ${inlines} idl_decl "" explicit_switch_type "" + classrelation 138882 // + relation 138754 ---|> + a public + cpp default "${type}" + classrelation_ref 138882 // + b parent class_ref 128514 // vtkBaseData + end end class 131586 "wxWidgetMesure2D_Plane_inMPR" diff --git a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128002.diagram b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128002.diagram index ce8b687..4d71eb2 100644 --- a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128002.diagram +++ b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128002.diagram @@ -2,7 +2,7 @@ format 66 classcanvas 128002 class_ref 128002 // vtkInfoTextImage 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 165 428 2000 + xyz 165 450 2000 end classcanvas 128130 class_ref 128130 // wxVtk2DBaseView 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 @@ -14,11 +14,11 @@ classcanvas 128386 class_ref 128258 // wxVtkBaseView end classcanvas 128642 class_ref 128386 // vtkImageViewer2_XYZ 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 200 386 2000 + xyz 190 390 2000 end classcanvas 128898 class_ref 128514 // vtkBaseData 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 201 470 2000 + xyz 219 154 2000 end classcanvas 129026 class_ref 128642 // vtkInfoTextImageInteractor 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 @@ -36,7 +36,7 @@ end classcanvas 129922 class_ref 129026 // vtkInteractorStyleImage 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 405 188 2000 + xyz 407 173 2000 end classcanvas 130946 class_ref 129154 // wxVrk3DBaseView 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 @@ -152,6 +152,10 @@ classcanvas 140930 class_ref 130306 // vtkPolyDataMapper color magenta xyz 705 776 2000 end +classcanvas 141314 class_ref 131458 // vtkMPRBaseData + 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 173 261 2010 +end relationcanvas 128258 relation_ref 128002 // from ref 128130 z 2001 to ref 128002 no_role_a no_role_b @@ -211,7 +215,7 @@ relationcanvas 132098 relation_ref 129410 // no_multiplicity_a no_multiplicity_b end relationcanvas 132354 relation_ref 129538 // - decenter_end 177 + decenter_end 171 from ref 131202 z 2001 to point 430 648 line 139010 z 2001 to ref 132226 no_role_a no_role_b @@ -354,6 +358,17 @@ relationcanvas 141058 relation_ref 137346 // no_role_a no_role_b no_multiplicity_a no_multiplicity_b end +relationcanvas 141698 relation_ref 138754 // + from ref 141314 z 2011 to ref 128898 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 141826 relation_ref 138882 // + from ref 128898 z 2001 to point 104 171 + line 141954 z 2001 to ref 136450 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end line 137474 -_-_ from ref 137346 z 2014 to ref 137218 end diff --git a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128130.diagram b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128130.diagram index 3b0e36a..9ce3f27 100644 --- a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128130.diagram +++ b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/128130.diagram @@ -3,19 +3,19 @@ format 66 classcanvas 128002 class_ref 131202 // wxMaracas_N_ViewersWidget 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 637 737 2000 + xyz 601 736 2000 end classcanvas 128130 class_ref 131330 // wxMaracas_ViewerWidget 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 649 472 2000 + xyz 615 472 2000 end note 128386 "wxwindow1 wxwindow2 wxwindow3 wxwindow4 " - xyzwh 596 636 2005 118 92 + xyzwh 574 633 2005 118 92 classcanvas 128642 class_ref 131458 // vtkMPRBaseData 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 379 470 2000 @@ -32,7 +32,7 @@ note 129538 "mvtkmpr2Dview_x mvtkmpr2Dview_y mvtkmpr2Dview_z " - xyzwh 579 251 2000 133 60 + xyzwh 571 248 2000 133 60 classcanvas 129794 class_ref 131586 // wxWidgetMesure2D_Plane_inMPR 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 338 375 2000 @@ -97,6 +97,10 @@ fragment 139266 "" end note 140930 "see wxVtkViewer class Diagram 1" xyzwh 429 127 2000 232 36 +classcanvas 142210 class_ref 131458 // vtkMPRBaseData + 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 716 382 2000 +end relationcanvas 128258 relation_ref 131842 // from ref 128002 z 2001 to ref 128130 no_role_a no_role_b @@ -108,7 +112,8 @@ relationcanvas 128770 relation_ref 131970 // no_multiplicity_a no_multiplicity_b end relationcanvas 129026 relation_ref 132098 // - from ref 128130 z 2001 to point 734 232 + decenter_begin 537 + from ref 128130 z 2001 to point 706 233 line 132994 z 2001 to ref 128898 no_role_a no_role_b no_multiplicity_a no_multiplicity_b @@ -127,7 +132,7 @@ relationcanvas 129410 relation_ref 132226 // no_multiplicity_a no_multiplicity_b end relationcanvas 129922 relation_ref 132354 // mwidgetMesure - from ref 128130 z 2001 label "mwidgetMesure" italic xyz 550 427 2001 to ref 129794 + from ref 128130 z 2001 label "mwidgetMesure" italic xyz 532 427 2001 to ref 129794 no_role_a no_role_b no_multiplicity_a no_multiplicity_b end @@ -210,6 +215,18 @@ relationcanvas 142082 relation_ref 136066 // no_role_a no_role_b no_multiplicity_a no_multiplicity_b end +relationcanvas 142338 relation_ref 139010 // + decenter_end 710 + from ref 128002 z 2001 to point 800 717 + line 142594 z 2001 to ref 142210 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end +relationcanvas 142466 relation_ref 139138 // + from ref 128130 z 2001 to ref 142210 + no_role_a no_role_b + no_multiplicity_a no_multiplicity_b +end line 128514 -_-_ from ref 128386 z 2006 to ref 128258 line 129666 -_-_ diff --git a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/2.session b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/2.session index c3a1aa2..dd5c753 100644 --- a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/2.session +++ b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/2.session @@ -1,9 +1,9 @@ window_sizes 1397 856 329 1062 729 70 diagrams active classdiagram_ref 128002 // wxVtkViewer class Diagram 1 - 1058 709 100 4 443 0 + 1058 709 100 4 180 0 classdiagram_ref 128130 // wxVtkViewer class Diagram 2 - 870 691 100 4 240 0 + 870 691 100 4 9 0 end show_stereotypes selected classdiagram_ref 128002 // wxVtkViewer class Diagram 1 diff --git a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/wxVtkViewer.prj b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/wxVtkViewer.prj index 1fde197..8ee0996 100644 --- a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/wxVtkViewer.prj +++ b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer/wxVtkViewer.prj @@ -1,6 +1,6 @@ format 66 "wxVtkViewer" - revision 4 + revision 5 modified_by 2 "davila" diff --git a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram1_HTML/fig128002.png b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram1_HTML/fig128002.png index 781a333..a7d8956 100644 Binary files a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram1_HTML/fig128002.png and b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram1_HTML/fig128002.png differ diff --git a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram2_HTML/fig128130.png b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram2_HTML/fig128130.png index 78bcd0f..9e183f0 100644 Binary files a/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram2_HTML/fig128130.png and b/lib/doxygen/bouml/wxVtkViewer/wxVtkViewer_classDiagram2_HTML/fig128130.png differ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx index e65ece5..809a8bb 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx @@ -33,8 +33,13 @@ bool vtkInfoTextImageInteractor::OnMouseMove() /*JCP 14/05/2009 * int z = (int)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetVtkBaseData()->GetZ());*/ - int z = (int)((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ(); - double xx=X,yy=Y,zz=z; + double xx,yy,zz; + + int z = (int)((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ(); + xx=X; + yy=Y; + zz=z; + _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransfromeCoordScreenToWorld(xx,yy,zz); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx index d791fd3..4ad8c77 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $ Language: C++ - Date: $Date: 2009/05/14 13:54:35 $ - Version: $Revision: 1.9 $ + Date: $Date: 2009/06/05 06:07:39 $ + Version: $Revision: 1.10 $ Copyright: (c) 2002, 2003 License: @@ -45,13 +45,13 @@ wxMaracas_N_ViewersWidget::wxMaracas_N_ViewersWidget(wxWindow *parent, vtkImageData* imagedata, std::vector *nTypeView) : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL) { - wxwindow1 = NULL; - wxwindow2 = NULL; - wxwindow3 = NULL; - wxwindow4 = NULL; - - _currentwxw = NULL; - + wxwindow1 = NULL; + wxwindow2 = NULL; + wxwindow3 = NULL; + wxwindow4 = NULL; + _currentwxw = NULL; + mvtkmprbasedata = NULL; + wxSizer *sizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(sizer); this->SetAutoLayout(true); @@ -68,7 +68,11 @@ wxMaracas_N_ViewersWidget::~wxMaracas_N_ViewersWidget() { - + if (mvtkmprbasedata!=NULL) + { + delete mvtkmprbasedata; + } + } //------------------------------------------------------------------------------------------------------------ // Methods @@ -104,7 +108,7 @@ } void wxMaracas_N_ViewersWidget::RefreshView() - { + { if (wxwindow1!=NULL) {wxwindow1->RefreshView(); } if (wxwindow2!=NULL) {wxwindow2->RefreshView(); } if (wxwindow3!=NULL) {wxwindow3->RefreshView(); } @@ -144,15 +148,26 @@ } //------------------------------------------------------------------------- - void wxMaracas_N_ViewersWidget::Refresh(bool eraseBackground, const wxRect* rect ) - { - wxPanel::Refresh(false); - } + void wxMaracas_N_ViewersWidget::Refresh(bool eraseBackground, const wxRect* rect ) + { + wxPanel::Refresh(false); + } - void wxMaracas_N_ViewersWidget::UpdateLayout(vtkImageData* imagedata){ + //------------------------------------------------------------------------- + void wxMaracas_N_ViewersWidget::UpdateLayout(vtkImageData* imagedata) + { wxWindow *wxwindow = NULL; - wxSizer *sizer = this->GetSizer(); + wxSizer *sizer = this->GetSizer(); + + if (mvtkmprbasedata!=NULL) + { + delete mvtkmprbasedata; + } + + marImageData *marimagedata = new marImageData( imagedata ); + mvtkmprbasedata = new vtkMPRBaseData(); + mvtkmprbasedata->SetMarImageData(marimagedata); if(_currentwxw != NULL){ _currentwxw->Show(false); @@ -164,16 +179,15 @@ //std::cout<<"size "<size()<size()==1) { - wxwindow1 = new wxMaracas_ViewerWidget(this, imagedata, (*nTypeView)[0]); + wxwindow1 = new wxMaracas_ViewerWidget(this, imagedata, (*nTypeView)[0],mvtkmprbasedata); wxwindow1->ConfigureVTK(); wxwindow = wxwindow1; }else if (nTypeView->size()==2) { - - wxSplitterWindow *spliter = new wxSplitterWindow( this , -1); - wxwindow1 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[0]); - wxwindow2 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[1]); + spliter->SetMinimumPaneSize(1); + wxwindow1 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[0],mvtkmprbasedata); + wxwindow2 = new wxMaracas_ViewerWidget(spliter, imagedata, (*nTypeView)[1],mvtkmprbasedata); wxwindow1->ConfigureVTK(); wxwindow2->ConfigureVTK(); spliter -> SplitVertically( wxwindow1 , wxwindow2 ); @@ -182,9 +196,11 @@ { wxSplitterWindow *spliter = new wxSplitterWindow( this , -1); wxSplitterWindow *spliterA = new wxSplitterWindow( spliter , -1); - wxwindow1 = new wxMaracas_ViewerWidget(spliter , imagedata, (*nTypeView)[0]); - wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1]); - wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2]); + spliter->SetMinimumPaneSize(1); + spliterA->SetMinimumPaneSize(1); + wxwindow1 = new wxMaracas_ViewerWidget(spliter , imagedata, (*nTypeView)[0],mvtkmprbasedata); + wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1],mvtkmprbasedata); + wxwindow3 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[2],mvtkmprbasedata); wxwindow1->ConfigureVTK(); wxwindow2->ConfigureVTK(); wxwindow3->ConfigureVTK(); @@ -195,10 +211,13 @@ wxSplitterWindow *spliter = new wxSplitterWindow( this , -1); wxSplitterWindow *spliterA = new wxSplitterWindow( spliter , -1); wxSplitterWindow *spliterB = new wxSplitterWindow( spliter , -1); - wxwindow1 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[0]); - wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1]); - wxwindow3 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[2]); - wxwindow4 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[3]); + spliter->SetMinimumPaneSize(1); + spliterA->SetMinimumPaneSize(1); + spliterB->SetMinimumPaneSize(1); + wxwindow1 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[0],mvtkmprbasedata); + wxwindow2 = new wxMaracas_ViewerWidget(spliterA, imagedata, (*nTypeView)[1],mvtkmprbasedata); + wxwindow3 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[2],mvtkmprbasedata); + wxwindow4 = new wxMaracas_ViewerWidget(spliterB, imagedata, (*nTypeView)[3],mvtkmprbasedata); wxwindow1->ConfigureVTK(); wxwindow2->ConfigureVTK(); wxwindow3->ConfigureVTK(); @@ -219,9 +238,15 @@ this->Refresh(); } + +//----------------------------------------------------------------------------------- void wxMaracas_N_ViewersWidget::SetType(std::vector* type){ nTypeView = type; } + + + +//----------------------------------------------------------------------------------- void wxMaracas_N_ViewersWidget::SetImage( vtkImageData *image ) { if (wxwindow1!=NULL) { @@ -235,44 +260,26 @@ } - +//----------------------------------------------------------------------------------- double wxMaracas_N_ViewersWidget :: GetX() { - return wxwindow1->GetX(); + return mvtkmprbasedata->GetX(); +// return wxwindow1->GetX(); } +//----------------------------------------------------------------------------------- double wxMaracas_N_ViewersWidget :: GetY() { - return wxwindow1->GetY(); + return mvtkmprbasedata->GetY(); +// return wxwindow1->GetY(); } +//----------------------------------------------------------------------------------- double wxMaracas_N_ViewersWidget :: GetZ() { - return wxwindow1->GetZ(); + return mvtkmprbasedata->GetZ(); +// return wxwindow1->GetZ(); } -/* -double wxMaracas_N_ViewersWidget :: GetZ(int iWin) - { - double answerVal = 0.0; - if (iWin==1) - { - answerVal = wxwindow1->GetZ(); - } - if (iWin==2) - { - answerVal = wxwindow2->GetZ(); - } - if (iWin==3) - { - answerVal = wxwindow3->GetZ(); - } - if (iWin==4) - { - answerVal = wxwindow4->GetZ(); - } - return answerVal; - } -*/ diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h index 8d7a320..2efb923 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.h @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_N_ViewersWidget.h,v $ Language: C++ - Date: $Date: 2009/05/14 13:54:35 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/06/05 06:07:39 $ + Version: $Revision: 1.6 $ Copyright: (c) 2002, 2003 License: @@ -94,6 +94,8 @@ class creaMaracasVisu_EXPORT wxMaracas_N_ViewersWidget : public wxPanel std::vector *nTypeView; + vtkMPRBaseData* mvtkmprbasedata; + DECLARE_EVENT_TABLE( ); }; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index f10eac6..e3215c4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $ Language: C++ - Date: $Date: 2009/05/14 13:54:35 $ - Version: $Revision: 1.12 $ + Date: $Date: 2009/06/05 06:07:39 $ + Version: $Revision: 1.13 $ Copyright: (c) 2002, 2003 License: @@ -30,7 +30,7 @@ //------------------------------------------------------------------------------------------------------------ - wxMaracas_ViewerWidget::wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type) + wxMaracas_ViewerWidget::wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata) : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL) { wxPanel *panel = this; @@ -38,9 +38,18 @@ mType = type; - marImageData *marimagedata = new marImageData( imagedata ); - mvtkmprbasedata = new vtkMPRBaseData(); - mvtkmprbasedata->SetMarImageData(marimagedata); + + if (vtkmprbasedata==NULL) + { + minternalVtkmprbasedata = true; + mvtkmprbasedata = new vtkMPRBaseData(); + marImageData *marimagedata = new marImageData( imagedata ); + mvtkmprbasedata->SetMarImageData(marimagedata); + } else { + minternalVtkmprbasedata = false; + mvtkmprbasedata = vtkmprbasedata; + } + mvtk2Dbaseview = NULL; mvtkmpr2Dview_X = NULL; @@ -191,7 +200,12 @@ wxMaracas_ViewerWidget::~wxMaracas_ViewerWidget() { - if (mvtkmprbasedata) { delete mvtkmprbasedata; } + + if (minternalVtkmprbasedata==true) + { + if (mvtkmprbasedata) { delete mvtkmprbasedata; } + } + if (mvtk2Dbaseview) { delete mvtk2Dbaseview; } if (mvtkmpr2Dview_X) { delete mvtkmpr2Dview_X; } if (mvtkmpr2Dview_Y) { delete mvtkmpr2Dview_Y; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h index 2f38aaa..caa733e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.h @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMaracas_ViewerWidget.h,v $ Language: C++ - Date: $Date: 2009/05/14 13:54:35 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/06/05 06:07:39 $ + Version: $Revision: 1.6 $ Copyright: (c) 2002, 2003 License: @@ -54,7 +54,7 @@ // Constructors & Destructors //------------------------------------------------------------------------------------------------------------ - wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type); + wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata=NULL); ~wxMaracas_ViewerWidget(); //------------------------------------------------------------------------------------------------------------ @@ -79,6 +79,7 @@ private: int mType; + bool minternalVtkmprbasedata; vtkMPRBaseData *mvtkmprbasedata; wxVtk2DBaseView *mvtk2Dbaseview; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 716bedf..d7c40b1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -90,7 +90,7 @@ vtkRenderWindow* wxVtkBaseView::GetRenWin() // virtual } //---------------------------------------------------------------------------- - + void wxVtkBaseView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual { GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index 5c9562e..52eb4cf 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -137,21 +137,21 @@ void wxVtkMPR2DView::Configure(){ } */ - if (_direction==0) { + if (_direction==0) { // YZ camera->SetViewUp ( 0 , 1 , 0 ); camera->SetPosition ( 10000,(y1+y2)/2 , (z1+z2)/2 ); camera->SetFocalPoint ( 0 , (y1+y2)/2 , (z1+z2)/2 ); camera->SetParallelScale( (z2-z1)/3.0 ); } - if (_direction==1) { + if (_direction==1) { // XZ camera->SetViewUp ( 0 , 0 , -1 ); camera->SetPosition ((x1+x2)/2 , 10000 , (z1+z2)/2 ); camera->SetFocalPoint ((x1+x2)/2 , 0 , (z1+z2)/2 ); camera->SetParallelScale( (x2-x1)/3.0 ); } - if (_direction==2) { + if (_direction==2) { // XY camera->SetViewUp ( 0 , 1 , 0 ); camera->SetPosition ((x1+x2)/2 , (y1+y2)/2 , 10000); camera->SetFocalPoint ((x1+x2)/2 , (y1+y2)/2 , 0 ); @@ -220,25 +220,23 @@ void wxVtkMPR2DView::Refresh() y = (int)(y*spc[1]); z = (int)(z*spc[2]); - - if ((x!=_backX) || (y!=_backY) || (z!=_backZ)) { - if (_direction==0) { + if (_direction==0) { // YZ _imageViewer2XYZ->SetXSlice( (int)(GetVtkmprbasedata()->GetX()) ); - _ptsA->SetPoint(0, -x2, y1 , z ); - _ptsA->SetPoint(1, -x2, y2 , z ); - _ptsB->SetPoint(0, -x2, y , z1); - _ptsB->SetPoint(1, -x2, y , z2); + _ptsA->SetPoint(0, x2, y1 , z ); + _ptsA->SetPoint(1, x2, y2 , z ); + _ptsB->SetPoint(0, x2, y , z1); + _ptsB->SetPoint(1, x2, y , z2); } - if (_direction==1) { + if (_direction==1) { // XZ _imageViewer2XYZ->SetYSlice( (int)(GetVtkmprbasedata()->GetY()) ); _ptsA->SetPoint(0, x1 , y2 , z ); _ptsA->SetPoint(1, x2 , y2 , z ); _ptsB->SetPoint(0, x , y2 , z1); _ptsB->SetPoint(1, x , y2 , z2); } - if (_direction==2) { + if (_direction==2) { // XY _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); _imageViewer2XYZ->SetZSlice( (int)(GetVtkmprbasedata()->GetZ()) ); // _ptsA->SetPoint(0, x1 , y , -z2 ); @@ -464,9 +462,11 @@ void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z) } Refresh(); } + //------------------------------------------------------------------- -void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual +void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual { + wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction); if (_direction==0) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h index df52dfe..20ff77c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h @@ -29,7 +29,9 @@ public: void MoveY(double x, double y, double z); void MoveZ(double x, double y, double z); void ChangeAxisColor(double x, double y, double z); - virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type); +// virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type); + virtual void TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type); + void SetVisibleAxis(bool ok);