Commit 66e87ae119689eaa5bdf103e4a12c993ad27e8fb
1 parent
0a38b4c6
Exists in
invesalius-libift
.
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
invesalius/control.py
... | ... | @@ -218,8 +218,10 @@ class Controller(): |
218 | 218 | def Tools_Interpolation(self, pubsub_evt): |
219 | 219 | print "Running histogram equalization..." |
220 | 220 | scn = libscnvtk.VtkImageDataToScene(prj.Project().imagedata) |
221 | + flag=libift.ShiftScene(scn) | |
221 | 222 | scn2 = libift.LinearInterp(scn,0,0,0) |
222 | 223 | libift.NewDestroyScene(scn) |
224 | + libift.UnShiftScene(scn2,flag) | |
223 | 225 | newimg = libscnvtk.SceneToVtkImageData(scn2) |
224 | 226 | libift.NewDestroyScene(scn2) |
225 | 227 | self.CloseProject() | ... | ... |
invesalius/libc/libalign/libalign.py
... | ... | @@ -7,13 +7,17 @@ from ..libscnvtk import libscnvtk as libscnvtk |
7 | 7 | def VolumeAlign(img): |
8 | 8 | scn = libscnvtk.VtkImageDataToScene(img) |
9 | 9 | print "VolumeAlign()" |
10 | + flag=libift.ShiftScene(scn) | |
10 | 11 | scn2 = libift.MSP_Align(scn,None,0,1) |
12 | + libift.UnShiftScene(scn2,flag) | |
11 | 13 | return libscnvtk.SceneToVtkImageData(scn2) |
12 | 14 | |
13 | 15 | |
14 | 16 | |
15 | 17 | def Interp(img): |
16 | 18 | scn = libscnvtk.VtkImageDataToScene(img) |
19 | + flag=libift.ShiftScene(scn) | |
17 | 20 | scn2=libift.LinearInterp(scn,0,0,0) |
21 | + libift.UnShiftScene(scn2,flag) | |
18 | 22 | return libscnvtk.SceneToVtkImageData(scn2) |
19 | 23 | ... | ... |