qurit / qurit/rt-utils

rt-utils fails on "Radiation therapy simulation head ..."

Open
#106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
256
Forks
75
PR merge metrics
No merged PRs in 30d

Description

Trying to get ROI masks from this dataset: https://figshare.com/s/a5e09113f5c07b3047df

I had to use following hack in image_helper.py:

def get_slice_contour_data(series_slice: Dataset, contour_sequence: Sequence):
    slice_contour_data = []

    # Traverse through sequence data and get all contour data pertaining to the given slice
    for contour in contour_sequence:
        for contour_image in contour.ContourImageSequence:
            if contour_image.ReferencedSOPInstanceUID == get_UID(series_slice.filename): #series_slice.SOPInstanceUID:
                slice_contour_data.append(contour.ContourData)

    return slice_contour_data

where get_UID obtaines the UID from the file name. Not sure if this means the dataset is "broken", or if this is just a real problem that is not covered by rt-utils.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in rt_utils/image_helper.py around line 253 and inspect get_slice_contour_data, comparing the referenced UID with the series slice data for the linked dataset. Verify whether the filename-derived UID is valid DICOM behavior or an rt-utils gap. Done means the dataset is handled correctly without the reported hack, with suitable regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.