Closed linamnt closed 6 years ago
Hi, This is easy things to do. Can you send me a small hdf5 example to have a look at how your would order dimensions? Best Guillaume
Do you mean how we convert our videos to hdf5? Or do you mean a sample hdf5 file that we've converted?
This is basically the code:
# where Y is the video in the shape: frames x width x height
tdim, xdim, ydim = Y.shape
movie = file.create_dataset('movie', shape = (tdim, xdim*ydim), chunks = True)
file.attrs['folder'] = dirname
file.attrs['filename'] = basename
file['movie'].attrs['duration'] = tdim
file['movie'].attrs['dims'] = (xdim, ydim)
movie[:] = Y.reshape((tdim, xdim*ydim))
Thanks!
Hello,
We have made the change you asked. To make it work :
Let us know if it works.
Guillaume
This is more of a minor feature request.
I understand that it's impossible to have your code be able to read all video formats, but since miniscopy is already built to work with .hdf5, it might make sense to have users that use other file formats to convert their files to .hdf5 format (rather than converting to .avi) similar to the structure of the hdf5 files created in
get_hdf_file()
. This would bypass the first two lines of code innormcorre
if the file is already .hdf5.I can submit a PR if you'd like.