-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dealing with absolute paths #23
Comments
OK, I now tried with relative paths but this does not work.
Bad... |
I think you need to change the data path after you used Something lke this should work (not tested + will overwrite): def write_data_path(xml_file, new_file_path):
root = ET.parse(xml_file).getroot()
node = root.find('SequenceDescription').find('ImageLoader')
node = node.find('hdf5')
node.text = new_file_path
node.attrib['type'] = 'absolute'
indent_xml(root) # this is part of pybdv.metadata
tree = ET.ElementTree(root)
tree.write(xml_file)
Yes, eventually that sounds like a good option |
what would speak against having the In the long run, with large h5/n5 containers located somewhere on the file system or S3 buckets, it will be rather common than the exception to have data and XML in different locations. |
Yes, I agree in the long-term this should be solved a bit differently. So for now, you can just use something like the code-snippet above to fix it and I would revisit this when I have time to think about S3 integration. |
Hi,
what can we do to make pybdv applicable to the following scenario:
AffineTransform
and potentially other attributes.My idea is to just use
write_xml_metadata
and have it point to the data container. This however cannot be done using relative paths if the user does not have write access there. So far you have that hardcoded in this function. I will give it a try by finding common path and the use relative directory listing, however, this will fail under Windows when different shares are mounted as different drives...Any ideas how to solve that? S3 storage for this data?
The text was updated successfully, but these errors were encountered: