Commit cc41da0f2d63fb7834fd5d7136a1cf56b237cb6d
1 parent
3a7cf7f8
Exists in
master
and in
68 other branches
ADD: Clipping plane
Showing
2 changed files
with
10 additions
and
1 deletions
Show diff stats
invesalius/data/viewer_slice.py
@@ -136,6 +136,7 @@ class Viewer(wx.Panel): | @@ -136,6 +136,7 @@ class Viewer(wx.Panel): | ||
136 | ps.Publisher().sendMessage(('Set scroll position', 'CORONAL'), coord[1]) | 136 | ps.Publisher().sendMessage(('Set scroll position', 'CORONAL'), coord[1]) |
137 | ps.Publisher().sendMessage(('Set scroll position', 'AXIAL'), coord[2]) | 137 | ps.Publisher().sendMessage(('Set scroll position', 'AXIAL'), coord[2]) |
138 | 138 | ||
139 | + | ||
139 | def GetCoordinate(self): | 140 | def GetCoordinate(self): |
140 | 141 | ||
141 | # Find position | 142 | # Find position |
invesalius/data/viewer_volume.py
@@ -64,7 +64,10 @@ class Viewer(wx.Panel): | @@ -64,7 +64,10 @@ class Viewer(wx.Panel): | ||
64 | ps.Publisher().subscribe(self.ChangeBackgroundColour, | 64 | ps.Publisher().subscribe(self.ChangeBackgroundColour, |
65 | 'Change volume viewer background colour') | 65 | 'Change volume viewer background colour') |
66 | ps.Publisher().subscribe(self.LoadVolume, 'Load volume into viewer') | 66 | ps.Publisher().subscribe(self.LoadVolume, 'Load volume into viewer') |
67 | - | 67 | + |
68 | + ps.Publisher().subscribe(self.GetInteractorVolume, 'Get Interactor Volume') | ||
69 | + ps.Publisher().subscribe(self.ADDActor, 'ADD Actor') | ||
70 | + | ||
68 | def LoadVolume(self, pubsub_evt): | 71 | def LoadVolume(self, pubsub_evt): |
69 | volume, colour = pubsub_evt.data | 72 | volume, colour = pubsub_evt.data |
70 | self.light = self.ren.GetLights().GetNextItem() | 73 | self.light = self.ren.GetLights().GetNextItem() |
@@ -126,4 +129,9 @@ class Viewer(wx.Panel): | @@ -126,4 +129,9 @@ class Viewer(wx.Panel): | ||
126 | sagital_plane.SetInput(imagedata) | 129 | sagital_plane.SetInput(imagedata) |
127 | sagital_plane.Show() | 130 | sagital_plane.Show() |
128 | sagital_plane.Update() | 131 | sagital_plane.Update() |
132 | + | ||
133 | + def GetInteractorVolume(self, evt_pubsub=None): | ||
134 | + evt_pubsub.data.SetInteractor(self.iren._Iren) | ||
129 | 135 | ||
136 | + def ADDActor(self, evt_pubsub=None): | ||
137 | + self.ren.AddActor(evt_pubsub.data) | ||
130 | \ No newline at end of file | 138 | \ No newline at end of file |