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,8 +218,10 @@ class Controller(): | ||
| 218 | def Tools_Interpolation(self, pubsub_evt): | 218 | def Tools_Interpolation(self, pubsub_evt): |
| 219 | print "Running histogram equalization..." | 219 | print "Running histogram equalization..." |
| 220 | scn = libscnvtk.VtkImageDataToScene(prj.Project().imagedata) | 220 | scn = libscnvtk.VtkImageDataToScene(prj.Project().imagedata) |
| 221 | + flag=libift.ShiftScene(scn) | ||
| 221 | scn2 = libift.LinearInterp(scn,0,0,0) | 222 | scn2 = libift.LinearInterp(scn,0,0,0) |
| 222 | libift.NewDestroyScene(scn) | 223 | libift.NewDestroyScene(scn) |
| 224 | + libift.UnShiftScene(scn2,flag) | ||
| 223 | newimg = libscnvtk.SceneToVtkImageData(scn2) | 225 | newimg = libscnvtk.SceneToVtkImageData(scn2) |
| 224 | libift.NewDestroyScene(scn2) | 226 | libift.NewDestroyScene(scn2) |
| 225 | self.CloseProject() | 227 | self.CloseProject() |
invesalius/libc/libalign/libalign.py
| @@ -7,13 +7,17 @@ from ..libscnvtk import libscnvtk as libscnvtk | @@ -7,13 +7,17 @@ from ..libscnvtk import libscnvtk as libscnvtk | ||
| 7 | def VolumeAlign(img): | 7 | def VolumeAlign(img): |
| 8 | scn = libscnvtk.VtkImageDataToScene(img) | 8 | scn = libscnvtk.VtkImageDataToScene(img) |
| 9 | print "VolumeAlign()" | 9 | print "VolumeAlign()" |
| 10 | + flag=libift.ShiftScene(scn) | ||
| 10 | scn2 = libift.MSP_Align(scn,None,0,1) | 11 | scn2 = libift.MSP_Align(scn,None,0,1) |
| 12 | + libift.UnShiftScene(scn2,flag) | ||
| 11 | return libscnvtk.SceneToVtkImageData(scn2) | 13 | return libscnvtk.SceneToVtkImageData(scn2) |
| 12 | 14 | ||
| 13 | 15 | ||
| 14 | 16 | ||
| 15 | def Interp(img): | 17 | def Interp(img): |
| 16 | scn = libscnvtk.VtkImageDataToScene(img) | 18 | scn = libscnvtk.VtkImageDataToScene(img) |
| 19 | + flag=libift.ShiftScene(scn) | ||
| 17 | scn2=libift.LinearInterp(scn,0,0,0) | 20 | scn2=libift.LinearInterp(scn,0,0,0) |
| 21 | + libift.UnShiftScene(scn2,flag) | ||
| 18 | return libscnvtk.SceneToVtkImageData(scn2) | 22 | return libscnvtk.SceneToVtkImageData(scn2) |
| 19 | 23 |