Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::AbstractSceneReader Class Referenceabstract

Base class for scene-graph aware readers. More...

#include <mitkAbstractSceneReader.h>

Inheritance diagram for mitk::AbstractSceneReader:
Collaboration diagram for mitk::AbstractSceneReader:

Public Member Functions

 mitkClassMacroItkParent (AbstractSceneReader, itk::Object)
 
virtual bool LoadScene (const std::string &sceneSourcePath, DataStorage *storage, bool clearStorageFirst=false)=0
 Load a scene into storage. More...
 

Protected Member Functions

 AbstractSceneReader ()
 
 ~AbstractSceneReader () override
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AbstractSceneReader()

mitk::AbstractSceneReader::AbstractSceneReader ( )
protected

◆ ~AbstractSceneReader()

mitk::AbstractSceneReader::~AbstractSceneReader ( )
overrideprotected

Member Function Documentation

◆ LoadScene()

virtual bool mitk::AbstractSceneReader::LoadScene ( const std::string &  sceneSourcePath,
DataStorage *  storage,
bool  clearStorageFirst = false 
)
pure virtual

Load a scene into storage.

Parameters
sceneSourcePathPath of the primary scene descriptor (the JSON/XML index file). Its parent directory is used as the base path for resolving relative file references.
storageTarget DataStorage. Must not be null.
clearStorageFirstIf 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::Exceptionon fatal errors (invalid format, unsupported version, structural inconsistencies, ...).
Precondition
storage != nullptr

Implemented in mitk::SceneJsonReader.

◆ mitkClassMacroItkParent()

mitk::AbstractSceneReader::mitkClassMacroItkParent ( AbstractSceneReader  ,
itk::Object   
)

The documentation for this class was generated from the following file: