UCLH-Foundry / PIXL

PIXL Image eXtraction Laboratory
Apache License 2.0
8 stars 0 forks source link

Parametrise `generate_dicom_dataset()` #348

Closed milanmlft closed 5 months ago

milanmlft commented 5 months ago

In preparation of #292

milanmlft commented 5 months ago

Alright, so with add_private_tags(), I think we can mimic the Philips diffusion example:

>>> ds = generate_dicom_dataset(Manufacturer = "Philips")
>>> add_private_tags(
    ds,
    [
        ((0x2001, 0x1003), "FL", 1000),
        ((0x2005, 0x10B0), "FL", 1.0),
        ((0x2005, 0x10B1), "FL", 1.0),
        ((0x2005, 0x10B2), "FL", 0.0),
    ],
)

>>> ds
...
(2001, 1003) Private tag data                    FL: 1000
(2005, 10b0) Private tag data                    FL: 1.0
(2005, 10b1) Private tag data                    FL: 1.0
(2005, 10b2) Private tag data                    FL: 0.0
...