Commit 20b284a76c8aef6057553ab331c658c456e13316
1 parent
09dd1451
Exists in
master
and in
31 other branches
Fixed ball reference and image resample
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
invesalius/data/imagedata_utils.py
| @@ -84,7 +84,7 @@ def ResampleImage2D(imagedata, px=None, py=None, resolution_percentage = None, | @@ -84,7 +84,7 @@ def ResampleImage2D(imagedata, px=None, py=None, resolution_percentage = None, | ||
| 84 | factor_y = py/float(f+1) | 84 | factor_y = py/float(f+1) |
| 85 | 85 | ||
| 86 | resample = vtk.vtkImageResample() | 86 | resample = vtk.vtkImageResample() |
| 87 | - resample.SetInput(imagedata) | 87 | + resample.SetInputData(imagedata) |
| 88 | resample.SetAxisMagnificationFactor(0, factor_x) | 88 | resample.SetAxisMagnificationFactor(0, factor_x) |
| 89 | resample.SetAxisMagnificationFactor(1, factor_y) | 89 | resample.SetAxisMagnificationFactor(1, factor_y) |
| 90 | resample.SetOutputSpacing(spacing[0] * factor_x, spacing[1] * factor_y, spacing[2]) | 90 | resample.SetOutputSpacing(spacing[0] * factor_x, spacing[1] * factor_y, spacing[2]) |
invesalius/data/viewer_volume.py
| @@ -232,7 +232,7 @@ class Viewer(wx.Panel): | @@ -232,7 +232,7 @@ class Viewer(wx.Panel): | ||
| 232 | self.ball_reference.SetRadius(r) | 232 | self.ball_reference.SetRadius(r) |
| 233 | 233 | ||
| 234 | mapper = vtk.vtkPolyDataMapper() | 234 | mapper = vtk.vtkPolyDataMapper() |
| 235 | - mapper.SetInput(self.ball_reference.GetOutput()) | 235 | + mapper.SetInputConnection(self.ball_reference.GetOutputPort()) |
| 236 | 236 | ||
| 237 | p = vtk.vtkProperty() | 237 | p = vtk.vtkProperty() |
| 238 | p.SetColor(1, 0, 0) | 238 | p.SetColor(1, 0, 0) |