Error reading mhd files with SimpleITK in Python
up vote
1
down vote
favorite
I'm here again with another question regarding SimpleITK in python. I want to plot a .mhd image but I don't know how. I'm trying the function described here Reading *.mhd/*.raw format in python:
load_itk('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
But it is not reading the image:
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a83730): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
I have tried with scikit image too...
img = io.imread('/home/bianca/Documents/PythonProcessing/result-Edep.mhd', plugin='simpleitk')
but I'm also getting an error message
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a84280): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
Even with medpy
from medpy.io import load
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
File "medpy/io/load.py", line 201, in load
raise err
DependencyError: Loading images of type Itk/Vtk MetaImage (.mhd, .mha/.raw) requires a third-party module that could not be encountered. Reason: No module named itk.
But I do have SimpleITK now. I don't understand what's going on... =(
python image-processing computer-vision itk simpleitk
add a comment |
up vote
1
down vote
favorite
I'm here again with another question regarding SimpleITK in python. I want to plot a .mhd image but I don't know how. I'm trying the function described here Reading *.mhd/*.raw format in python:
load_itk('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
But it is not reading the image:
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a83730): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
I have tried with scikit image too...
img = io.imread('/home/bianca/Documents/PythonProcessing/result-Edep.mhd', plugin='simpleitk')
but I'm also getting an error message
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a84280): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
Even with medpy
from medpy.io import load
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
File "medpy/io/load.py", line 201, in load
raise err
DependencyError: Loading images of type Itk/Vtk MetaImage (.mhd, .mha/.raw) requires a third-party module that could not be encountered. Reason: No module named itk.
But I do have SimpleITK now. I don't understand what's going on... =(
python image-processing computer-vision itk simpleitk
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm here again with another question regarding SimpleITK in python. I want to plot a .mhd image but I don't know how. I'm trying the function described here Reading *.mhd/*.raw format in python:
load_itk('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
But it is not reading the image:
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a83730): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
I have tried with scikit image too...
img = io.imread('/home/bianca/Documents/PythonProcessing/result-Edep.mhd', plugin='simpleitk')
but I'm also getting an error message
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a84280): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
Even with medpy
from medpy.io import load
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
File "medpy/io/load.py", line 201, in load
raise err
DependencyError: Loading images of type Itk/Vtk MetaImage (.mhd, .mha/.raw) requires a third-party module that could not be encountered. Reason: No module named itk.
But I do have SimpleITK now. I don't understand what's going on... =(
python image-processing computer-vision itk simpleitk
I'm here again with another question regarding SimpleITK in python. I want to plot a .mhd image but I don't know how. I'm trying the function described here Reading *.mhd/*.raw format in python:
load_itk('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
But it is not reading the image:
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a83730): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
I have tried with scikit image too...
img = io.imread('/home/bianca/Documents/PythonProcessing/result-Edep.mhd', plugin='simpleitk')
but I'm also getting an error message
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:483:
itk::ERROR: MetaImageIO(0x3a84280): File cannot be read: /home/bianca/Documents/PythonProcessing/result-Edep.mhd for reading.
Reason: Success
Even with medpy
from medpy.io import load
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
image_data, image_header = load('/home/bianca/Documents/PythonProcessing/result-Edep.mhd')
File "medpy/io/load.py", line 201, in load
raise err
DependencyError: Loading images of type Itk/Vtk MetaImage (.mhd, .mha/.raw) requires a third-party module that could not be encountered. Reason: No module named itk.
But I do have SimpleITK now. I don't understand what's going on... =(
python image-processing computer-vision itk simpleitk
python image-processing computer-vision itk simpleitk
asked Jul 24 '17 at 20:04
user
378
378
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
Is the file you are trying to read valid? You can check that using some other image displaying tool, e.g. ITK-SNAP or 3D Slicer. If either of these tools can open it, please tell us the version of SimpleITK you are using.
3
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
add a comment |
up vote
0
down vote
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Is the file you are trying to read valid? You can check that using some other image displaying tool, e.g. ITK-SNAP or 3D Slicer. If either of these tools can open it, please tell us the version of SimpleITK you are using.
3
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
add a comment |
up vote
1
down vote
Is the file you are trying to read valid? You can check that using some other image displaying tool, e.g. ITK-SNAP or 3D Slicer. If either of these tools can open it, please tell us the version of SimpleITK you are using.
3
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
add a comment |
up vote
1
down vote
up vote
1
down vote
Is the file you are trying to read valid? You can check that using some other image displaying tool, e.g. ITK-SNAP or 3D Slicer. If either of these tools can open it, please tell us the version of SimpleITK you are using.
Is the file you are trying to read valid? You can check that using some other image displaying tool, e.g. ITK-SNAP or 3D Slicer. If either of these tools can open it, please tell us the version of SimpleITK you are using.
answered Jul 24 '17 at 22:11
Dženan
1,59911930
1,59911930
3
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
add a comment |
3
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
3
3
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
– g.stevo
Jul 24 '17 at 23:34
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Dzenan, thank you for your answer! Now it's reading the file thanks to g.stevo clue (it was missing the raw file). However, now I don't know how to display the image... (I believe you can guess that I'm just a beginner =/)
– user
Jul 25 '17 at 18:42
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
Have you seen this: insightsoftwareconsortium.github.io/SimpleITK-Notebooks
– Dženan
Jul 25 '17 at 20:19
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
If the above notebooks don't help try googling "SimpleITK Python tutorial" and following something.
– Dženan
Jul 25 '17 at 20:21
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
@g.stevo Your comment should be an answer, since that's what I missed in my case. All the best!
– Бојан Матовски
Nov 15 at 14:00
add a comment |
up vote
0
down vote
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
add a comment |
up vote
0
down vote
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
add a comment |
up vote
0
down vote
up vote
0
down vote
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
MHD Files typically require an mhd header and a raw file that contains the image data - do you have both in the same directory with the mhd header pointing to the data?
answered Nov 19 at 0:37
g.stevo
40728
40728
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45289142%2ferror-reading-mhd-files-with-simpleitk-in-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown