Base class for scene-graph aware readers.
More...
#include <mitkAbstractSceneReader.h>
Base class for scene-graph aware readers.
Scene readers populate a DataStorage with nodes, their data, their parent/child relationships and their (possibly context-specific) property lists. This is structurally richer than what AbstractFileReader's contract can express, which is why scene readers form a separate class family and are invoked through SceneIO rather than the IOUtil / microservice path.
Concrete subclasses: SceneJsonReader (JSON scene files). The legacy XML reader (SceneReaderV1) remains on its own interface for now.
Definition at line 38 of file mitkAbstractSceneReader.h.
◆ AbstractSceneReader()
| mitk::AbstractSceneReader::AbstractSceneReader |
( |
| ) |
|
|
protected |
◆ ~AbstractSceneReader()
| mitk::AbstractSceneReader::~AbstractSceneReader |
( |
| ) |
|
|
overrideprotected |
◆ LoadScene()
| virtual bool mitk::AbstractSceneReader::LoadScene |
( |
const std::string & |
sceneSourcePath, |
|
|
DataStorage * |
storage, |
|
|
bool |
clearStorageFirst = false |
|
) |
| |
|
pure virtual |
Load a scene into storage.
- Parameters
-
| sceneSourcePath | Path of the primary scene descriptor (the JSON/XML index file). Its parent directory is used as the base path for resolving relative file references. |
| storage | Target DataStorage. Must not be null. |
| clearStorageFirst | If true, the reader is responsible for clearing storage before adding the loaded nodes. Clearing must be deferred until after the scene descriptor has been parsed and validated enough to commit to the load, so that unreadable or malformed scene files do not wipe the caller's session. |
- Returns
- True on success; false if non-fatal errors occurred during loading.
- Exceptions
-
| mitk::Exception | on fatal errors (invalid format, unsupported version, structural inconsistencies, ...). |
- Precondition
- storage != nullptr
Implemented in mitk::SceneJsonReader.
◆ mitkClassMacroItkParent()
The documentation for this class was generated from the following file: