-description "Example of posbile Recalage implementation"
+description "Example of posible Recalage implementation"
author "jn.trillos44@uniandes.edu.co"
category "demo"
new ViewerNV viewer
connect reader.Out viewer.In
- set viewer.nTypeView "5 1 2 0"
+ set viewer.nTypeView "5"
new ShowNPoints showNpoints
connect reader.Out showNpoints.Image
new ViewerNV viewer2
connect reader2.Out viewer2.In
- set viewer2.nTypeView "5 1 2 0"
+ set viewer2.nTypeView "5"
new ShowNPoints showNpoints2
connect reader2.Out showNpoints2.Image
//////////////////////////////////////////////////
new Transform2DBox transform
- connect vector1.Origin transform.CenterPoint
- connect vector1.OutAngle transform.Angle
- connect vector1.OutScaleX transform.ScaleX
- connect vector1.OutScaleY transform.ScaleY
- connect vector1.OutScaleZ transform.ScaleZ
- connect vector1.TransformAxis transform.Axis
+ //connect vector1.Origin transform.CenterPoint
+
+ set transform.CenterPoint "0,0,0"
+
+ //connect vector1.OutAngle transform.Angle
+ //connect vector1.OutScaleX transform.ScaleX
+ //connect vector1.OutScaleY transform.ScaleY
+ //connect vector1.OutScaleZ transform.ScaleZ
+ //connect vector1.TransformAxis transform.Axis
//set transform.3D false
new ReSlicerBox reslice1
- connect vector1.OriginReslicer reslice1.Origin
+// connect vector1.OriginReslicer reslice1.Origin
+
+ 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 1 2 0"
+ set viewer3.nTypeView "5"
connect reslice1.Out viewer3.In
new CommandButton butExec
--- /dev/null
+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
load PackRecalage
-//include PackRecalage/boxes/checkerView
+//include PackRecalage/boxes/checkerView.bbs
+//Uncomment the image readers you need
+
+/////////////////////////////////////////////////
+// File Selector
+////////////////////////////////////////////////
+/*
new FileSelector imageSelector1
set imageSelector1.Wildcard "*.mhd"
new FileSelector imageSelector2
new MetaImageReader image2
connect imageSelector2.Out image2.In
+*/
+
+///////////////////////////////////////////////
+// Gimmick
+//////////////////////////////////////////////
+
+include creaImageIO
+
+new Gimmick image
+new Gimmick image2
+
+
+# Create the slicers
+
+new SliceImage imgslice1
+new SliceImage imgslice2
+ connect image.Out imgslice1.In
+ connect image2.Out imgslice2.In
#Viewer containing image 1
set sliderY.ReactiveOnTrack "1"
connect sliderY.Widget buttonsLayout.Widget3
-# Create the reslicers
-
-new SliceImage imgslice1
-new SliceImage imgslice2
- connect image.Out imgslice1.In
- connect image2.Out imgslice2.In
-
#Box were the transformation will be made
new Transform2DBox transform
connect sdr.Out cbb.Cols
connect sdr2.Out cbb.Rows
connect cbb.Out viewerCH.In
-
+
connect sdr.Widget ly.Widget2
connect sdr2.Widget ly.Widget3
//////////////Transparency///////////////////////////
#Image Transparency view
-new TransparencyV2 trans
+new TransparencyBox trans
connect convol1.Out trans.In1
connect convol2.Out trans.In2