Working with Datasets and Datafiles
A dataset is a logical group of one or more data files (datafiles) within a series. Datasets have a type (e.g. Philips raw, DICOM, generic file) that determines how Agora processes them.
Get a dataset by ID
dataset = agora.get_dataset(158)
Get all datasets of a series
series = agora.get_series(76)
datasets = series.get_datasets()
Filter by dataset type
from gtagora.models.dataset import DatasetType
raw_datasets = series.get_datasets(filters={'type': DatasetType.PHILIPS_RAW})
Dataset types
The DatasetType enumeration includes (among
others):
DatasetType.PHILIPS_RAWDatasetType.DICOMDatasetType.GENERIC
Refer to the DatasetType API reference for
the full list.
Working with datafiles
Each dataset contains one or more datafiles, which map to the actual files stored on the Agora server.
List datafiles of a dataset
for datafile in dataset.get_datafiles():
print(datafile.original_filename)
Get parameters
Datasets and series can carry structured metadata as parameters:
params = dataset.get_parameters()
for p in params:
print(f'{p.name}: {p.value}')
Get a parameter set by ID
ps = agora.get_parameterset(42)