You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an inconsistency in writing and reading data. This makes it possible to write models which can't be read in again. The concrete problem is: If no cells are present, nothing is written, but reading a file where no cells are written fails. The following lines show the issue:
This seems to be the problem mentioned in #332 as well. I'll close the other issue as it wasn't as specific, and we can continue the bug in this issue.
I like the proposal, don't fail when no cells are available, but return None.
Then when creating the domain, we could use createDomainWithCells instead of createDomainWithCells as in the readPointSetRepresentation function.
There is an inconsistency in writing and reading data. This makes it possible to write models which can't be read in again. The concrete problem is: If no cells are present, nothing is written, but reading a file where no cells are written fails. The following lines show the issue:
Nothing is written if cells are empty here:
https://github.com/unibas-gravis/scalismo/blob/main/src/main/scala/scalismo/io/statisticalmodel/StatismoIO.scala#L162
Reading throws if cells are not present here:
https://github.com/unibas-gravis/scalismo/blob/main/src/main/scala/scalismo/io/statisticalmodel/StatismoIO.scala#L296
and
for
-comprehension does not handle the error but simply fails here:https://github.com/unibas-gravis/scalismo/blob/main/src/main/scala/scalismo/io/statisticalmodel/StatismoIO.scala#L279
Proposal, we make sure that:
for
-comprehension continuesNone
when creating the domain.The text was updated successfully, but these errors were encountered: