davidcaron / pye57

Read and write e57 point clouds from Python
MIT License
68 stars 42 forks source link

Adding panorama image to e57 file #28

Open giovanniborella opened 2 years ago

giovanniborella commented 2 years ago

I can't find infomation on adding image to e57 file - I'm aware of the implementation in #15 but fail to find any doumentation on how to add new nodes

mitch-galea commented 1 year ago

I have been able to add new nodes but don't know how to write them.

import pye57

e57 = pye57.E57("filename.e57")

imf = e57.image_file
images_vector = imf.root()["images2D"]

new_image = images_vector.append(pye57.libe57.StructureNode(imf))
new_image.set("guid", libe57.StringNode(imf, "0000000000000000"))
# add nodes

e57.close()

here is the gist of the code thats working, but when I reopen the e57 the changes are not there

Could anyone advise on how to write these changes to the file, or answer the original question in whole?