How can I “visualize” 3D image stored (h5py) .h5 format in python?
up vote
-1
down vote
favorite
I want to visualize 3D image stored in .h5 format. I would like to know how can I to it in python. For input , I have file name as '***.h5'
python h5py d3dimage
add a comment |
up vote
-1
down vote
favorite
I want to visualize 3D image stored in .h5 format. I would like to know how can I to it in python. For input , I have file name as '***.h5'
python h5py d3dimage
A general comment is that it best to try a things yourself and post where you get stuck. First, it will limit answers to things that you are interest in (e.g. you might not be interested in using OpenCV but rather want to use matplotlib). Second, you are likely to get stuck at a similar place as others. This way, your question will thus help others. Third, too open questions are very much opinionated, which is not the aim of the platform.
– Tom de Geus
Nov 13 at 7:05
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I want to visualize 3D image stored in .h5 format. I would like to know how can I to it in python. For input , I have file name as '***.h5'
python h5py d3dimage
I want to visualize 3D image stored in .h5 format. I would like to know how can I to it in python. For input , I have file name as '***.h5'
python h5py d3dimage
python h5py d3dimage
asked Nov 7 at 9:09
Akshay Paranjape
11
11
A general comment is that it best to try a things yourself and post where you get stuck. First, it will limit answers to things that you are interest in (e.g. you might not be interested in using OpenCV but rather want to use matplotlib). Second, you are likely to get stuck at a similar place as others. This way, your question will thus help others. Third, too open questions are very much opinionated, which is not the aim of the platform.
– Tom de Geus
Nov 13 at 7:05
add a comment |
A general comment is that it best to try a things yourself and post where you get stuck. First, it will limit answers to things that you are interest in (e.g. you might not be interested in using OpenCV but rather want to use matplotlib). Second, you are likely to get stuck at a similar place as others. This way, your question will thus help others. Third, too open questions are very much opinionated, which is not the aim of the platform.
– Tom de Geus
Nov 13 at 7:05
A general comment is that it best to try a things yourself and post where you get stuck. First, it will limit answers to things that you are interest in (e.g. you might not be interested in using OpenCV but rather want to use matplotlib). Second, you are likely to get stuck at a similar place as others. This way, your question will thus help others. Third, too open questions are very much opinionated, which is not the aim of the platform.
– Tom de Geus
Nov 13 at 7:05
A general comment is that it best to try a things yourself and post where you get stuck. First, it will limit answers to things that you are interest in (e.g. you might not be interested in using OpenCV but rather want to use matplotlib). Second, you are likely to get stuck at a similar place as others. This way, your question will thus help others. Third, too open questions are very much opinionated, which is not the aim of the platform.
– Tom de Geus
Nov 13 at 7:05
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Load the file in python like:
import h5py
filename = 'file.hdf5'
f = h5py.File(filename, 'r')
And then check it's type. If it's a numpy array you can use OpenCV or Pillow. If it's not, just make a numpy array from it with f = np.array(f)
.
OpenCV:
cv.imshow('text', f)
cv.waitKey(0)
cv.destroyAllWindows()
Pillow:
Image.fromarray(f).show()
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Load the file in python like:
import h5py
filename = 'file.hdf5'
f = h5py.File(filename, 'r')
And then check it's type. If it's a numpy array you can use OpenCV or Pillow. If it's not, just make a numpy array from it with f = np.array(f)
.
OpenCV:
cv.imshow('text', f)
cv.waitKey(0)
cv.destroyAllWindows()
Pillow:
Image.fromarray(f).show()
add a comment |
up vote
1
down vote
Load the file in python like:
import h5py
filename = 'file.hdf5'
f = h5py.File(filename, 'r')
And then check it's type. If it's a numpy array you can use OpenCV or Pillow. If it's not, just make a numpy array from it with f = np.array(f)
.
OpenCV:
cv.imshow('text', f)
cv.waitKey(0)
cv.destroyAllWindows()
Pillow:
Image.fromarray(f).show()
add a comment |
up vote
1
down vote
up vote
1
down vote
Load the file in python like:
import h5py
filename = 'file.hdf5'
f = h5py.File(filename, 'r')
And then check it's type. If it's a numpy array you can use OpenCV or Pillow. If it's not, just make a numpy array from it with f = np.array(f)
.
OpenCV:
cv.imshow('text', f)
cv.waitKey(0)
cv.destroyAllWindows()
Pillow:
Image.fromarray(f).show()
Load the file in python like:
import h5py
filename = 'file.hdf5'
f = h5py.File(filename, 'r')
And then check it's type. If it's a numpy array you can use OpenCV or Pillow. If it's not, just make a numpy array from it with f = np.array(f)
.
OpenCV:
cv.imshow('text', f)
cv.waitKey(0)
cv.destroyAllWindows()
Pillow:
Image.fromarray(f).show()
answered Nov 7 at 9:14
Novak
64548
64548
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%2f53186363%2fhow-can-i-visualize-3d-image-stored-h5py-h5-format-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
A general comment is that it best to try a things yourself and post where you get stuck. First, it will limit answers to things that you are interest in (e.g. you might not be interested in using OpenCV but rather want to use matplotlib). Second, you are likely to get stuck at a similar place as others. This way, your question will thus help others. Third, too open questions are very much opinionated, which is not the aim of the platform.
– Tom de Geus
Nov 13 at 7:05