qurit / qurit/rt-utils

suggestion to avoid issue when multiple types of files are in the same folder

Open
#51 4 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

Hi rt_Utils authors,

Thanks for a great tool !

I've experienced some problems, when I am running the add_roi function.
I got the following error-message: Mask must have the same number of layers (In the 3rd dimension) as input series. Expected 130, got 129.

The problem arises, because my folder contains both RT structs, CT scans, RT dose and RT plan. The RT dose file do also have a 'pixel_array' attribute.

I changed a line in the function: load_dcm_images_from_path

from
if hasattr(ds, "pixel_array"):
series_data.append(ds)

to
if ds.Modality == 'CT':
series_data.append(ds)

It solved my problem. :)

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 by locating load_dcm_images_from_path and reproduce the reported add_roi failure with a folder containing RT structs, CT scans, RT dose, and RT plan files. Verify that mixed DICOM content no longer produces a layer-count mismatch and that CT image series are selected correctly.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.