API reference¶
Load a single DICOM series from path.
If the path contains multiple series, series_uid selects one; otherwise
the largest series (most instances) is chosen and a debug note is logged.
An ordered DICOM series with a lazily assembled voxel volume.
metadata
property
¶
Validated, non-identifying descriptive metadata for the series.
representative
property
¶
The first dataset, used to read series-level attributes.
volume()
¶
Return the series as a 3D array (slices, rows, cols) in stored units.
Rescale slope/intercept are applied so CT data is returned in Hounsfield units. The result is cached after first assembly.
De-identify a single dataset in place and return an audit record.
salt is the pseudonymisation secret for PatientID and UIDs; when None it is
resolved by :func:resolve_pseudonym_secret.
Convert series to output in the requested format.
metadata is written into the image header as key/value pairs where the format
supports it (NRRD key:=value fields; NIfTI has no place for them). The
pipeline uses it to record what was, and was not, de-identified.
Returns a :class:ConversionResult recording the written path, shape, and
spacing. Raises :class:ConversionError if SimpleITK fails to write.
Write an integer labelmap as a Slicer .seg.nrrd segmentation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labelmap
|
ndarray
|
Integer array shaped like |
required |
reference
|
DicomSeries
|
The series the labelmap was derived from, used for output geometry. |
required |
segment_names
|
dict[int, str] | None
|
Optional mapping of label value -> human-readable segment name. |
None
|
Models¶
Bases: _Frozen
Result of running quality-control checks on an ingested series.
passed
property
¶
True when no hard errors were recorded (warnings are non-blocking).
Bases: _Frozen
Audit record describing what de-identification changed.
For a pipeline run this is the union over every instance in the series. Element
paths inside sequences are written Sequence[].Keyword.
Bases: _Frozen
What is known about identifying content in the pixel data of a series.
Pixel data is never analysed or modified, so pixel_content_verified and
pixels_modified are always False. status is "flagged" when metadata
indicates known or suspected burned-in annotation, else "unverified". A
missing or NO BurnedInAnnotation indicator is not proof of clean pixels.