Convert a log file into a DICOM-RT

Hi,

I’m working with the log files of a Varian Mach Hello I am currently working with the log files of a Varian TrueBeam STx rig. I would like to know if anyone knows if it is possible to convert the MLC positions indicated by a record file into a DICOM-RT type file, which can be imported into a patient.

I really appreciate your support,

Luis

It’s definitely possible. There are no out-of-the-box solutions in pylinac however. A first-order algorithm would probably need to take in the original RT plan so all ancillary tags stay the same, and then either replace the original control points with averaged positional information of the log, or create a new RT plan with many, many more control points to match each log snapshot. Write these new control points to the original RT plan, and update some of the other tags accordingly (like # of control points).

Pymedphys has tools for working with Elekta log files, I’m not sure about Varian. They have an intermediate representation (Delivery class) that can come from DICOM, log files, or other sources, but I don’t know if writing back to DICOM is available. It’s probably worth contacting a maintainer or asking on their discourse, others may have made some progress with Varian log files, or writing DICOM-RT.

That’s just what I’m trying to do. Given that I have the RP file and the corresponding log file. The problem I am facing is because in the log file, the leaf positions are given for each of the snapshots and not at the checkpoints. So I don’t know what the relationship is to associate a certain number of snapshots that correspond to a control point.

Hi, having done something similar (i.e., the logfile → RT DICOM conversion) years ago, I wanted to contribute my two-cents here. Each snapshot in the logfile contains the corresponding control point, i.e., the temporal information is based on the control points. To your needs, you can create a function that filters the snapshots linked to integer control points and go from there. Hope this answers this your question.