-
Notifications
You must be signed in to change notification settings - Fork 65
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
SSM with no triangulation - read-write inconsistency #332
Comments
Closing issue as the discussion/issue will continue in #426 |
This issue goes futher than #426. #426 is needed to write and read back in UnstructuredPointsDomains. But fixing #426 will facilitate fixing this issue. It will remain to change StatismoDomainIO to allow the construction of the different domains also without cells. Currently this fails with a Throwable. If it makes sense to write/read TriangleMeshes without cells is for me something we should agree on in the community. I have not a too strong opionion in either direction. |
Thank you for looking more into this @Andreas-Forster. I'm okay with the solution as long as it is consistent with reading and writing. However, I lean more towards keeping the flexibility of writing a triangleMesh with no cells (and even no points) - since this is a valid triangleMesh in Scalismo, I don't see why we then shouldn't be able to read/write it. |
I would not block the additional flexibility, if we think it's the strategy in scalismo to allow that. I think the discussion is, is a TriangleMesh with no cells, and maybe no points still a TriangleMesh? In case we say this is a valid TriangleMesh, even that it is maybe not a very usefull one, we should change the handling of the situation where no cells are read. Otherwise we should make the type TriangleMesh stricter. @marcelluethi What do you think? Do you have any preference? |
Thanks for starting this discussion. We should allow for triangle meshes, where not all the vertices are connected with triangles, as this situation can occur if we clip with a predicate. If we allow some vertices to be not connected with others, I would find it consistent to allow all vertices have no triangles. |
Ok this sounds reasonable. I will then update the PR #427 to fix also this issue. |
I update the PR #427, so this issue should also be fixed when we merge the PR. |
There is some inconsistency to the StatisticalModelIO when reading and writing an SSM without the reference mesh having a triangulation (empty TriangleList).
A file can successfully be written. But when read, it fails due to the processing of missing items in "representer/cells".
Below is a small example which will show the error:
Exception in thread "main" ncsa.hdf.hdf5lib.exceptions.HDF5Exception: ncsa.hdf.hdf5lib.exceptions.HDF5Exception: No data to read.
The error traces back to line 312 in the StatisticalModelIO.scala file.
The text was updated successfully, but these errors were encountered: