qurit / qurit/rt-utils

ROI_number

Open
#66 3 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,
thank you for this tool.

I have some difficulties when adding a new ROI into an existing RTstructure.

In fact, I looked at the code and when adding a new ROI, the ROI_number is set to ds.StructureSetROISequence +1. However, in the RT file I have downloaded from my PACS, ROI_number are not consecutive. For example they are foing from 2 to 17, then 19 and 63. So I have for example 17 initial ROIs, and if I add 2 more ROIs, numbers 18 and 19 are automatically attributed, and this generates a error message when I reimport the RT structure in my PACS because there are two "numbers 19".

I will try to get around the problem but one of my suggestion would be to propose to the user to add (or not) the ROI_number when calling the add_ROI function and at least to specify this problem in your readme file as it was very difficult to understand where was the problem.

Best

Fabien

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 at the add_ROI function mentioned in the issue and inspect how ROI_number is chosen from the existing StructureSetROISequence. Reproduce the case with non-consecutive ROI numbers such as 2–17, 19, and 63, then verify that adding ROIs does not create duplicates and that the resulting RT structure can be reimported.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.