Link between plan and structure set files

Hi All,

I’m hoping you might be able to help me out with a question related to the link between DICOM structure set and RTplan files.
Here is my scenario…

  • I have a DICOM structure set file (and some DICOM image files) which I have exported from a brachy TPS
  • Another institution has imported these files into their own TPS and created a plan
  • I want to open their DICOM plan file and my DICOM structure set file in Radcalc together (they should both be based on the same image series)

This isn’t working, and I’m not sure which parameter needs to be edited to ‘trick’ Radcalc into opening up the patient files together.

Does anyone know how I might be able to get this to work?

Cheers,
Joel

Hi @poderj :slight_smile:,

:balloon: Welcome to the PyMedPhys community :tada: :balloon: :slightly_smiling_face:

Unfortunately I don’t have any experience with Radcalc personally. Maybe someone else can chime in here? @Matthew-Jennings do you have any ideas on this front?

Personally, the way I would go about it is I would create a plan using that structure set file on my own TPS, verify that plan and structure file happily go into radcalc, and then I’d open up my plan file and their plan file in dicompyler and see what key items were different.

Out of interest, as one of my TEAP items of best work back in the day I made the following TG43 independent calculation tool that loads up DICOM files and compares the DICOM dose to a re-calculated dose. We’re not a brachy site, and I have had almost no brachy experience, and the code for that best work has not undergone true battle testing, so please take it with a grain of salt… but it’d be interesting if the files in question were able to be successfully loaded into the following notebook:

Cheers,
Simon

I’m not sure if this is the issue for you, but I have a post in another discussion that explains the connections between different SOP instance UIDs (spoiler alert - it’s a bit complicated :woozy_face:, but not so bad for plan to strx set). That should usually be the way that any software recognizes different objects are connected.

Referenced RT Structure Set Sequence
See:
https://dicom.innolitics.com/ciods/rt-plan/rt-general-plan/300c0060

But simply having the proper reference may not be enough if the application (RadCalc) expects the DICOM objects to “be” somewhere in particular (previously imported, or internally generated).
If the RT Structure Set itself was not previously imported in to RadCalc, I would try transmitting it/importing it in to RadCalc. As well as the CT referenced by the RT Structure Set.

You also mention “another institution”. Was there any anonymisation taking place during the exchange between institutions? If so, having mismatched patient/study/series/instance identifiers should cause rejection of mixing the data. The Referenced RT Structure Set Sequence contains the Referenced SOP Instance UID (an instance identifier). But in exchanging between institutions, it is possible that other identifiers were changed to maintain PHI (e.g. patient name, patient id). In that case, @SimonBiggs suggestion of doing a “diff” between the files is necessary. For this type of thing I use DVTK DCMCompare, (see dvtk.org, MS Windows only though) but if dicompyler has a diff, I wouldn’t hesitate to use it.

Thanks everyone for the responses.
It was the SOP instance UID that was the culprit in the end, once I matched these in the plan and SS files, Radcalc recognised them both and matched them during import.

@sjswerdloff - apologies, I should have provided some more information in my previous post, I did ensure that patient identifiers were matching.

@SimonBiggs - I don’t have time right now to look at the notebook, but I do have a PhD student starting a project soon who might find that tool very useful. I’ll ask him to take a look at it and we will get in contact if we think it would be of use/contribute if possible.

All’s well that ends well.
I just wanted to cover all the bases so you would not have to round trip too many times before getting to “it works”.