Read medical images
Reads CT and MR scans (NIfTI, NRRD, MHA or DICOM series), checks their geometry, converts DICOM to NIfTI and draws three slices through each, with the anatomy over them when labels are connected.
How it works
Connect scans: NIfTI (.nii, .nii.gz), NRRD or MHA files, or the files of DICOM series (folders of .dcm files, grouped by series). Each scan is checked: size, spacing, orientation, slices missing in a DICOM series, thick slices; DICOM series are written as NIfTI (Volumes) for the next blocks.
The picture of each scan shows an axial, a coronal and a sagittal slice through the middle of the anatomy, in a CT window (soft tissue, bone, lung, brain) or scaled to the scan (MR); connect the labels of the same cases (masks in segmentations/ folders, or label maps) to colour the structures over the slices. Masks connected as scans (in folders named segmentations, masks or labels) are skipped.
Only technical DICOM tags (modality, series description, maker, slice thickness) reach the table: never a patient's name, ID or dates. Runs on any worker.
Inputs
| Input | Takes | What it is |
|---|---|---|
Scansscans | Files gz, nii, nrrd, nhdr, mha, mhd, dcm | NIfTI, NRRD, MHA, or the files of DICOM series Takes several connections. |
Labelslabels | Files gz, nii, nrrd, mha | Optional: masks (segmentations/ of each case) or label maps, coloured over the slices Optional. Takes several connections. |
Outputs
| Output | Gives | What it is |
|---|---|---|
Volumesvolumes | Files gz, nii, nrrd, mha | Each scan as a volume: DICOM series as <case>/scan.nii.gz, other volumes as they came |
Slicespreviews | Files png | <case>_slices.png: axial, coronal and sagittal slices, with the labels over them |
Scanstable | Table csv | scans.csv: case, source, modality, size, spacing_mm, orientation, extent_mm, min, max, slice_gaps, series, manufacturer, labels, note |
Live telemetrytelemetry | Live telemetry | What the block sends while it runs, for views such as Chart or 3D view. |
Settings
| Setting | Default | What it does |
|---|---|---|
Windowwindow |
CT soft tissue | How CT values become greys in the pictures; auto: scaled to each scan (MR) One of: CT soft tissue, CT bone, CT lung, CT brain, auto |
Skip foldersskip |
segmentations, segmentation, masks, mask, labels, label | Files in folders with these names are not scans |
DICOM to NIfTIconvert |
on | Write each DICOM series as a NIfTI volume |
Where it runs
On one of your computers with the EsaSim worker: Any worker.
The worker installs the Python packages it needs when they are missing: numpy</code>, <code>SimpleITK</code>, <code>pillow.
In its code, settings are ctx.params["key"], inputs ctx.inputs["id"] and outputs ctx.output("id", "name.ext"); see Custom blocks.