1 description "Image Reorientation by choosing a plane"
2 author "jn.trillos44@uniandes.edu.co"
20 include vtk/boxes/bbLoadHola
24 ////////////////////////////////////
26 For using load file dialog
28 ///////////////////////////////////
30 new FileSelector openFileDialog
31 set openFileDialog.Wildcard "(*.mhd)|*.mhd"
32 new MetaImageReader reader
33 connect openFileDialog.Out reader.In
35 ////////////////////////////////////
39 ///////////////////////////////////
45 //Show NPoints and ViewerNV for choosing the reorientation plane
48 connect reader.Out viewer.In
49 set viewer.nTypeView "5 1 2 0"
51 new ShowNPoints showNpoints
52 connect reader.Out showNpoints.Image
53 connect viewer.Renderer1 showNpoints.Renderer
54 connect viewer.Point showNpoints.In
55 connect viewer.BoxChange showNpoints.BoxExecute
56 set showNpoints.Radio 10
61 new PlaneNormalBox normal
62 connect showNpoints.lstPointsX normal.InX
63 connect showNpoints.lstPointsY normal.InY
64 connect showNpoints.lstPointsZ normal.InZ
65 connect viewer.Point normal.CenterPoint
69 new ReSlicerBox reSlicer
70 connect normal.Out reSlicer.Transform
71 connect reader.Out reSlicer.In
72 //set reSlicer.Origin "0,0,0"
73 connect viewer.Point reSlicer.Origin
74 set reSlicer.Centered true
75 set reSlicer.Interpolate true
77 connect normal.BoxChange reSlicer.BoxExecute
79 //Button for activating the second window
82 set but.Label "Reorientation"
83 connect but.BoxChange normal.BoxExecute
88 connect reSlicer.Out viewer2.In
89 set viewer2.nTypeView "5 1 2 0"
91 new ShowNPoints showNpoints2
92 connect reSlicer.Out showNpoints2.Image
93 connect viewer2.Renderer1 showNpoints2.Renderer
94 connect viewer2.Point showNpoints2.In
95 connect viewer2.BoxChange showNpoints2.BoxExecute
96 set showNpoints.Radio 10
99 new LayoutSplit controls
100 set controls.Orientation V
101 set controls.Proportion 80
102 connect showNpoints.Widget controls.Widget1
103 connect but.Widget controls.Widget2
105 new LayoutSplit windowResult
106 set windowResult.Orientation H
107 set windowResult.Proportion 20
108 connect showNpoints2.Widget windowResult.Widget1
109 connect viewer2.Widget windowResult.Widget2
111 connect reSlicer.BoxChange windowResult.BoxExecute
114 set main.Orientation H
115 set main.Proportion 20
116 connect controls.Widget main.Widget1
117 connect viewer.Widget main.Widget2