marts / hdf5view Goto Github PK
View Code? Open in Web Editor NEWSimple Qt/Python based viewer for HDF5 files
License: MIT License
Simple Qt/Python based viewer for HDF5 files
License: MIT License
Using the following h5py script to create data using external links :
import h5py
import numpy as np
file1 = h5py.File('test_a.hdf5', 'w')
file1['/path/to/data'] = np.array([0,1,2])
file1.close()
file2 = h5py.File('test_b.hdf5', 'w')
file2['/path/to/data2'] = np.array([3,4,5])
file2.close()
composite = h5py.File('test.hdf5', 'w')
composite['/a'] = h5py.ExternalLink('test_a.hdf5', '/path/to/data')
composite['/b'] = h5py.ExternalLink('test_b.hdf5', '/path/to/data2')
composite.close()
h5dump
can open the test.hdf5
dataset:
HDF5 "test.hdf5" {
GROUP "/" {
EXTERNAL_LINK "a" {
TARGETFILE "test_a.hdf5"
TARGETPATH "/path/to/data"
DATASET "/path/to/data" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 3 ) / ( 3 ) }
DATA {
(0): 0, 1, 2
}
}
}
EXTERNAL_LINK "b" {
TARGETFILE "test_b.hdf5"
TARGETPATH "/path/to/data2"
DATASET "/path/to/data2" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 3 ) / ( 3 ) }
DATA {
(0): 3, 4, 5
}
}
}
}
}
but hdf5view
cannot:
Traceback (most recent call last):
File ".../hdf5view/models.py", line 91, in handle_expanded
child_node = self.hdf[path]
~~~~~~~~^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File ".../h5py/_hl/group.py", line 357, in __getitem__
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 189, in h5py.h5o.open
KeyError: 'Unable to synchronously open object (component not found)'
External links are documented here in h5py
Hi @marts, thanks again for this beautifully written and efficient library! I'm interested in viewing images in hdf5 files and saw that you've already made a great start in your imageview branch. This is something which would be very useful at work at the moment and so I've added some functionality in the imageview_dev branch on my fork. The image viewing seems to be working well and it's possible to have several image tabs open and also to navigate to other nodes on the table or other image tabs. If this might be of interest, I'd be happy to contribute this to your project (just thought I'd ask before starting a PR as there are more significant changes than the last one).
Hey everybody,
I made a fork of your code here because I needed a handy little viewer for VMAP data.
Would those changes be interesting to you? Then I could create a pull request for that. It works, basically, like the image viewer and renders the mesh inside a new tab created in the midscreen viewing area.
best wishes and have a great weekend,
Nico
Hi!
after
pip install -e .
running main.py in PyCharm leaves me with the following error message:
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "main.py", line 29, in <module>
from . import __version__
ImportError: attempted relative import with no known parent package
Changing to
from hdf5view import __version__
from hdf5view.mainwindow import MainWindow
resolves it. Are there any concerns in changing it like that?
Btw: Thanks for a very promising project!
Current convention is to rename the old fashioned 'master' branch to 'main', to avoid any negative connotations with the term 'master'.
Renaming can be done easily on the central repo but any clones would also have to be updated later.
What do you think @marts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.