Commit fe5e0fb2b874b825a594604ed93456cd7a15b212
1 parent
bfb74669
Exists in
master
using imageio (imread and imsave from scipy deprecated)
Showing
4 changed files
with
5 additions
and
5 deletions
Show diff stats
invesalius/data/measures.py
| ... | ... | @@ -18,7 +18,7 @@ import invesalius.utils as utils |
| 18 | 18 | |
| 19 | 19 | from invesalius import math_utils |
| 20 | 20 | from invesalius.gui.widgets.canvas_renderer import TextBox, CircleHandler, Ellipse, Polygon, CanvasHandlerBase |
| 21 | -from scipy.misc import imsave | |
| 21 | +from imageio import imsave | |
| 22 | 22 | |
| 23 | 23 | TYPE = {const.LINEAR: _(u"Linear"), |
| 24 | 24 | const.ANGULAR: _(u"Angular"), | ... | ... |
invesalius/data/styles.py
| ... | ... | @@ -40,7 +40,7 @@ import invesalius.session as ses |
| 40 | 40 | import numpy as np |
| 41 | 41 | |
| 42 | 42 | from scipy import ndimage |
| 43 | -from scipy.misc import imsave | |
| 43 | +from imageio import imsave | |
| 44 | 44 | from scipy.ndimage import watershed_ift, generate_binary_structure |
| 45 | 45 | from skimage.morphology import watershed |
| 46 | 46 | ... | ... |
invesalius/data/viewer_volume.py
| ... | ... | @@ -32,7 +32,7 @@ from wx.lib.pubsub import pub as Publisher |
| 32 | 32 | import random |
| 33 | 33 | from scipy.spatial import distance |
| 34 | 34 | |
| 35 | -from scipy.misc import imsave | |
| 35 | +from imageio import imsave | |
| 36 | 36 | |
| 37 | 37 | import invesalius.constants as const |
| 38 | 38 | import invesalius.data.bases as bases | ... | ... |
invesalius/reader/bitmap_reader.py
| ... | ... | @@ -29,7 +29,7 @@ from wx.lib.pubsub import pub as Publisher |
| 29 | 29 | from multiprocessing import cpu_count |
| 30 | 30 | |
| 31 | 31 | from vtk.util import numpy_support |
| 32 | -from scipy import misc | |
| 32 | +from imageio import imread | |
| 33 | 33 | import numpy |
| 34 | 34 | import imghdr |
| 35 | 35 | |
| ... | ... | @@ -286,7 +286,7 @@ def VtkErrorPNGWriter(obj, f): |
| 286 | 286 | |
| 287 | 287 | def ScipyRead(filepath): |
| 288 | 288 | try: |
| 289 | - r = misc.imread(filepath, flatten=True) | |
| 289 | + r = imread(filepath, flatten=True) | |
| 290 | 290 | dt = r.dtype |
| 291 | 291 | if dt == "float" or dt == "float16"\ |
| 292 | 292 | or dt == "float32" or dt == "float64": | ... | ... |