From 3797ae6d71a76d3f096ad93b92e77db684c00eb7 Mon Sep 17 00:00:00 2001 From: trillos Date: Wed, 2 Dec 2009 13:18:14 +0000 Subject: [PATCH] *** empty log message *** --- .../bbs/appli/ExampleRecalage3D1Point.bbs | 200 ++++++++++++++++++ .../bbs/appli/ExampleRecalage3D2Points.bbs | 138 ++++++++++++ .../bbs/appli/ExampleRecalage3D3Points.bbs | 124 +++++++++++ PackRecalage/bbs/appli/PlaneReorientation.bbs | 119 ----------- PackRecalage/bbs/appli/Recalage2D.bbs | 44 ++-- 5 files changed, 493 insertions(+), 132 deletions(-) create mode 100644 PackRecalage/bbs/appli/ExampleRecalage3D1Point.bbs create mode 100644 PackRecalage/bbs/appli/ExampleRecalage3D2Points.bbs create mode 100644 PackRecalage/bbs/appli/ExampleRecalage3D3Points.bbs delete mode 100644 PackRecalage/bbs/appli/PlaneReorientation.bbs diff --git a/PackRecalage/bbs/appli/ExampleRecalage3D1Point.bbs b/PackRecalage/bbs/appli/ExampleRecalage3D1Point.bbs new file mode 100644 index 0000000..8b00114 --- /dev/null +++ b/PackRecalage/bbs/appli/ExampleRecalage3D1Point.bbs @@ -0,0 +1,200 @@ +description "Recalage3D Version 1" +author "jn.trillos44@uniandes.edu.co" +category "demo" + +load vtk +include wxvtk +load std +load itk +include vtk +include wx +load itkvtk +load creaMaracasVisu +load PackRecalage + +/////////////////////// +//Image Readers// +////////////////////// + +#Uncomment to use a FileReadeDialog for .mhd +#------------------------------------------------------- + +//File selection and file reader for the first image + +new FileSelector openFileDialog + set openFileDialog.Wildcard "(*.mhd)|*.mhd" +new MetaImageReader reader + connect openFileDialog.Out reader.In + +//File selection and file reader for the second image + +new FileSelector openFileDialog2 + set openFileDialog2.Wildcard "(*.mhd)|*.mhd" +new MetaImageReader reader2 + connect openFileDialog2.Out reader2.In + +#------------------------------------------------------- + + +#Uncomment to use a Gimmick Reader +#------------------------------------------------------- +/* +load creaImageIO + +new Gimmick reader + +new Gimmick reader2 +*/ +#------------------------------------------------------ + +/////////////////////// +//Image Viewers/// +////////////////////// + +//Viewer NV for the first image + +new ViewerNV viewer + connect reader.Out viewer.In + set viewer.nTypeView "5" + +//Viewer NV for the second image + +new ViewerNV viewer2 + connect reader2.Out viewer2.In + set viewer2.nTypeView "5" + +/////////////////////// +//Image Controls// +////////////////////// + +new Slider sdrAngleX + set sdrAngleX.Max 180 + set sdrAngleX.Min -180 + set sdrAngleX.In 0 + set sdrAngleX.Title "Rotation angle in X Axis" + set sdrAngleX.ReactiveOnTrack true + +new Slider sdrAngleY + set sdrAngleY.Max 180 + set sdrAngleY.Min -180 + set sdrAngleY.In 0 + set sdrAngleY.Title "Rotation angle in Y Axis" + set sdrAngleY.ReactiveOnTrack true + +new Slider sdrAngleZ + set sdrAngleZ.Max 180 + set sdrAngleZ.Min -180 + set sdrAngleZ.In 0 + set sdrAngleZ.Title "Rotation angle in Z Axis" + set sdrAngleZ.ReactiveOnTrack true + +new Slider sdrScaleX + set sdrScaleX.Max 300 + set sdrScaleX.Min 10 + set sdrScaleX.In 100 + set sdrScaleX.Title "Scale in X Axis" + set sdrScaleX.ReactiveOnTrack true + +new Slider sdrScaleY + set sdrScaleY.Max 300 + set sdrScaleY.Min 10 + set sdrScaleY.In 100 + set sdrScaleY.Title "Scale in Y Axis" + set sdrScaleY.ReactiveOnTrack true + +new Slider sdrScaleZ + set sdrScaleZ.Max 300 + set sdrScaleZ.Min 10 + set sdrScaleZ.In 100 + set sdrScaleZ.Title "Scale in Z Axis" + set sdrScaleZ.ReactiveOnTrack true + + +/////////////////////////////// +//Transformation Boxes// +////////////////////////////// + +new Transform3D1PointBox transform + connect viewer2.Point transform.CenterPoint + connect sdrAngleX.Out transform.AngleX + connect sdrAngleY.Out transform.AngleY + connect sdrAngleZ.Out transform.AngleZ + connect sdrScaleX.Out transform.ScaleX + connect sdrScaleY.Out transform.ScaleY + connect sdrScaleZ.Out transform.ScaleZ + +new ReSlicerBox reslicer + connect viewer.Point reslicer.Origin + connect reader2.Out reslicer.In + connect transform.Out reslicer.Transform + +/////////////////////////////////////////////// +//Multiple Inputs for image interaction// +/////////////////////////////////////////////// + +new MultipleInputs mult + connect viewer.BoxChange mult.In1 + connect viewer2.BoxChange mult.In2 + connect sdrAngleX.BoxChange mult.In3 + connect sdrAngleY.BoxChange mult.In4 + connect sdrAngleZ.BoxChange mult.In5 + +new MultipleInputs mult2 + connect sdrScaleX.BoxChange mult2.In1 + connect sdrScaleY.BoxChange mult2.In2 + connect sdrScaleZ.BoxChange mult2.In3 + +new MultipleInputs mult3 + connect mult.BoxChange mult3.In1 + connect mult2.BoxChange mult3.In2 + + connect mult3.BoxChange transform.BoxExecute + connect mult3.BoxChange reslicer.BoxExecute + +///////////////////////////////////////// +//Image Result Viewer // +//////////////////////////////////////// + +new ViewerNV viewerResult + connect reslicer.Out viewerResult.In + set viewerResult.nTypeView "5" + + connect mult3.BoxChange viewerResult.BoxExecute + +////////////////////////////////////// +//Interface Layouts // +////////////////////////////////////// + +new LayoutSplit imagesLayout + set imagesLayout.Orientation "v" + set imagesLayout.Proportion 50 + + connect viewer.Widget imagesLayout.Widget1 + connect viewer2.Widget imagesLayout.Widget2 + +new LayoutLine toolsLayout + set toolsLayout.Orientation "v" + connect sdrAngleX.Widget toolsLayout.Widget1 + connect sdrAngleY.Widget toolsLayout.Widget2 + connect sdrAngleZ.Widget toolsLayout.Widget3 + connect sdrScaleX.Widget toolsLayout.Widget4 + connect sdrScaleY.Widget toolsLayout.Widget5 + connect sdrScaleZ.Widget toolsLayout.Widget6 + +new LayoutSplit resultLayout + set resultLayout.Orientation "v" + set resultLayout.Proportion 60 + + connect viewerResult.Widget resultLayout.Widget1 + connect toolsLayout.Widget resultLayout.Widget2 + +new LayoutSplit main + set main.Orientation "h" + set main.Proportion 50 + + connect imagesLayout.Widget main.Widget1 + connect resultLayout.Widget main.Widget2 + +exec main + + \ No newline at end of file diff --git a/PackRecalage/bbs/appli/ExampleRecalage3D2Points.bbs b/PackRecalage/bbs/appli/ExampleRecalage3D2Points.bbs new file mode 100644 index 0000000..79b4532 --- /dev/null +++ b/PackRecalage/bbs/appli/ExampleRecalage3D2Points.bbs @@ -0,0 +1,138 @@ +description "Example of posible Recalage implementation" +author "jn.trillos44@uniandes.edu.co" +category "demo" + +load vtk +include wxvtk +load std +load itk +include vtk +include wx +load itkvtk +load creaMaracasVisu +load PackRecalage + +//File selection and file reader for the first image + +new FileSelector openFileDialog + set openFileDialog.Wildcard "(*.mhd)|*.mhd" +new MetaImageReader reader + connect openFileDialog.Out reader.In + +//File selection and file reader for the second image + +new FileSelector openFileDialog2 + set openFileDialog2.Wildcard "(*.mhd)|*.mhd" +new MetaImageReader reader2 + connect openFileDialog2.Out reader2.In + +//Viewer NV and ShowPoints for the first image + +new ViewerNV viewer + connect reader.Out viewer.In + set viewer.nTypeView "5" + +new ShowNPoints showNpoints + connect reader.Out showNpoints.Image + connect viewer.Renderer1 showNpoints.Renderer + connect viewer.Point showNpoints.In + connect viewer.BoxChange showNpoints.BoxExecute + set showNpoints.Radio 10 + +//Viewer NV and ShowPoints for the second image + +new ViewerNV viewer2 + connect reader2.Out viewer2.In + set viewer2.nTypeView "5" + +new ShowNPoints showNpoints2 + connect reader2.Out showNpoints2.Image + connect viewer2.Renderer1 showNpoints2.Renderer + connect viewer2.Point showNpoints2.In + connect viewer2.BoxChange showNpoints2.BoxExecute + set showNpoints2.Radio 10 + +////////////////////////////////////////// +#Transform Box +////////////////////////////////////////// + +new Transform3D2PointsBox transform + connect showNpoints.lstPointsX transform.InX1 + connect showNpoints2.lstPointsX transform.InX2 + connect showNpoints.lstPointsY transform.InY1 + connect showNpoints2.lstPointsY transform.InY2 + connect showNpoints.lstPointsZ transform.InZ1 + connect showNpoints2.lstPointsZ transform.InZ2 + + connect showNpoints.lstLabels transform.Labels1 + connect showNpoints2.lstLabels transform.Labels2 + +new ReSlicerBox reslice1 + + set reslice1.Origin "0,0,0" + + connect transform.Out reslice1.Transform + connect reader2.Out reslice1.In + +//ViewerNV and ComandButton for the result image + + +new ViewerNV viewer3 + set viewer3.nTypeView "5 0" + connect reslice1.Out viewer3.In + +new CommandButton butExec + set butExec.Label "Execute" + +//Slider for second angle + +new Slider angle + set angle.In 0 + set angle.Max 180 + set angle.Min -180 + + connect angle.Out transform.SecondAngle + +//Tab for the first image + +new LayoutSplit tab1 + set tab1.Orientation H + +//////////////////// + +new LayoutSplit hello + set hello.Orientation V + + connect showNpoints.Widget hello.Widget1 + +new LayoutSplit hello2 + connect butExec.Widget hello2.Widget1 + connect angle.Widget hello2.Widget2 + + connect hello2.Widget hello.Widget2 + + connect hello.Widget tab1.Widget1 + connect viewer.Widget tab1.Widget2 + +//Tab for the second image + +new LayoutSplit tab2 + set tab2.Orientation H + connect showNpoints2.Widget tab2.Widget1 + connect viewer2.Widget tab2.Widget2 + +//Tab for the result image + + connect butExec.BoxChange transform.BoxExecute + connect butExec.BoxChange reslice1.BoxExecute + connect butExec.BoxChange viewer3.BoxExecute + + +//Main window + +new LayoutTab main +set main.Orientation H +connect tab1.Widget main.Widget1 +connect tab2.Widget main.Widget2 + +exec main \ No newline at end of file diff --git a/PackRecalage/bbs/appli/ExampleRecalage3D3Points.bbs b/PackRecalage/bbs/appli/ExampleRecalage3D3Points.bbs new file mode 100644 index 0000000..167dedb --- /dev/null +++ b/PackRecalage/bbs/appli/ExampleRecalage3D3Points.bbs @@ -0,0 +1,124 @@ +description "Example of posible Recalage implementation" +author "jn.trillos44@uniandes.edu.co" +category "demo" + +load vtk +include wxvtk +load std +load itk +include vtk +include wx +load itkvtk +load creaMaracasVisu +load PackRecalage + +//File selection and file reader for the first image + +new FileSelector openFileDialog + set openFileDialog.Wildcard "(*.mhd)|*.mhd" +new MetaImageReader reader + connect openFileDialog.Out reader.In + +//File selection and file reader for the second image + +new FileSelector openFileDialog2 + set openFileDialog2.Wildcard "(*.mhd)|*.mhd" +new MetaImageReader reader2 + connect openFileDialog2.Out reader2.In + +//Viewer NV and ShowPoints for the first image + +new ViewerNV viewer + connect reader.Out viewer.In + set viewer.nTypeView "5" + +new ShowNPoints showNpoints + connect reader.Out showNpoints.Image + connect viewer.Renderer1 showNpoints.Renderer + connect viewer.Point showNpoints.In + connect viewer.BoxChange showNpoints.BoxExecute + set showNpoints.Radio 10 + +//Viewer NV and ShowPoints for the second image + +new ViewerNV viewer2 + connect reader2.Out viewer2.In + set viewer2.nTypeView "5" + +new ShowNPoints showNpoints2 + connect reader2.Out showNpoints2.Image + connect viewer2.Renderer1 showNpoints2.Renderer + connect viewer2.Point showNpoints2.In + connect viewer2.BoxChange showNpoints2.BoxExecute + set showNpoints2.Radio 10 + +////////////////////////////////////////// +#Transform Box +////////////////////////////////////////// + +new Transform3D3PointsBox transform + connect showNpoints.lstPointsX transform.InX1 + connect showNpoints2.lstPointsX transform.InX2 + connect showNpoints.lstPointsY transform.InY1 + connect showNpoints2.lstPointsY transform.InY2 + connect showNpoints.lstPointsZ transform.InZ1 + connect showNpoints2.lstPointsZ transform.InZ2 + + connect showNpoints.lstLabels transform.Labels1 + connect showNpoints2.lstLabels transform.Labels2 + +new ReSlicerBox reslice1 + + set reslice1.Origin "0,0,0" + + connect transform.Out reslice1.Transform + connect reader2.Out reslice1.In + +//ViewerNV and ComandButton for the result image + + +new ViewerNV viewer3 + set viewer3.nTypeView "5" + connect reslice1.Out viewer3.In + +new CommandButton butExec + set butExec.Label "Execute" + +//Tab for the first image + +new LayoutSplit tab1 + set tab1.Orientation H + +//////////////////// + +new LayoutSplit hello + set hello.Orientation V + + connect showNpoints.Widget hello.Widget1 + connect butExec.Widget hello.Widget2 + + connect hello.Widget tab1.Widget1 + connect viewer.Widget tab1.Widget2 + +//Tab for the second image + +new LayoutSplit tab2 + set tab2.Orientation H + connect showNpoints2.Widget tab2.Widget1 + connect viewer2.Widget tab2.Widget2 + +//Tab for the result image + + connect butExec.BoxChange transform.BoxExecute + connect butExec.BoxChange reslice1.BoxExecute + connect butExec.BoxChange viewer3.BoxExecute + + +//Main window + +new LayoutTab main +set main.Orientation H +connect tab1.Widget main.Widget1 +connect tab2.Widget main.Widget2 + +exec main \ No newline at end of file diff --git a/PackRecalage/bbs/appli/PlaneReorientation.bbs b/PackRecalage/bbs/appli/PlaneReorientation.bbs deleted file mode 100644 index cfc472d..0000000 --- a/PackRecalage/bbs/appli/PlaneReorientation.bbs +++ /dev/null @@ -1,119 +0,0 @@ -description "Image Reorientation by choosing a plane" -author "jn.trillos44@uniandes.edu.co" -category "demo" - -load vtk -include wxvtk -load std -load itk -include vtk -include wx -load itkvtk -load creaMaracasVisu -load PackRecalage - -//File Readers - -# Here loads hola.mhd -# ------------------- -/* -include vtk/boxes/bbLoadHola -new LoadHola reader -*/ - -//////////////////////////////////// -/* - For using load file dialog -*/ -/////////////////////////////////// -/* -new FileSelector openFileDialog - set openFileDialog.Wildcard "(*.mhd)|*.mhd" -new MetaImageReader reader - connect openFileDialog.Out reader.In -*/ -//////////////////////////////////// -/* -For using Gimmick -*/ -/////////////////////////////////// - -load creaImageIO -new Gimmick reader - - -//Show NPoints and ViewerNV for choosing the reorientation plane - -new ViewerNV viewer - connect reader.Out viewer.In - set viewer.nTypeView "5 1 2 0" - -new ShowNPoints showNpoints - connect reader.Out showNpoints.Image - connect viewer.Renderer1 showNpoints.Renderer - connect viewer.Point showNpoints.In - connect viewer.BoxChange showNpoints.BoxExecute - set showNpoints.Radio 10 - -//Sliders - -//Reorientation class -new PlaneNormalBox normal - connect showNpoints.lstPointsX normal.InX - connect showNpoints.lstPointsY normal.InY - connect showNpoints.lstPointsZ normal.InZ - connect viewer.Point normal.CenterPoint - -//Reslicer - -new ReSlicerBox reSlicer - connect normal.Out reSlicer.Transform - connect reader.Out reSlicer.In - //set reSlicer.Origin "0,0,0" - connect viewer.Point reSlicer.Origin - set reSlicer.Centered true - set reSlicer.Interpolate true - - connect normal.BoxChange reSlicer.BoxExecute - -//Button for activating the second window - -new CommandButton but - set but.Label "Reorientation" - connect but.BoxChange normal.BoxExecute - -//Second Window - -new ViewerNV viewer2 - connect reSlicer.Out viewer2.In - set viewer2.nTypeView "5 1 2 0" - -new ShowNPoints showNpoints2 - connect reSlicer.Out showNpoints2.Image - connect viewer2.Renderer1 showNpoints2.Renderer - connect viewer2.Point showNpoints2.In - connect viewer2.BoxChange showNpoints2.BoxExecute - set showNpoints.Radio 10 - -//Layouts -new LayoutSplit controls - set controls.Orientation V - set controls.Proportion 80 - connect showNpoints.Widget controls.Widget1 - connect but.Widget controls.Widget2 - -new LayoutSplit windowResult - set windowResult.Orientation H - set windowResult.Proportion 20 - connect showNpoints2.Widget windowResult.Widget1 - connect viewer2.Widget windowResult.Widget2 - - connect reSlicer.BoxChange windowResult.BoxExecute - -new LayoutSplit main - set main.Orientation H - set main.Proportion 20 - connect controls.Widget main.Widget1 - connect viewer.Widget main.Widget2 - -exec main \ No newline at end of file diff --git a/PackRecalage/bbs/appli/Recalage2D.bbs b/PackRecalage/bbs/appli/Recalage2D.bbs index eb4817a..6405f32 100644 --- a/PackRecalage/bbs/appli/Recalage2D.bbs +++ b/PackRecalage/bbs/appli/Recalage2D.bbs @@ -35,6 +35,9 @@ include creaImageIO new Gimmick image new Gimmick image2 +/////////////////////////////////////////////// +//Image Slicers +////////////////////////////////////////////// # Create the slicers @@ -43,6 +46,10 @@ new SliceImage imgslice2 connect image.Out imgslice1.In connect image2.Out imgslice2.In +//////////////////////////////////////////// +//Image Viewers +/////////////////////////////////////////// + #Viewer containing image 1 new LayoutLine v1Layout @@ -59,6 +66,10 @@ new ViewerNV viewer2 set viewer2.nTypeView "0" connect viewer2.Widget v2Layout.Widget1 +////////////////////////////////////// +//Layouts for the images +////////////////////////////////////// + #LayoutSplit were the images will be new LayoutSplit initialImages @@ -67,6 +78,10 @@ new LayoutSplit initialImages connect v1Layout.Widget initialImages.Widget1 connect v2Layout.Widget initialImages.Widget2 +//////////////////////////////////////////////////////////////// +//Information Sliders and Buttons for the Recalage +/////////////////////////////////////////////////////////////// + #Layout line that will contain the buttons new LayoutLine buttonsLayout @@ -102,6 +117,10 @@ new Slider sliderY set sliderY.ReactiveOnTrack "1" connect sliderY.Widget buttonsLayout.Widget3 +////////////////////////////////////////////////// +//Transformation Boxes +////////////////////////////////////////////////// + #Box were the transformation will be made new Transform2DBox transform @@ -115,6 +134,10 @@ new ReSlicerBox reslice1 connect transform.Out reslice1.Transform connect imgslice2.Out reslice1.In +////////////////////////////////////////////////// +//Convolution Filter +////////////////////////////////////////////////// + #Convolution Filter for both of the Images new ImageConvolution convol1 @@ -122,6 +145,10 @@ new ImageConvolution convol1 new ImageConvolution convol2 connect reslice1.Out convol2.In +//////////////////////////////////////////////// +//Recalage Properties +//////////////////////////////////////////////// + #Image Properties new ImageRecalageProperties properties @@ -147,7 +174,7 @@ new Slider sdrF set sdrF.ReactiveOnTrack 1 set sdrF.Max "100" set sdrF.Min "0" - set sdrF.In "50" + set sdrF.In "0" set sdrF.Title "Convolution Factor" connect sdrF.Out convol1.Factor @@ -257,15 +284,6 @@ new ViewerNV viewerCH connect ly.Widget checkerBoard.Widget2 /////////////end of Checkboard//////////////////// -/* -new checkerView checkerboard - - connect convol1.Out checkerboard.In1 - connect convol2.Out checkerboard.In2 - - connect colorLevel.Out checkerboard.ColorLevel - connect windowLevel.Out checkerboard.WindowLevel -*/ //////////////Transparency/////////////////////////// #Image Transparency view @@ -379,9 +397,9 @@ new MultipleInputs mult4 #Layout for the tabs new LayoutTab tabs - connect checkerBoard.Widget tabs.Widget1 - connect transparency.Widget tabs.Widget2 - connect switcher.Widget tabs.Widget3 + connect switcher.Widget tabs.Widget1 + connect checkerBoard.Widget tabs.Widget2 + connect transparency.Widget tabs.Widget3 #Layout where the images and the buttons will be displayed -- 2.47.1