Open jmp1985 opened 2 years ago
Hi Dimitrios
If this is something you really need now, I suggest writing a little script. I will try to implement this properly but in the meantime something like:
import h5py
import mrcfile
# Read mrcfile
infile = mrcfile.open(input_filename)
data = infile.data
# Write hdf5 file
outfile = h5py.File(output_filename)
outfile.create_dataset("data", shape=data.shape, dtype=data.dtype)
outfile["data"][:] = data[:]
This won't propagate any metadata but that may be ok for your usage for the moment.
James thank for adding this issue. It will truly help me greatly to have this feature, because in order to use corrected image in conjuction with a deep learning approach they need to first by exported as hdf5 files. This is because hdf5 files allow multiple parallel reads (while mrc files do not), which is neccessary the fast supply of training instances to a neural network, allowing it to train within a reasonable time period.