]> Creatis software - creaMaracasVisu.git/commitdiff
#3466 FixAxis in SetPosition box
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 21 Jun 2021 14:40:52 +0000 (16:40 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 21 Jun 2021 14:40:52 +0000 (16:40 +0200)
bbtk/bbs/appli/exampleSetPosition-FixAxis.bbg [new file with mode: 0644]
bbtk/bbs/appli/exampleSetPosition-FixAxis.bbs [new file with mode: 0644]
bbtk/src/bbcreaMaracasVisuSetPosition.cxx
bbtk/src/bbcreaMaracasVisuSetPosition.h

diff --git a/bbtk/bbs/appli/exampleSetPosition-FixAxis.bbg b/bbtk/bbs/appli/exampleSetPosition-FixAxis.bbg
new file mode 100644 (file)
index 0000000..c8a13a1
--- /dev/null
@@ -0,0 +1,96 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C11/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleSetPosition-FixAxis.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+vtk:LoadHola:Box00
+ISEXEC:FALSE
+-63.694843:55.476154:-900.000000
+-28.144843:45.476154:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+-90.247532:24.814120:-900.000000
+-26.527532:14.814120:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+7.513914:3.088466:-900.000000
+71.233914:-6.911534:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:SetPosition:Box03
+ISEXEC:FALSE
+-65.275361:-68.752498:-900.000000
+-28.725361:-78.752498:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box04
+ISEXEC:FALSE
+38.722672:-62.746533:-900.000000
+77.802672:-72.746533:-900.000000
+FIN_BOX
+BOX
+wx:CheckBox:Box05
+ISEXEC:FALSE
+1.106362:36.509947:-900.000000
+37.431362:26.509947:-900.000000
+PORT
+Title:"Fix Axis for the second viewer"
+FIN_BOX
+BOX
+creaVtk:OutputWindow:Box07
+ISEXEC:TRUE
+-25.446327:-108.581532:-900.000000
+15.153673:-118.581532:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box08
+ISEXEC:TRUE
+24.267396:-108.179945:-900.000000
+63.347396:-118.179945:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box00:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box03:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box01:Point:Box03:Point
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView1:Box03:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box04:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box04:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box03:FixAxis2D
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box08:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box08:Widget1
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/appli/exampleSetPosition-FixAxis.bbs b/bbtk/bbs/appli/exampleSetPosition-FixAxis.bbs
new file mode 100644 (file)
index 0000000..0af8760
--- /dev/null
@@ -0,0 +1,63 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /home/davila/Creatis/C11/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleSetPosition-FixAxis.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include wx
+include creaVtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola Box00
+
+new creaMaracasVisu:ViewerNV Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new creaMaracasVisu:SetPosition Box03
+
+new wx:LayoutSplit Box04
+
+new wx:CheckBox Box05
+  set Box05.Title "Fix Axis for the second viewer"
+
+new creaVtk:OutputWindow Box07
+
+new wx:LayoutSplit Box08
+  set Box08.Orientation "H"
+
+
+connect Box00.Out Box01.In
+
+connect Box01.BoxChange Box03.BoxExecute
+
+connect Box01.Point Box03.Point
+
+connect Box02.wxVtkBaseView1 Box03.wxVtkBaseView
+
+connect Box01.Widget Box04.Widget1
+
+connect Box02.Widget Box04.Widget2
+
+connect Box00.Out Box02.In
+
+connect Box05.Out Box03.FixAxis2D
+
+connect Box04.Widget Box08.Widget2
+
+connect Box05.Widget Box08.Widget1
+
+
+
+# Complex input ports
+exec Box07
+exec Box08
index 1a45b0c63eda11167ab4f8f9a0b8436c717b377f..c83106922cc2a71e468d8e89af92aac48e4e09a7 100644 (file)
@@ -41,6 +41,7 @@ void SetPosition::Process()
                        vtkmprbasedata->SetX( bbGetInputPoint()[0] );
                        vtkmprbasedata->SetY( bbGetInputPoint()[1] );
                        vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
+                       vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
                        wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 #if wxMAJOR_VERSION <= 2
@@ -60,6 +61,7 @@ void SetPosition::bbUserSetDefaultValues()
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
    bbSetInputwxVtkBaseView( NULL ) ;
+   bbSetInputFixAxis2D( false ) ;
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index 40badd9495f0952cfd364b990da1afafa850aa2d..b1692f097c578f4ab374b1b185ddb7d1cdc08ba0 100644 (file)
@@ -22,6 +22,7 @@ class bbcreaMaracasVisu_EXPORT SetPosition
 //===== 
   BBTK_DECLARE_INPUT(Point,std::vector<int>);
   BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*);
+  BBTK_DECLARE_INPUT(FixAxis2D,bool);
 //  BBTK_DECLARE_OUTPUT(Out,double);
   BBTK_PROCESS(Process);
   void Process();
@@ -37,6 +38,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(SetPosition,bbtk::AtomicBlackBox);
   BBTK_CATEGORY("empty");
   BBTK_INPUT(SetPosition,Point,"vector with point to be set [X Y Z]",std::vector<int>,"");
   BBTK_INPUT(SetPosition,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,"");
+  BBTK_INPUT(SetPosition,FixAxis2D,"(default false) true/false",bool,"");
 //  BBTK_OUTPUT(SetPosition,Out,"First output",double,"");
 BBTK_END_DESCRIBE_BLACK_BOX(SetPosition);
 //=====