+++ /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