From: Eduardo DAVILA Date: Wed, 4 Jun 2014 14:04:54 +0000 (+0200) Subject: 2345 creaMaracasVisu Feature Test Phase Normal Ruler01XY X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1e7de89ec5e380426c57ee4e85c6a5ccd5aa44ad;p=creaMaracasVisu.git 2345 creaMaracasVisu Feature Test Phase Normal Ruler01XY --- diff --git a/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg new file mode 100644 index 0000000..79cfb18 --- /dev/null +++ b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg @@ -0,0 +1,61 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:5 +BOX +creaMaracasVisu:ContourControlPoints_Widget:Box00 +ISEXEC:FALSE +-113.173864:13.069948:-900.000000 +-41.998864:3.069948:-900.000000 +FIN_BOX +BOX +vtk:LoadHola:Box01 +ISEXEC:FALSE +-37.427577:74.558110:-900.000000 +8.147423:64.558110:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:Box02 +ISEXEC:FALSE +-52.873879:47.230038:-900.000000 +7.766121:37.230038:-900.000000 +FIN_BOX +BOX +wx:LayoutSplit:Box03 +ISEXEC:TRUE +-55.547277:-20.199010:-900.000000 +-9.972277:-30.199010:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +std:MagicBox:Box04 +ISEXEC:TRUE +-108.718200:-16.931523:-900.000000 +-63.143200:-26.931523:-900.000000 +FIN_BOX +CONNECTIONS:5 +CONNECTION +Box01:Out:Box02:In +NumberOfControlPoints:0 +CONNECTION +Box02:wxVtkBaseView4:Box00:wxvtkbaseview +NumberOfControlPoints:0 +CONNECTION +Box00:Widget_Contour:Box03:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box02:Widget:Box03:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box00:BoxChange2:Box04:In +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs new file mode 100644 index 0000000..e66b3b4 --- /dev/null +++ b/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs @@ -0,0 +1,46 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/appli/exampleContourControlPoints_Wdiget.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include creaMaracasVisu +include vtk +include wx +include std + +author "Author ??" +description "Description ??" +category "" + +new ContourControlPoints_Widget Box00 + +new LoadHola Box01 + +new ViewerNV Box02 + +new LayoutSplit Box03 + set Box03.Orientation "H" + +new MagicBox Box04 + + +connect Box01.Out Box02.In + +connect Box02.wxVtkBaseView4 Box00.wxvtkbaseview + +connect Box00.Widget_Contour Box03.Widget1 + +connect Box02.Widget Box03.Widget2 + +connect Box00.BoxChange2 Box04.In + + + +# Complex input ports +exec Box03 +exec Box04 diff --git a/bbtk/bbs/appli/exampleRuler01_XY.bbg b/bbtk/bbs/appli/exampleRuler01_XY.bbg index 3c30c40..e6ff412 100644 --- a/bbtk/bbs/appli/exampleRuler01_XY.bbg +++ b/bbtk/bbs/appli/exampleRuler01_XY.bbg @@ -9,7 +9,7 @@ DESCRIPTION:Description ?? AUTHOR:Author ?? COMPLEXBOX:FALSE COMPLEXINPUTS:0 -BOXES:17 +BOXES:6 BOX creaMaracasVisu:ViewerNV:Box01 ISEXEC:FALSE @@ -19,125 +19,38 @@ FIN_BOX BOX vtk:LoadHola:Box02 ISEXEC:FALSE -55.791771:86.177587:-900.000000 -101.366771:76.177587:-900.000000 -FIN_BOX -BOX -wx:LayoutTab:Box04 -ISEXEC:FALSE --33.721024:-109.351051:-900.000000 -23.838976:-119.351051:-900.000000 +71.578732:103.878119:-900.000000 +117.153732:93.878119:-900.000000 FIN_BOX BOX wx:LayoutSplit:Box05 ISEXEC:TRUE -76.915956:-140.803447:-900.000000 -122.490956:-150.803447:-900.000000 +60.172210:-18.813294:-900.000000 +105.747210:-28.813294:-900.000000 PORT Orientation:"H" FIN_BOX BOX itk:ImageReader:Box06 ISEXEC:FALSE --45.304327:88.276684:-900.000000 -0.270673:78.276684:-900.000000 +13.059589:103.106859:-900.000000 +58.634589:93.106859:-900.000000 PORT In:"/tmpEED/tmpIulia/coeur_t1_VGpost_z1_pag0001_USHORT_spc-tmpEED.mhd" FIN_BOX BOX vtk:vtkImageDataPointerRelay:Box07 ISEXEC:FALSE -57.565779:70.670201:-900.000000 -128.740779:60.670201:-900.000000 +58.044172:69.713415:-900.000000 +129.219172:59.713415:-900.000000 FIN_BOX BOX creaMaracasVisu:Ruler01_XY_Widget:Box09 ISEXEC:FALSE -50.863528:26.572260:-900.000000 -96.438528:16.572260:-900.000000 -FIN_BOX -BOX -creaMaracasVisu:PanelButtonContainerSettings:Box10 -ISEXEC:FALSE --57.656044:-17.197832:-900.000000 -13.518956:-27.197832:-900.000000 -PORT -ButtonDescription:"Ruler 01" -PORT -ButtonName:"Ruler 01" -PORT -GroupName:"Ruler" -FIN_BOX -BOX -creaMaracasVisu:PanelButtonContainer:Box11 -ISEXEC:FALSE --79.899600:-82.362357:-900.000000 --8.724600:-92.362357:-900.000000 -FIN_BOX -BOX -creaMaracasVisu:ContourControlPoints_Widget:Box13 -ISEXEC:FALSE -114.360380:24.301866:-900.000000 -185.535380:14.301866:-900.000000 -FIN_BOX -BOX -std:MagicBox:Box14 -ISEXEC:TRUE -116.103305:-6.968508:-900.000000 -161.678305:-16.968508:-900.000000 -FIN_BOX -BOX -creaMaracasVisu:PanelButtonContainerSettings:Box15 -ISEXEC:FALSE --68.845012:-53.380556:-900.000000 -2.329988:-63.380556:-900.000000 -PORT -ButtonDescription:"Ruler 02" -PORT -ButtonName:"Ruler 02" -PORT -GroupName:"Ruler" -FIN_BOX -BOX -toolsbbtk:ImageVtkPropertiesWidget:Box16 -ISEXEC:FALSE --23.191903:52.199106:-900.000000 -47.983097:42.199106:-900.000000 -FIN_BOX -BOX -creaMaracasVisu:PanelButtonContainerSettings:Box17 -ISEXEC:FALSE --47.001046:11.642034:-900.000000 -24.173954:1.642034:-900.000000 -PORT -ButtonDescription:"Image properties" -PORT -ButtonName:"Image properties" -PORT -GroupName:"Information" -FIN_BOX -BOX -wx:LayoutLine:Box18 -ISEXEC:FALSE --117.896873:-16.920169:-900.000000 --60.336873:-26.920169:-900.000000 +53.445704:21.039026:-900.000000 +99.020704:11.039026:-900.000000 FIN_BOX -BOX -wx:LayoutLine:Box19 -ISEXEC:FALSE --111.282956:11.161994:-900.000000 --53.722956:1.161994:-900.000000 -FIN_BOX -BOX -std:MagicBox:Box20 -ISEXEC:FALSE --120.177863:-52.869017:-900.000000 --74.602863:-62.869017:-900.000000 -FIN_BOX -CONNECTIONS:22 -CONNECTION -Box04:Widget:Box05:Widget1 -NumberOfControlPoints:0 +CONNECTIONS:8 CONNECTION Box01:Widget:Box05:Widget2 NumberOfControlPoints:0 @@ -157,48 +70,9 @@ CONNECTION Box02:Out:Box07:In NumberOfControlPoints:0 CONNECTION -Box11:Widget:Box04:Widget1 -NumberOfControlPoints:0 -CONNECTION -Box09:Widget:Box10:Widget -NumberOfControlPoints:0 -CONNECTION -Box01:Renderer4:Box13:vtkRenderer -NumberOfControlPoints:0 -CONNECTION -Box01:wxVtkBaseView4:Box13:wxvtkbaseview -NumberOfControlPoints:0 -CONNECTION -Box13:BoxChange2:Box14:BoxExecute -NumberOfControlPoints:0 -CONNECTION -Box13:Widget_Contour:Box15:Widget -NumberOfControlPoints:0 -CONNECTION -Box15:Out:Box11:In -NumberOfControlPoints:0 -CONNECTION -Box10:Out:Box15:In -NumberOfControlPoints:0 -CONNECTION -Box07:Out:Box16:in -NumberOfControlPoints:0 -CONNECTION -Box16:widget:Box17:Widget -NumberOfControlPoints:0 -CONNECTION -Box10:Widget:Box18:Widget1 -NumberOfControlPoints:0 -CONNECTION -Box17:Widget:Box19:Widget1 -NumberOfControlPoints:0 -CONNECTION -Box17:Out:Box10:In -NumberOfControlPoints:0 -CONNECTION -Box15:Widget:Box20:In +Box09:Widget:Box05:Widget1 NumberOfControlPoints:0 CONNECTION -Box01:Renderer4:Box09:vtkRenderer +Box01:wxVtkBaseView4:Box09:wxvtkbaseview NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/appli/exampleRuler01_XY.bbs b/bbtk/bbs/appli/exampleRuler01_XY.bbs index cb4e6ff..a643659 100644 --- a/bbtk/bbs/appli/exampleRuler01_XY.bbs +++ b/bbtk/bbs/appli/exampleRuler01_XY.bbs @@ -12,8 +12,6 @@ include creaMaracasVisu include vtk include wx include itk -include std -include toolsbbtk author "Author ??" description "Description ??" @@ -23,8 +21,6 @@ new ViewerNV Box01 new LoadHola Box02 -new LayoutTab Box04 - new LayoutSplit Box05 set Box05.Orientation "H" @@ -35,37 +31,6 @@ new vtkImageDataPointerRelay Box07 new Ruler01_XY_Widget Box09 -new PanelButtonContainerSettings Box10 - set Box10.ButtonDescription "Ruler 01" - set Box10.ButtonName "Ruler 01" - set Box10.GroupName "Ruler" - -new PanelButtonContainer Box11 - -new ContourControlPoints_Widget Box13 - -new MagicBox Box14 - -new PanelButtonContainerSettings Box15 - set Box15.ButtonDescription "Ruler 02" - set Box15.ButtonName "Ruler 02" - set Box15.GroupName "Ruler" - -new ImageVtkPropertiesWidget Box16 - -new PanelButtonContainerSettings Box17 - set Box17.ButtonDescription "Image properties" - set Box17.ButtonName "Image properties" - set Box17.GroupName "Information" - -new LayoutLine Box18 - -new LayoutLine Box19 - -new MagicBox Box20 - - -connect Box04.Widget Box05.Widget1 connect Box01.Widget Box05.Widget2 @@ -79,38 +44,11 @@ connect Box01.Point Box09.Point connect Box02.Out Box07.In -connect Box11.Widget Box04.Widget1 - -connect Box09.Widget Box10.Widget - -connect Box01.Renderer4 Box13.vtkRenderer - -connect Box01.wxVtkBaseView4 Box13.wxvtkbaseview - -connect Box13.BoxChange2 Box14.BoxExecute - -connect Box13.Widget_Contour Box15.Widget - -connect Box15.Out Box11.In - -connect Box10.Out Box15.In - -connect Box07.Out Box16.in - -connect Box16.widget Box17.Widget - -connect Box10.Widget Box18.Widget1 - -connect Box17.Widget Box19.Widget1 - -connect Box17.Out Box10.In - -connect Box15.Widget Box20.In +connect Box09.Widget Box05.Widget1 -connect Box01.Renderer4 Box09.vtkRenderer +connect Box01.wxVtkBaseView4 Box09.wxvtkbaseview # Complex input ports exec Box05 -exec Box14 diff --git a/bbtk/bbs/boxes/ContourControlPoints_Widget.bbg b/bbtk/bbs/boxes/ContourControlPoints_Widget.bbg index 65d7966..f0d9b06 100644 --- a/bbtk/bbs/boxes/ContourControlPoints_Widget.bbg +++ b/bbtk/bbs/boxes/ContourControlPoints_Widget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/All-Vtk_5-10-1/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ContourControlPoints_Widget.bbg +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ContourControlPoints_Widget.bbg # ---------------------------------- APP_START @@ -19,16 +19,12 @@ COMPLEX_PORT BoxChange2 -35.299241:-57.197844:-900.000000 FIN_COMPLEX_PORT -COMPLEXINPUTS:2 -COMPLEX_PORT -vtkRenderer --66.952546:87.647568:-900.000000 -FIN_COMPLEX_PORT +COMPLEXINPUTS:1 COMPLEX_PORT wxvtkbaseview -38.396047:99.501040:-900.000000 +38.693091:86.728137:-900.000000 FIN_COMPLEX_PORT -BOXES:3 +BOXES:5 BOX creaMaracasVisu:ContourControlPoints_Interface:Box00 ISEXEC:FALSE @@ -51,7 +47,19 @@ Active:"true" PORT BoxProcessMode:"Reactive" FIN_BOX -CONNECTIONS:9 +BOX +creaMaracasVisu:wxVtkBaseView_Info:Box03 +ISEXEC:FALSE +67.132003:45.744816:-900.000000 +138.307003:35.744816:-900.000000 +FIN_BOX +BOX +std:MagicBox:Box05 +ISEXEC:FALSE +63.071418:65.447772:-900.000000 +108.646418:55.447772:-900.000000 +FIN_BOX +CONNECTIONS:11 CONNECTION Box00:Active:Box01:Active NumberOfControlPoints:0 @@ -65,18 +73,24 @@ CONNECTION Box00:BoxChange:Box01:BoxExecute NumberOfControlPoints:0 CONNECTION -vtkRenderer:vtkRenderer:Box02:Renderer +Box00:OpenClose:Box01:OpenClose +NumberOfControlPoints:0 +CONNECTION +Box00:Visible:Box01:Visible NumberOfControlPoints:0 CONNECTION -wxvtkbaseview:wxvtkbaseview:Box01:wxVtkBaseView +Box00:BoxChange:BoxChange2:BoxChange2 NumberOfControlPoints:0 CONNECTION -Box00:OpenClose:Box01:OpenClose +wxvtkbaseview:wxvtkbaseview:Box05:In NumberOfControlPoints:0 CONNECTION -Box00:Visible:Box01:Visible +Box05:Out:Box03:wxVtkBaseView NumberOfControlPoints:0 CONNECTION -Box00:BoxChange:BoxChange2:BoxChange2 +Box03:vtkRenderer:Box02:Renderer +NumberOfControlPoints:0 +CONNECTION +Box05:Out:Box01:wxVtkBaseView NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/ContourControlPoints_Widget.bbs b/bbtk/bbs/boxes/ContourControlPoints_Widget.bbs index 894a381..096dd1b 100644 --- a/bbtk/bbs/boxes/ContourControlPoints_Widget.bbs +++ b/bbtk/bbs/boxes/ContourControlPoints_Widget.bbs @@ -1,12 +1,13 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/All-Vtk_5-10-1/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ContourControlPoints_Widget.bbs +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ContourControlPoints_Widget.bbs # ---------------------------------- include std include itkvtk include creaMaracasVisu include vtk +include std define ContourControlPoints_Widget creaMaracasVisu @@ -23,16 +24,22 @@ new UpdateRender Box02 set Box02.Active "true" set Box02.BoxProcessMode "Reactive" +new wxVtkBaseView_Info Box03 + +new MagicBox Box05 + connect Box00.Active Box01.Active connect Box00.BoxChange Box02.BoxExecute connect Box00.BoxChange Box01.BoxExecute connect Box00.OpenClose Box01.OpenClose connect Box00.Visible Box01.Visible +connect Box05.Out Box03.wxVtkBaseView +connect Box03.vtkRenderer Box02.Renderer +connect Box05.Out Box01.wxVtkBaseView # Complex input ports -input vtkRenderer Box02.Renderer " " -input wxvtkbaseview Box01.wxVtkBaseView " " +input wxvtkbaseview Box05.In " " # Complex output ports output Widget_Contour Box00.Widget " " diff --git a/bbtk/bbs/boxes/Ruler01_XY.bbg b/bbtk/bbs/boxes/Ruler01_XY.bbg index cc22f51..3483a74 100644 --- a/bbtk/bbs/boxes/Ruler01_XY.bbg +++ b/bbtk/bbs/boxes/Ruler01_XY.bbg @@ -11,7 +11,7 @@ COMPLEXBOX:TRUE COMPLEXBOXNAME:Ruler01_XY PACKAGENAME:creaMaracasVisu COMPLEXOUTPUTS:0 -COMPLEXINPUTS:7 +COMPLEXINPUTS:8 COMPLEX_PORT SizeReal -220.407968:85.537270:-900.000000 @@ -40,6 +40,10 @@ COMPLEX_PORT Angle -60.078956:86.721371:-900.000000 FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview +105.349495:86.477605:-900.000000 +FIN_COMPLEX_PORT BOXES:20 BOX vtk:ImageVtkProperties:Box00 @@ -48,102 +52,46 @@ ISEXEC:FALSE -116.761304:52.553214:-900.000000 FIN_BOX BOX -creaMaracasVisu:DrawAxe3D:Box01 -ISEXEC:FALSE --57.629787:-174.298503:-900.000000 --12.054787:-184.298503:-900.000000 -PORT -Colour:"1 1 0" -PORT -lstPointX:"0 286.1111" -PORT -lstPointY:"0 0" -PORT -lstPointZ:"-900 -900" -FIN_BOX -BOX -vtk:Transform:Box02 -ISEXEC:FALSE --114.952874:-33.183857:-900.000000 --69.377874:-43.183857:-900.000000 -FIN_BOX -BOX std:ConcatStrings:Box03 ISEXEC:FALSE -102.095937:63.057960:-900.000000 -56.520937:53.057960:-900.000000 FIN_BOX BOX -vtk:Transform:Box04 -ISEXEC:FALSE --69.817468:-65.633767:-900.000000 --24.242468:-75.633767:-900.000000 -PORT -RotateWXYZ:"45 0 0 1" -FIN_BOX -BOX std:ConcatStrings:Box05 ISEXEC:FALSE --155.025961:-9.360655:-900.000000 --109.450961:-19.360655:-900.000000 -FIN_BOX -BOX -std:ConcatStrings:Box06 -ISEXEC:FALSE --64.162536:-40.219923:-900.000000 --18.587536:-50.219923:-900.000000 -PORT -In2:" " -PORT -In3:"0 0 1" +-153.040731:-106.636945:-900.000000 +-107.465731:-116.636945:-900.000000 FIN_BOX BOX vtk:UpdateRender:Box07 ISEXEC:FALSE -75.853379:-88.400738:-900.000000 -121.428379:-98.400738:-900.000000 +117.890633:-108.600457:-900.000000 +163.465633:-118.600457:-900.000000 PORT Active:"true" FIN_BOX BOX -std:Mul:Box10 -ISEXEC:FALSE --62.766821:-15.289162:-900.000000 --29.991821:-25.289162:-900.000000 -PORT -In2:"-1" -FIN_BOX -BOX -std:ConcatStrings:Box11 -ISEXEC:FALSE --197.036469:-67.729991:-900.000000 --151.461469:-77.729991:-900.000000 -PORT -In1:"0" -PORT -In2:" " -FIN_BOX -BOX std:GetVectorFloatElement:Box14 ISEXEC:FALSE --190.632636:10.428616:-900.000000 --119.457636:0.428616:-900.000000 +-206.131681:2.977152:-900.000000 +-134.956681:-7.022848:-900.000000 PORT I:"0" FIN_BOX BOX std:Div:Box15 ISEXEC:FALSE --196.583892:-12.972041:-900.000000 --163.808892:-22.972041:-900.000000 +-209.698469:-17.442919:-900.000000 +-176.923469:-27.442919:-900.000000 PORT In1:"1" FIN_BOX BOX std:ConcatStrings:Box16 ISEXEC:FALSE --253.832558:-68.066067:-900.000000 --208.257558:-78.066067:-900.000000 +122.643426:-194.996817:-900.000000 +168.218426:-204.996817:-900.000000 PORT In2:"u (" PORT @@ -156,8 +104,8 @@ FIN_BOX BOX std:Mul:Box17 ISEXEC:FALSE --204.601803:-37.580036:-900.000000 --171.826803:-47.580036:-900.000000 +-224.173311:-46.164514:-900.000000 +-191.398311:-56.164514:-900.000000 FIN_BOX BOX std:MagicBox:Box18 @@ -168,14 +116,14 @@ FIN_BOX BOX std:MagicBox:Box19 ISEXEC:FALSE --18.390676:-58.805704:-900.000000 -27.184324:-68.805704:-900.000000 +-11.287735:-51.026800:-900.000000 +34.287265:-61.026800:-900.000000 FIN_BOX BOX std:MagicBox:Box20 ISEXEC:FALSE -68.418649:-43.082407:-900.000000 -113.993649:-53.082407:-900.000000 +112.639656:-54.547113:-900.000000 +158.214656:-64.547113:-900.000000 PORT BoxProcessMode:"Reactive" FIN_BOX @@ -188,8 +136,8 @@ FIN_BOX BOX vtk:Text2D:Box22 ISEXEC:FALSE -37.826404:-181.780179:-900.000000 -70.601404:-191.780179:-900.000000 +76.588028:-260.395303:-900.000000 +109.363028:-270.395303:-900.000000 PORT Color:"0 1 1" FIN_BOX @@ -199,110 +147,173 @@ ISEXEC:FALSE -50.113589:33.218740:-900.000000 -4.538589:23.218740:-900.000000 FIN_BOX -CONNECTIONS:35 +BOX +creaMaracasVisu:DrawAxe3D:Box25 +ISEXEC:FALSE +-58.274452:-271.614376:-900.000000 +-12.699452:-281.614376:-900.000000 +PORT +Colour:"0 1 1" +PORT +lstPointX:"0 286.1111" +PORT +lstPointY:"0 0" +PORT +lstPointZ:"-900 -900" +FIN_BOX +BOX +vtk:Transform:Box27 +ISEXEC:FALSE +-127.484254:-220.579013:-900.000000 +-81.909254:-230.579013:-900.000000 +PORT +RotateWXYZ:"45 0 0 1" +FIN_BOX +BOX +creaMaracasVisu:ChInfo3Dto2DRuler:Box28 +ISEXEC:FALSE +-67.559786:-150.667179:-900.000000 +-21.984786:-160.667179:-900.000000 +PORT +Direction:"0" +FIN_BOX +BOX +vtk:Transform:Box29 +ISEXEC:FALSE +-157.550533:-151.214722:-900.000000 +-111.975533:-161.214722:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:wxVtkBaseView_Info:Box30 +ISEXEC:FALSE +87.518493:10.369667:-900.000000 +158.693493:0.369667:-900.000000 +FIN_BOX +BOX +std:MagicBox:Box31 +ISEXEC:FALSE +-34.175716:55.173035:-900.000000 +11.399284:45.173035:-900.000000 +FIN_BOX +CONNECTIONS:40 CONNECTION -Box03:Out:Box02:Translate +Box00:Spacing:Box05:In1 NumberOfControlPoints:0 CONNECTION -Box00:Spacing:Box05:In1 +Box00:Spacing:Box14:In NumberOfControlPoints:0 CONNECTION -Box05:Out:Box02:Scale +Box14:Out:Box15:In2 NumberOfControlPoints:0 CONNECTION -Box02:Out:Box04:In +Box15:Out:Box17:In2 NumberOfControlPoints:0 CONNECTION -Box06:Out:Box04:RotateWXYZ +Box17:Out:Box16:In3 NumberOfControlPoints:0 CONNECTION -Box04:Out:Box01:Transform +Box18:Out:Box17:In1 NumberOfControlPoints:0 CONNECTION -Box10:Out:Box06:In1 +Box18:Out:Box16:In1 NumberOfControlPoints:0 CONNECTION -Box11:Out:Box01:lstPointX +Box19:Out:Box07:Renderer NumberOfControlPoints:0 CONNECTION -Box00:Spacing:Box14:In +SizeReal:SizeReal:Box18:In NumberOfControlPoints:0 CONNECTION -Box14:Out:Box15:In2 +Point:Point:Box03:In1 NumberOfControlPoints:0 CONNECTION -Box15:Out:Box17:In2 +BoxExecuteRuler:BoxExecuteRuler:Box20:In NumberOfControlPoints:0 CONNECTION -Box17:Out:Box11:In3 +Box20:BoxChange:Box07:BoxExecute NumberOfControlPoints:0 CONNECTION -Box17:Out:Box16:In3 +Image:Image:Box00:In NumberOfControlPoints:0 CONNECTION -Box18:Out:Box17:In1 +OpacityRuler:OpacityRuler:Box26:In NumberOfControlPoints:0 CONNECTION -Box18:Out:Box16:In1 +Box19:Out:Box22:Renderer NumberOfControlPoints:0 CONNECTION -Box19:Out:Box07:Renderer +Box16:Out:Box22:In +NumberOfControlPoints:0 +CONNECTION +Box26:Out:Box22:Opacity NumberOfControlPoints:0 CONNECTION -Box19:Out:Box01:Renderer +Box20:BoxChange:Box22:BoxExecute NumberOfControlPoints:0 CONNECTION -Box20:BoxChange:Box01:BoxExecute +Box03:Out:Box22:Point NumberOfControlPoints:0 CONNECTION -SizeReal:SizeReal:Box18:In +Box05:Out:Box22:Spacing NumberOfControlPoints:0 CONNECTION -Point:Point:Box03:In1 +Angle:Angle:Box23:In NumberOfControlPoints:0 CONNECTION -vtkRenderer:vtkRenderer:Box19:In +Box23:Out:Box16:In6 NumberOfControlPoints:0 CONNECTION -BoxExecuteRuler:BoxExecuteRuler:Box20:In +Box27:Out:Box25:Transform NumberOfControlPoints:0 CONNECTION -Box20:BoxChange:Box07:BoxExecute +Box23:Out:Box28:Angle NumberOfControlPoints:0 CONNECTION -Image:Image:Box00:In +Box18:Out:Box28:Size NumberOfControlPoints:0 CONNECTION -OpacityRuler:OpacityRuler:Box26:In +Box28:RotationVector:Box27:RotateWXYZ NumberOfControlPoints:0 CONNECTION -Box26:Out:Box01:Opacity +Box28:OutPointX:Box25:lstPointX NumberOfControlPoints:0 CONNECTION -Box19:Out:Box22:Renderer +Box28:OutPointY:Box25:lstPointY NumberOfControlPoints:0 CONNECTION -Box16:Out:Box22:In +Box28:OutPointZ:Box25:lstPointZ NumberOfControlPoints:0 CONNECTION -Box26:Out:Box22:Opacity +Box19:Out:Box25:Renderer NumberOfControlPoints:0 CONNECTION -Box20:BoxChange:Box22:BoxExecute +Box26:Out:Box25:Opacity NumberOfControlPoints:0 CONNECTION -Box03:Out:Box22:Point +Box20:BoxChange:Box25:BoxExecute NumberOfControlPoints:0 CONNECTION -Box05:Out:Box22:Spacing +Box29:Out:Box27:In NumberOfControlPoints:0 CONNECTION -Angle:Angle:Box23:In +Box05:Out:Box29:Scale NumberOfControlPoints:0 CONNECTION -Box23:Out:Box10:In1 +Box03:Out:Box28:CenterPointIn NumberOfControlPoints:0 CONNECTION -Box23:Out:Box16:In6 +wxvtkbaseview:wxvtkbaseview:Box30:wxVtkBaseView +NumberOfControlPoints:0 +CONNECTION +Box30:Direction:Box28:Direction +NumberOfControlPoints:0 +CONNECTION +Box30:vtkRenderer:Box19:In +NumberOfControlPoints:0 +CONNECTION +vtkRenderer:vtkRenderer:Box31:In +NumberOfControlPoints:0 +CONNECTION +Box03:Out:Box29:Translate NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Ruler01_XY.bbs b/bbtk/bbs/boxes/Ruler01_XY.bbs index 3da1b51..544ccc3 100644 --- a/bbtk/bbs/boxes/Ruler01_XY.bbs +++ b/bbtk/bbs/boxes/Ruler01_XY.bbs @@ -6,8 +6,8 @@ include std include itkvtk include vtk -include creaMaracasVisu include std +include creaMaracasVisu define Ruler01_XY creaMaracasVisu @@ -18,35 +18,13 @@ category "" new ImageVtkProperties Box00 -new DrawAxe3D Box01 - set Box01.Colour "1 1 0" - set Box01.lstPointX "0 286.1111" - set Box01.lstPointY "0 0" - set Box01.lstPointZ "-900 -900" - -new Transform Box02 - new ConcatStrings Box03 -new Transform Box04 - set Box04.RotateWXYZ "45 0 0 1" - new ConcatStrings Box05 -new ConcatStrings Box06 - set Box06.In2 " " - set Box06.In3 "0 0 1" - new UpdateRender Box07 set Box07.Active "true" -new Mul Box10 - set Box10.In2 "-1" - -new ConcatStrings Box11 - set Box11.In1 "0" - set Box11.In2 " " - new GetVectorFloatElement Box14 set Box14.I "0" @@ -75,44 +53,67 @@ new Text2D Box22 new MagicBox Box23 +new DrawAxe3D Box25 + set Box25.Colour "0 1 1" + set Box25.lstPointX "0 286.1111" + set Box25.lstPointY "0 0" + set Box25.lstPointZ "-900 -900" + +new Transform Box27 + set Box27.RotateWXYZ "45 0 0 1" + +new ChInfo3Dto2DRuler Box28 + set Box28.Direction "0" + +new Transform Box29 + +new wxVtkBaseView_Info Box30 + +new MagicBox Box31 + -connect Box03.Out Box02.Translate connect Box00.Spacing Box05.In1 -connect Box05.Out Box02.Scale -connect Box02.Out Box04.In -connect Box06.Out Box04.RotateWXYZ -connect Box04.Out Box01.Transform -connect Box10.Out Box06.In1 -connect Box11.Out Box01.lstPointX connect Box00.Spacing Box14.In connect Box14.Out Box15.In2 connect Box15.Out Box17.In2 -connect Box17.Out Box11.In3 connect Box17.Out Box16.In3 connect Box18.Out Box17.In1 connect Box18.Out Box16.In1 connect Box19.Out Box07.Renderer -connect Box19.Out Box01.Renderer -connect Box20.BoxChange Box01.BoxExecute connect Box20.BoxChange Box07.BoxExecute -connect Box26.Out Box01.Opacity connect Box19.Out Box22.Renderer connect Box16.Out Box22.In connect Box26.Out Box22.Opacity connect Box20.BoxChange Box22.BoxExecute connect Box03.Out Box22.Point connect Box05.Out Box22.Spacing -connect Box23.Out Box10.In1 connect Box23.Out Box16.In6 +connect Box27.Out Box25.Transform +connect Box23.Out Box28.Angle +connect Box18.Out Box28.Size +connect Box28.RotationVector Box27.RotateWXYZ +connect Box28.OutPointX Box25.lstPointX +connect Box28.OutPointY Box25.lstPointY +connect Box28.OutPointZ Box25.lstPointZ +connect Box19.Out Box25.Renderer +connect Box26.Out Box25.Opacity +connect Box20.BoxChange Box25.BoxExecute +connect Box29.Out Box27.In +connect Box05.Out Box29.Scale +connect Box03.Out Box28.CenterPointIn +connect Box30.Direction Box28.Direction +connect Box30.vtkRenderer Box19.In +connect Box03.Out Box29.Translate # Complex input ports input SizeReal Box18.In " " input Point Box03.In1 " " -input vtkRenderer Box19.In " " input BoxExecuteRuler Box20.In " " input Image Box00.In " " input OpacityRuler Box26.In " " input Angle Box23.In " " +input wxvtkbaseview Box30.wxVtkBaseView " " +input vtkRenderer Box31.In " " # Complex output ports diff --git a/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbg b/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbg new file mode 100644 index 0000000..c80dd2c --- /dev/null +++ b/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbg @@ -0,0 +1,122 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:TRUE +COMPLEXBOXNAME:Ruler01_XY_MPR_Widget +PACKAGENAME:creaMaracasVisu +COMPLEXOUTPUTS:1 +COMPLEX_PORT +widget +-27.752181:-66.376350:-900.000000 +FIN_COMPLEX_PORT +COMPLEXINPUTS:5 +COMPLEX_PORT +wxvtkbaseview1 +-47.493423:85.259277:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview2 +64.373615:83.256542:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview3 +115.872507:84.400962:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +point3D +6.580414:82.684332:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +image +-68.951294:85.545382:-900.000000 +FIN_COMPLEX_PORT +BOXES:6 +BOX +creaMaracasVisu:Ruler01_XY_Widget:Box00 +ISEXEC:FALSE +-82.112122:10.013673:-900.000000 +-36.537122:0.013673:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:Ruler01_XY_Widget:Box01 +ISEXEC:FALSE +30.041020:11.158093:-900.000000 +75.616020:1.158093:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:Ruler01_XY_Widget:Box02 +ISEXEC:FALSE +93.842425:14.305248:-900.000000 +139.417425:4.305248:-900.000000 +FIN_BOX +BOX +wx:LayoutTab:Box03 +ISEXEC:FALSE +-34.046490:-39.482484:-900.000000 +23.513510:-49.482484:-900.000000 +FIN_BOX +BOX +std:MagicBox:Box04 +ISEXEC:FALSE +12.302513:59.795936:-900.000000 +57.877513:49.795936:-900.000000 +FIN_BOX +BOX +vtk:vtkImageDataPointerRelay:Box06 +ISEXEC:FALSE +-112.725353:60.082041:-900.000000 +-41.550353:50.082041:-900.000000 +FIN_BOX +CONNECTIONS:15 +CONNECTION +Box00:Widget:Box03:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box01:Widget:Box03:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box02:Widget:Box03:Widget3 +NumberOfControlPoints:0 +CONNECTION +wxvtkbaseview2:wxvtkbaseview2:Box01:wxvtkbaseview +NumberOfControlPoints:0 +CONNECTION +wxvtkbaseview3:wxvtkbaseview3:Box02:wxvtkbaseview +NumberOfControlPoints:0 +CONNECTION +point3D:point3D:Box04:In +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box00:Point +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box01:Point +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box02:Point +NumberOfControlPoints:0 +CONNECTION +Box03:Widget:widget:widget +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box00:Image +NumberOfControlPoints:0 +CONNECTION +wxvtkbaseview1:wxvtkbaseview1:Box00:wxvtkbaseview +NumberOfControlPoints:0 +CONNECTION +image:image:Box06:In +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box01:Image +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box02:Image +NumberOfControlPoints:0 +APP_END diff --git a/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbs b/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbs new file mode 100644 index 0000000..eec1b94 --- /dev/null +++ b/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbs @@ -0,0 +1,54 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY_MPR_Widget.bbs +# ---------------------------------- + +include std +include itkvtk +include creaMaracasVisu +include wx +include std +include vtk + +define Ruler01_XY_MPR_Widget creaMaracasVisu + +author "Author ??" +description "Description ??" + +category "" + +new Ruler01_XY_Widget Box00 + +new Ruler01_XY_Widget Box01 + +new Ruler01_XY_Widget Box02 + +new LayoutTab Box03 + +new MagicBox Box04 + +new vtkImageDataPointerRelay Box06 + + +connect Box00.Widget Box03.Widget1 +connect Box01.Widget Box03.Widget2 +connect Box02.Widget Box03.Widget3 +connect Box04.Out Box00.Point +connect Box04.Out Box01.Point +connect Box04.Out Box02.Point +connect Box06.Out Box00.Image +connect Box06.Out Box01.Image +connect Box06.Out Box02.Image + +# Complex input ports +input wxvtkbaseview2 Box01.wxvtkbaseview " " +input wxvtkbaseview3 Box02.wxvtkbaseview " " +input point3D Box04.In " " +input wxvtkbaseview1 Box00.wxvtkbaseview " " +input image Box06.In " " + +# Complex output ports +output widget Box03.Widget " " + + +endefine diff --git a/bbtk/bbs/boxes/Ruler01_XY_Widget.bbg b/bbtk/bbs/boxes/Ruler01_XY_Widget.bbg index f571648..75c7d05 100644 --- a/bbtk/bbs/boxes/Ruler01_XY_Widget.bbg +++ b/bbtk/bbs/boxes/Ruler01_XY_Widget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/All/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY_Widget.bbg +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY_Widget.bbg # ---------------------------------- APP_START @@ -13,26 +13,26 @@ PACKAGENAME:creaMaracasVisu COMPLEXOUTPUTS:1 COMPLEX_PORT Widget --17.579922:-70.904548:-900.000000 +-11.639037:-97.638532:-900.000000 FIN_COMPLEX_PORT COMPLEXINPUTS:4 COMPLEX_PORT Image -19.286079:49.530174:-900.000000 +18.922377:51.712388:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT Point -37.381857:47.999946:-900.000000 -FIN_COMPLEX_PORT -COMPLEX_PORT -vtkRenderer -50.580906:47.081810:-900.000000 +56.294382:48.363648:-900.000000 FIN_COMPLEX_PORT COMPLEX_PORT BoxExecuteRulerInterface -32.960378:48.225485:-900.000000 FIN_COMPLEX_PORT -BOXES:2 +COMPLEX_PORT +wxvtkbaseview +128.971668:62.057674:-900.000000 +FIN_COMPLEX_PORT +BOXES:3 BOX creaMaracasVisu:Ruler01_Interface:Box01 ISEXEC:FALSE @@ -42,23 +42,20 @@ FIN_BOX BOX creaMaracasVisu:Ruler01_XY:Box02 ISEXEC:FALSE -4.728196:-52.959033:-900.000000 -50.303196:-62.959033:-900.000000 +37.997154:-65.434892:-900.000000 +83.572154:-75.434892:-900.000000 FIN_BOX -CONNECTIONS:9 -CONNECTION -BoxExecuteRulerInterface:BoxExecuteRulerInterface:Box01:BoxExecuteRulerInterface -NumberOfControlPoints:0 +BOX +std:ConcatStrings:Box04 +ISEXEC:FALSE +52.436976:20.606915:-900.000000 +98.011976:10.606915:-900.000000 +FIN_BOX +CONNECTIONS:10 CONNECTION Box01:Widget:Widget:Widget NumberOfControlPoints:0 CONNECTION -vtkRenderer:vtkRenderer:Box02:vtkRenderer -NumberOfControlPoints:0 -CONNECTION -Point:Point:Box02:Point -NumberOfControlPoints:0 -CONNECTION Image:Image:Box02:Image NumberOfControlPoints:0 CONNECTION @@ -73,4 +70,16 @@ NumberOfControlPoints:0 CONNECTION Box01:SizeReal:Box02:SizeReal NumberOfControlPoints:0 +CONNECTION +Point:Point:Box04:In1 +NumberOfControlPoints:0 +CONNECTION +BoxExecuteRulerInterface:BoxExecuteRulerInterface:Box01:BoxExecuteRulerInterface +NumberOfControlPoints:0 +CONNECTION +Box04:Out:Box02:Point +NumberOfControlPoints:0 +CONNECTION +wxvtkbaseview:wxvtkbaseview:Box02:wxvtkbaseview +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Ruler01_XY_Widget.bbs b/bbtk/bbs/boxes/Ruler01_XY_Widget.bbs index 06a2076..459083b 100644 --- a/bbtk/bbs/boxes/Ruler01_XY_Widget.bbs +++ b/bbtk/bbs/boxes/Ruler01_XY_Widget.bbs @@ -1,11 +1,12 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/All/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY_Widget.bbs +# - /home/davila/Creatis/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Ruler01_XY_Widget.bbs # ---------------------------------- include std include itkvtk include creaMaracasVisu +include std define Ruler01_XY_Widget creaMaracasVisu @@ -18,17 +19,20 @@ new Ruler01_Interface Box01 new Ruler01_XY Box02 +new ConcatStrings Box04 + connect Box01.Angle Box02.Angle connect Box01.BoxChangeRulerInterface Box02.BoxExecuteRuler connect Box01.Opacity Box02.OpacityRuler connect Box01.SizeReal Box02.SizeReal +connect Box04.Out Box02.Point # Complex input ports -input BoxExecuteRulerInterface Box01.BoxExecuteRulerInterface " " -input vtkRenderer Box02.vtkRenderer " " -input Point Box02.Point " " input Image Box02.Image " " +input Point Box04.In1 " " +input BoxExecuteRulerInterface Box01.BoxExecuteRulerInterface " " +input wxvtkbaseview Box02.wxvtkbaseview " " # Complex output ports output Widget Box01.Widget " " diff --git a/bbtk/src/bbcreaMaracasVisuChInfo3Dto2DRuler.cxx b/bbtk/src/bbcreaMaracasVisuChInfo3Dto2DRuler.cxx new file mode 100644 index 0000000..95a5652 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuChInfo3Dto2DRuler.cxx @@ -0,0 +1,144 @@ +//===== +// 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) +//===== +#include "bbcreaMaracasVisuChInfo3Dto2DRuler.h" +#include "bbcreaMaracasVisuPackage.h" +namespace bbcreaMaracasVisu +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ChInfo3Dto2DRuler) +BBTK_BLACK_BOX_IMPLEMENTATION(ChInfo3Dto2DRuler,bbtk::AtomicBlackBox); +//===== +// 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) +//===== +void ChInfo3Dto2DRuler::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') +// bbSetOutputOut( bbGetInputIn() ); +// std::cout << "Output value = " < rotationvector; + std::vector centerpoint; + std::vector outpointX; + std::vector outpointY; + std::vector outpointZ; + +// RotationVector + rotationvector.push_back( bbGetInputAngle() ); // angle + if (bbGetInputDirection() == 0) + { + rotationvector.push_back(1); // vx + rotationvector.push_back(0); // vy + rotationvector.push_back(0); // vz + outpointX.push_back( 900 ); + outpointX.push_back( 900 ); + outpointY.push_back( 0 ); + outpointY.push_back( 0+bbGetInputSize() ); + outpointZ.push_back( 0 ); + outpointZ.push_back( 0 ); + centerpoint.push_back( bbGetInputCenterPointIn()[0] ); + centerpoint.push_back( bbGetInputCenterPointIn()[1] ); + centerpoint.push_back( bbGetInputCenterPointIn()[2] ); + } // if direction 0 + + if (bbGetInputDirection() == 1) + { + rotationvector.push_back(0); // vx + rotationvector.push_back(1); // vy + rotationvector.push_back(0); // vz + outpointX.push_back( 0 ); + outpointX.push_back( 0+bbGetInputSize() ); + outpointY.push_back( -900 ); + outpointY.push_back( -900 ); + outpointZ.push_back( 0 ); + outpointZ.push_back( 0 ); + centerpoint.push_back( bbGetInputCenterPointIn()[0] ); + centerpoint.push_back( bbGetInputCenterPointIn()[1] ); + centerpoint.push_back( bbGetInputCenterPointIn()[2] ); + } // if direction 1 + + if (bbGetInputDirection() == 2) + { + rotationvector.push_back(0); // vx + rotationvector.push_back(0); // vy + rotationvector.push_back(1); // vz + outpointX.push_back( 0 ); + outpointX.push_back( 0+bbGetInputSize() ); + outpointY.push_back( 0 ); + outpointY.push_back( 0 ); + outpointZ.push_back( -900 ); + outpointZ.push_back( -900 ); + centerpoint.push_back( bbGetInputCenterPointIn()[0] ); + centerpoint.push_back( bbGetInputCenterPointIn()[1] ); + centerpoint.push_back( bbGetInputCenterPointIn()[2] ); + } // if direction 2 + bbSetOutputRotationVector(rotationvector); + bbSetOutputCenterPointOut(centerpoint); + bbSetOutputOutPointX(outpointX); + bbSetOutputOutPointY(outpointY); + bbSetOutputOutPointZ(outpointZ); + + +} +//===== +// 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) +//===== +void ChInfo3Dto2DRuler::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + + + std::vector tmp; + tmp.push_back( 0 ); + tmp.push_back( 0 ); + tmp.push_back( 0 ); + bbSetInputCenterPointIn(tmp); + + bbSetInputDirection(2); + bbSetInputAngle(0); + bbSetInputSize(10); + +} +//===== +// 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) +//===== +void ChInfo3Dto2DRuler::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + +} +//===== +// 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) +//===== +void ChInfo3Dto2DRuler::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaMaracasVisu + + diff --git a/bbtk/src/bbcreaMaracasVisuChInfo3Dto2DRuler.h b/bbtk/src/bbcreaMaracasVisuChInfo3Dto2DRuler.h new file mode 100644 index 0000000..3b81ba7 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuChInfo3Dto2DRuler.h @@ -0,0 +1,61 @@ +//===== +// 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) +//===== +#ifndef __bbcreaMaracasVisuChInfo3Dto2DRuler_h_INCLUDED__ +#define __bbcreaMaracasVisuChInfo3Dto2DRuler_h_INCLUDED__ +#include "bbcreaMaracasVisu_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +namespace bbcreaMaracasVisu +{ + +class bbcreaMaracasVisu_EXPORT ChInfo3Dto2DRuler + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(ChInfo3Dto2DRuler,bbtk::AtomicBlackBox); +//===== +// 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) +//===== + BBTK_DECLARE_INPUT(CenterPointIn,std::vector); + BBTK_DECLARE_INPUT(Angle,double); + BBTK_DECLARE_INPUT(Direction,int); + BBTK_DECLARE_INPUT(Size,int); + BBTK_DECLARE_OUTPUT(OutPointX,std::vector); + BBTK_DECLARE_OUTPUT(OutPointY,std::vector); + BBTK_DECLARE_OUTPUT(OutPointZ,std::vector); + BBTK_DECLARE_OUTPUT(RotationVector,std::vector); + BBTK_DECLARE_OUTPUT(CenterPointOut,std::vector); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(ChInfo3Dto2DRuler,bbtk::AtomicBlackBox); + BBTK_NAME("ChInfo3Dto2DRuler"); + BBTK_AUTHOR("InfoDev"); + BBTK_DESCRIPTION("No Description."); + BBTK_CATEGORY("empty"); + BBTK_INPUT(ChInfo3Dto2DRuler,CenterPointIn,"Center point vector x,y,z ",std::vector,""); + BBTK_INPUT(ChInfo3Dto2DRuler,Angle,"Angle in Deg. (0 default)",double,""); + BBTK_INPUT(ChInfo3Dto2DRuler,Direction,"Direction -1=3D 0=YZ 1=WZ 2=XY(default) ",int,""); + BBTK_INPUT(ChInfo3Dto2DRuler,Size,"Size in Pixels (10 default)",int,""); + BBTK_OUTPUT(ChInfo3Dto2DRuler,OutPointX,"Output Point 2D new order",std::vector,""); + BBTK_OUTPUT(ChInfo3Dto2DRuler,OutPointY,"Output Point 2D new order",std::vector,""); + BBTK_OUTPUT(ChInfo3Dto2DRuler,OutPointZ,"Output Point 2D new order",std::vector,""); + BBTK_OUTPUT(ChInfo3Dto2DRuler,RotationVector,"RotationVector (default ang=0, vx=0, vy=0, vz=1)",std::vector,""); + BBTK_OUTPUT(ChInfo3Dto2DRuler,CenterPointOut,"Center point out",std::vector,""); + + +BBTK_END_DESCRIBE_BLACK_BOX(ChInfo3Dto2DRuler); +//===== +// 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) +//===== +} +// EO namespace bbcreaMaracasVisu + +#endif // __bbcreaMaracasVisuChInfo3Dto2DRuler_h_INCLUDED__ + diff --git a/bbtk/src/bbcreaMaracasVisuChangeInformation3Dto2DforRuler.cxx b/bbtk/src/bbcreaMaracasVisuChangeInformation3Dto2DforRuler.cxx new file mode 100644 index 0000000..48bfc43 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuChangeInformation3Dto2DforRuler.cxx @@ -0,0 +1,143 @@ +//===== +// 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) +//===== +#include "bbcreaMaracasVisuChangeInformation3Dto2DforRuler.h" +#include "bbcreaMaracasVisuPackage.h" +namespace bbcreaMaracasVisu +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ChangeInformation3Dto2DforRuler) +BBTK_BLACK_BOX_IMPLEMENTATION(ChangeInformation3Dto2DforRuler,bbtk::AtomicBlackBox); +//===== +// 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) +//===== +void ChangeInformation3Dto2DforRuler::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') +// bbSetOutputOut( bbGetInputIn() ); +// std::cout << "Output value = " < rotationvector; + std::vector outpointX; + std::vector outpointY; + std::vector outpointZ; + +/* +// RotationVector + rotationvector.push_back( bbGetInputAngle() ); // angle + if (bbGetInputDirection() == 0) + { + rotationvector.push_back(1); // vx + rotationvector.push_back(0); // vy + rotationvector.push_back(0); // vz + } // if direction 0 + + if (bbGetInputDirection() == 1) + { + rotationvector.push_back(0); // vx + rotationvector.push_back(1); // vy + rotationvector.push_back(0); // vz + } // if direction 1 + + if (bbGetInputDirection() == 2) + { + rotationvector.push_back(0); // vx + rotationvector.push_back(0); // vy + rotationvector.push_back(1); // vz + } // if direction 2 + bbSetOutputNormalVector(rotationvector); + + + + if (bbGetInputDirection() == 0) + { + outpointX.push_back( 900 ); + outpointX.push_back( 900 ); + outpointY.push_back( 0 ); + outpointY.push_back( 0+bbGetInputSize() ); + outpointZ.push_back( 0 ); + outpointZ.push_back( 0 ); + } // if direction 0 + + if (bbGetInputDirection() == 1) + { + outpointX.push_back( 0 ); + outpointX.push_back( 0+bbGetInputSize() ); + outpointY.push_back( -900 ); + outpointY.push_back( -900 ); + outpointZ.push_back( 0 ); + outpointZ.push_back( 0 ); + } // if direction 0 + + if (bbGetInputDirection() == 2) + { + outpointX.push_back( 0 ); + outpointX.push_back( 0+bbGetInputSize() ); + outpointY.push_back( 0 ); + outpointY.push_back( 0 ); + outpointZ.push_back( -900 ); + outpointZ.push_back( -900 ); + } // if direction 0 + bbSetOutputOutPointX(outpointX); + bbSetOutputOutPointY(outpointY); + bbSetOutputOutPointZ(outpointZ); + +*/ +} +//===== +// 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) +//===== +void ChangeInformation3Dto2DforRuler::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + +/* + bbSetInputDirection(2); + bbSetInputAngle(0); + bbSetInputSize(10); +*/ + +} +//===== +// 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) +//===== +void ChangeInformation3Dto2DforRuler::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + +} +//===== +// 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) +//===== +void ChangeInformation3Dto2DforRuler::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaMaracasVisu + + diff --git a/bbtk/src/bbcreaMaracasVisuChangeInformation3Dto2DforRuler.h b/bbtk/src/bbcreaMaracasVisuChangeInformation3Dto2DforRuler.h new file mode 100644 index 0000000..f557dd4 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuChangeInformation3Dto2DforRuler.h @@ -0,0 +1,61 @@ +//===== +// 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) +//===== +#ifndef __bbcreaMaracasVisuChangeInformation3Dto2DforRuler_h_INCLUDED__ +#define __bbcreaMaracasVisuChangeInformation3Dto2DforRuler_h_INCLUDED__ +#include "bbcreaMaracasVisu_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +namespace bbcreaMaracasVisu +{ + +class bbcreaMaracasVisu_EXPORT ChangeInformation3Dto2DforRuler + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(ChangeInformation3Dto2DforRuler,bbtk::AtomicBlackBox); +//===== +// 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) +//===== +/* + BBTK_DECLARE_INPUT(Angle,double); + BBTK_DECLARE_INPUT(Direction,int); + BBTK_DECLARE_INPUT(Size,int); + BBTK_DECLARE_OUTPUT(OutPointX,std::vector); + BBTK_DECLARE_OUTPUT(OutPointY,std::vector); + BBTK_DECLARE_OUTPUT(OutPointZ,std::vector); + BBTK_DECLARE_OUTPUT(RotationVector,std::vector); +*/ + BBTK_PROCESS(Process); + void Process(); +//===== +// 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) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(ChangeInformation3Dto2DforRuler,bbtk::AtomicBlackBox); + BBTK_NAME("ChangeInformation3Dto2DforRuler"); + BBTK_AUTHOR("InfoDev"); + BBTK_DESCRIPTION("No Description."); + BBTK_CATEGORY("empty"); + +/* + BBTK_INPUT(ChangeInformationPoint3Dto2DforRuler,Angle,"Angle in Deg. (0 default)",double,""); + BBTK_INPUT(ChangeInformationPoint3Dto2DforRuler,Direction,"Direction -1=3D 0=YZ 1=WZ 2=XY(default) ",int,""); + BBTK_INPUT(ChangeInformationPoint3Dto2DforRuler,Size,"Size in Pixels (10 default)",int,""); + + BBTK_OUTPUT(ChangeInformationPoint3Dto2DforRuler,OutPointX,"Output Point 2D new order",std::vector,""); + BBTK_OUTPUT(ChangeInformationPoint3Dto2DforRuler,OutPointY,"Output Point 2D new order",std::vector,""); + BBTK_OUTPUT(ChangeInformationPoint3Dto2DforRuler,OutPointZ,"Output Point 2D new order",std::vector,""); + BBTK_OUTPUT(ChangeInformationPoint3Dto2DforRuler,RotationVector,"RotationVector (default ang=0, vx=0, vy=0, vz=1)",std::vector,""); +*/ +BBTK_END_DESCRIBE_BLACK_BOX(ChangeInformation3Dto2DforRuler); +//===== +// 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) +//===== +} +// EO namespace bbcreaMaracasVisu + +#endif // __bbcreaMaracasVisuChangeInformation3Dto2DforRuler_h_INCLUDED__ + diff --git a/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx b/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx index f60814b..3f66509 100644 --- a/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx +++ b/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx @@ -29,7 +29,51 @@ void ChangeInformationPoint3Dto2D::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " < normal; + std::vector outpoint; + + if ( bbGetInputInPoint().size()==3 ) + { + + if (bbGetInputDirection() == 0) + { + normal.push_back(1); + normal.push_back(0); + normal.push_back(0); + bbSetOutputNormalVector(normal); + outpoint.push_back( bbGetInputInPoint()[1] ); + outpoint.push_back( bbGetInputInPoint()[2] ); + outpoint.push_back( bbGetInputInPoint()[0] ); + bbSetOutputOutPoint(outpoint); + } // if direction 0 + + if (bbGetInputDirection() == 1) + { + normal.push_back(0); + normal.push_back(1); + normal.push_back(0); + bbSetOutputNormalVector(normal); + outpoint.push_back( bbGetInputInPoint()[0] ); + outpoint.push_back( bbGetInputInPoint()[2] ); + outpoint.push_back( bbGetInputInPoint()[1] ); + bbSetOutputOutPoint(outpoint); + } // if direction 0 + + if (bbGetInputDirection() == 2) + { + normal.push_back(0); + normal.push_back(0); + normal.push_back(1); + bbSetOutputNormalVector(normal); + outpoint.push_back( bbGetInputInPoint()[0] ); + outpoint.push_back( bbGetInputInPoint()[1] ); + outpoint.push_back( bbGetInputInPoint()[2] ); + bbSetOutputOutPoint(outpoint); + } // if direction 0 + + } // if bbGetInputInPoint Size + } //===== // 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) @@ -40,7 +84,7 @@ void ChangeInformationPoint3Dto2D::bbUserSetDefaultValues() // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 -// bbSetInputIn(0); + bbSetInputDirection(2); } //===== diff --git a/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.h b/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.h index b124d46..de44134 100644 --- a/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.h +++ b/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.h @@ -7,7 +7,6 @@ #include "bbtkAtomicBlackBox.h" #include "iostream" -#include "wxVtkBaseView.h" namespace bbcreaMaracasVisu { @@ -20,8 +19,9 @@ class bbcreaMaracasVisu_EXPORT ChangeInformationPoint3Dto2D //===== // 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) //===== + BBTK_DECLARE_INPUT(Angle,double); BBTK_DECLARE_INPUT(InPoint,std::vector); - BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*); + BBTK_DECLARE_INPUT(Direction,int); BBTK_DECLARE_OUTPUT(OutPoint,std::vector); BBTK_DECLARE_OUTPUT(NormalVector,std::vector); BBTK_PROCESS(Process); @@ -37,8 +37,11 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ChangeInformationPoint3Dto2D,bbtk::AtomicBlackBox) BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); + BBTK_INPUT(ChangeInformationPoint3Dto2D,Angle,"Angle in Deg. (0 default)",double,""); + + BBTK_INPUT(ChangeInformationPoint3Dto2D,InPoint,"Input Point 3D",std::vector,""); - BBTK_INPUT(ChangeInformationPoint3Dto2D,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,""); + BBTK_INPUT(ChangeInformationPoint3Dto2D,Direction,"Direction -1=3D 0=YZ 1=WZ 2=XY(default) ",int,""); BBTK_OUTPUT(ChangeInformationPoint3Dto2D,OutPoint,"Output Point 2D",std::vector,""); BBTK_OUTPUT(ChangeInformationPoint3Dto2D,NormalVector,"NormalVector (default 0 0 1)",std::vector,""); diff --git a/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx b/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx new file mode 100644 index 0000000..9907e62 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.cxx @@ -0,0 +1,80 @@ +//===== +// 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) +//===== +#include "bbcreaMaracasVisuwxVtkBaseView_Info.h" +#include "bbcreaMaracasVisuPackage.h" +namespace bbcreaMaracasVisu +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,wxVtkBaseView_Info) +BBTK_BLACK_BOX_IMPLEMENTATION(wxVtkBaseView_Info,bbtk::AtomicBlackBox); +//===== +// 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) +//===== +void wxVtkBaseView_Info::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') + +// bbSetOutputOut( bbGetInputIn() ); +// std::cout << "Output value = " <GetRenderer() ); + bbSetOutputDirection( bbGetInputwxVtkBaseView()->GetDirection() ); + } + + +} +//===== +// 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) +//===== +void wxVtkBaseView_Info::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetOutputDirection(2); + bbSetOutputvtkRenderer(NULL); + +} +//===== +// 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) +//===== +void wxVtkBaseView_Info::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + +} +//===== +// 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) +//===== +void wxVtkBaseView_Info::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaMaracasVisu + + diff --git a/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.h b/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.h new file mode 100644 index 0000000..41f9001 --- /dev/null +++ b/bbtk/src/bbcreaMaracasVisuwxVtkBaseView_Info.h @@ -0,0 +1,53 @@ +//===== +// 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) +//===== +#ifndef __bbcreaMaracasVisuwxVtkBaseView_Info_h_INCLUDED__ +#define __bbcreaMaracasVisuwxVtkBaseView_Info_h_INCLUDED__ +#include "bbcreaMaracasVisu_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "wxVtkBaseView.h" +#include "vtkRenderer.h" + +namespace bbcreaMaracasVisu +{ + +class bbcreaMaracasVisu_EXPORT wxVtkBaseView_Info + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(wxVtkBaseView_Info,bbtk::AtomicBlackBox); +//===== +// 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) +//===== + BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*); + BBTK_DECLARE_OUTPUT(vtkRenderer,vtkRenderer*); + BBTK_DECLARE_OUTPUT(Direction,int); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(wxVtkBaseView_Info,bbtk::AtomicBlackBox); + BBTK_NAME("wxVtkBaseView_Info"); + BBTK_AUTHOR("InfoDev"); + BBTK_DESCRIPTION("No Description."); + BBTK_CATEGORY("empty"); + + BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,""); + + BBTK_OUTPUT(wxVtkBaseView_Info,Direction,"Direction -1=3D 0=YZ 1=XZ 2=XY(default)",int,""); + BBTK_OUTPUT(wxVtkBaseView_Info,vtkRenderer,"vtkRenderer default=NULL",vtkRenderer*,""); + +BBTK_END_DESCRIBE_BLACK_BOX(wxVtkBaseView_Info); +//===== +// 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) +//===== +} +// EO namespace bbcreaMaracasVisu + +#endif // __bbcreaMaracasVisuwxVtkBaseView_Info_h_INCLUDED__ + diff --git a/bbtk/src/bbmaracasvisuDrawAxe3D.cxx b/bbtk/src/bbmaracasvisuDrawAxe3D.cxx index 6a369f3..fa7a0cf 100644 --- a/bbtk/src/bbmaracasvisuDrawAxe3D.cxx +++ b/bbtk/src/bbmaracasvisuDrawAxe3D.cxx @@ -40,12 +40,10 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,DrawAxe3D) BBTK_BLACK_BOX_IMPLEMENTATION(DrawAxe3D,bbtk::AtomicBlackBox); void DrawAxe3D::Process() { -printf("EED DrawAxe3D::Process Start\n"); std::vector< double > vectx = bbGetInputlstPointX(); std::vector< double > vecty = bbGetInputlstPointY(); std::vector< double > vectz = bbGetInputlstPointZ(); -printf("EED DrawAxe3D::Process size vector %d %d %d\n",vectx.size(),vecty.size(),vectz.size() ); // vtkImageData* img = bbGetInputImage(); unsigned int i; @@ -57,50 +55,40 @@ printf("EED DrawAxe3D::Process size vector %d %d %d\n",vectx.size(),vecty.size() if(!vectx.empty()&&!vecty.empty()&&!vectz.empty()) { -printf("EED DrawAxe3D::Process 1\n"); vtkPoints* allPoints = vtkPoints::New( ); vtkCellArray* allTopology = vtkCellArray::New( ); allTopology->InsertNextCell( vectx.size() ); -printf("EED DrawAxe3D::Process 2\n"); for( i = 0; i < vectx.size( ); i++) { //multiplicar ver parametros spacing, en maracas cuando se toca la imagen y se ve dycom //hay parametro dicom, vtkImagedata valor spacing y esos datos hay que multiplicar al polydata allPoints->InsertNextPoint( vectx[i]*spc[0], vecty[i]*spc[1], vectz[i]*spc[2] ); allTopology->InsertCellPoint( i ); -printf("EED DrawAxe3D::Process 3\n"); } // rof mallData->SetPoints( allPoints ); mallData->SetLines( allTopology ); -printf("EED DrawAxe3D::Process 4\n"); allPoints->Delete(); allTopology->Delete(); -printf("EED DrawAxe3D::Process 5\n"); } mvtkactor->GetProperty()->SetColor( bbGetInputColour()[0], bbGetInputColour()[1], bbGetInputColour()[2] ); -printf("EED DrawAxe3D::Process 6\n"); //EC Axe Opacity property added ///Default Values double opacity=bbGetInputOpacity(); mvtkactor->GetProperty()->SetOpacity( opacity ); -printf("EED DrawAxe3D::Process 7\n"); if ( bbGetInputTransform()!=NULL ) { -printf("EED DrawAxe3D::Process 8\n"); mvtkactor->SetUserTransform( bbGetInputTransform() ); } // Interface Update if ((firsttime==true) && (bbGetInputRenderer()!=NULL )) { -printf("EED DrawAxe3D::Process 9\n"); firsttime=false; bbGetInputRenderer()->AddActor( mvtkactor ); } -printf("EED DrawAxe3D::Process End\n"); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 8905232..b19937e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -210,6 +210,14 @@ void wxVtkBaseView::GetSpacing(double spc[3]) // virtual spc[2]=1; } + +//--------------------------------------------------------------------------- +int wxVtkBaseView::GetDirection() // virtual +{ + return -1; +} + + //------------------------------------------------------------------- //------------------------------------------------------------------- //------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h index 08bffa2..43ccd2f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h @@ -70,29 +70,30 @@ public: wxVtkBaseView( wxWindow *parent ); virtual ~wxVtkBaseView(); wxVTKRenderWindowInteractor *GetWxVTKRenderWindowInteractor() throw (char*); - virtual void Configure(); - virtual void Refresh(); - virtual void RefreshView(); + virtual void Configure(); + virtual void Refresh(); + virtual void RefreshView(); virtual vtkRenderer* GetRenderer(); virtual vtkRenderWindow* GetRenWin(); - virtual void TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false,int type=2); + virtual void TransFromCoordScreenToWorld(double &X, double &Y, double &Z, bool keepNormalDirection=false,int type=2); //RaC 03-2010 Method used by TransFromCoordScreenToWorld - void TransCoordScreenToWorld(double &X, double &Y, double &Z,int type=2); + void TransCoordScreenToWorld(double &X, double &Y, double &Z,int type=2); /* JCP 04/05/09 - void SetInteractorStyleBaseView( vtkInteractorStyleBaseView* interactorStyle); + void SetInteractorStyleBaseView( vtkInteractorStyleBaseView* interactorStyle); */ - void SetInteractorStyleBaseView( vtkInteractorStyleImage* interactorStyle); + void SetInteractorStyleBaseView( vtkInteractorStyleImage* interactorStyle); /* JCP 04/05/09 * vtkInteractorStyleBaseView* GetInteractorStyleBaseView(); */ vtkInteractorStyleImage* GetInteractorStyleBaseView(); - virtual void GetSpacing(double spc[3]); + virtual void GetSpacing(double spc[3]); + virtual int GetDirection(); private: - wxWindow *_parent; + wxWindow *_parent; wxVTKRenderWindowInteractor *_iren; /** * JCP 04/05/09