Commit d176f8eca6ac9ecd33fa5661fcd27fadd9765dec
1 parent
4893bc0a
Exists in
master
and in
68 other branches
ENH: Using nibabel instead of nipy, niby doesn't compile in windows
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
invesalius/reader/analyze_reader.py
| @@ -23,7 +23,7 @@ import tempfile | @@ -23,7 +23,7 @@ import tempfile | ||
| 23 | 23 | ||
| 24 | import vtk | 24 | import vtk |
| 25 | 25 | ||
| 26 | -from nipy.io.imageformats import AnalyzeHeader | 26 | +from nibabel import AnalyzeHeader |
| 27 | 27 | ||
| 28 | def ReadAnalyze(filename): | 28 | def ReadAnalyze(filename): |
| 29 | print "Reading analyze file:", filename | 29 | print "Reading analyze file:", filename |
| @@ -32,7 +32,7 @@ def ReadAnalyze(filename): | @@ -32,7 +32,7 @@ def ReadAnalyze(filename): | ||
| 32 | header_file = open(filename) | 32 | header_file = open(filename) |
| 33 | header = AnalyzeHeader.from_fileobj(header_file) | 33 | header = AnalyzeHeader.from_fileobj(header_file) |
| 34 | xf, yf, zf = header.get_data_shape()[:3] | 34 | xf, yf, zf = header.get_data_shape()[:3] |
| 35 | - data_type = header.get_datatype() | 35 | + data_type = header.get_data_dtype().name |
| 36 | pixel_spacing = header.get_zooms()[:3] | 36 | pixel_spacing = header.get_zooms()[:3] |
| 37 | 37 | ||
| 38 | # Mapping from numpy type to vtk type. | 38 | # Mapping from numpy type to vtk type. |