HomePhabricator
Diffusion MITK a246dbac0379

Make Scene IO more robust regarding invalid data

Description

Make Scene IO more robust regarding invalid data

Summary:
Treat an empty filename for data as error when writing a scene.

Recognize data tag with empty file attribute as error when reading a scene.

Relax check for empty time steps in surfaces:

While a timestep with a valid polydata but without any content in
that polydata could be considered empty in a practical sense, it
isn't empty in the technical sense, as there actually is a
polydata, even though it is empty.

Time geometry, header, meta and property data is still present and should
be considered when saving such data. Declaring it as empty, though, would
trigger our serialization routines to dismiss all data.

Fixes T29334

Test Plan:
Tested on the scene file we received as sample for the reported bug(s).
Run serialization, scene I/O, and surface writer tests.
Checked for other implications of not considering an empty polydata as an empty timestep anymore

Reviewers: floca, O1 MITK Reviewer Group I

Reviewed By: floca, O1 MITK Reviewer Group I

Maniphest Tasks: T29334

Differential Revision: https://phabricator.mitk.org/D731

Details