NOTE: As it turned out, it is not as easy to reproduce as initially thought, as most times a surface of a single slice segmentation can indeed be created. We can provide an example scene file which we do not attach here because of its huge filesize.
To reproduce:
- Open an image and create a segmentation, draw a single slice
- Right-click on the segmentation in the Data Manager, choose "Create polygon model" (not the smoothed version) and notice that the generated surface "Label 1" is an empty surface
- Save the project and notice the output in the terminal that IOUtil won't write empty files
- In the index.xml of the generated project file (is a .zip file with .mitk extension) the node is still references with the file attribute set to an empty string
- Load the project file again, crash , since our loading code doesn't handle the case when the file attribute mentioned above is empty
So we have two issues here that we need to solve:
- Either actually write an empty surface to the project file or if we decide not to do, don't create an entry for it in the index
- Make our loading routine more robust