SpecStore
dcmspec.spec_store.SpecStore
Bases: ABC
Abstract base class for DICOM specification model storage backends.
Subclasses should implement methods for loading and saving models.
Source code in src/dcmspec/spec_store.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
__init__(logger=None)
Initialize the model store with an optional logger.
PARAMETER | DESCRIPTION |
---|---|
logger
|
Logger instance to use. If None, a default logger is created.
TYPE:
|
Source code in src/dcmspec/spec_store.py
17 18 19 20 21 22 23 24 25 26 |
|
load(path)
abstractmethod
Load a model from the specified path.
PARAMETER | DESCRIPTION |
---|---|
path
|
The path to the file or resource to load from.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
SpecModel
|
The loaded model.
TYPE:
|
Source code in src/dcmspec/spec_store.py
28 29 30 31 32 33 34 35 36 37 38 39 |
|
save(model, path)
abstractmethod
Save a model to the specified path.
PARAMETER | DESCRIPTION |
---|---|
model
|
The model to save.
TYPE:
|
path
|
The path to the file or resource to save to.
TYPE:
|
Source code in src/dcmspec/spec_store.py
41 42 43 44 45 46 47 48 49 50 |
|