topasmc / dicom-interface

DICOM RT Interface for TOPAS
MIT License
23 stars 8 forks source link

potential additions #5

Open ferdymercury opened 4 years ago

ferdymercury commented 4 years ago
ferdymercury commented 4 years ago

For incoporating patient orientation, one could use things like eg:

https://nrc-cnrc.github.io/EGSnrc/doc/pirs898/introduction.html http://eigen.tuxfamily.org/index.php?title=Main_Page https://stackoverflow.com/questions/34670464/how-can-i-add-coordinate-system-reference-frame-information-to-my-data-to-avoi https://www.boost.org/doc/libs/1_80_0/libs/qvm/doc/html/index.html

instead of defining itself the 3D vectors and affine transform matrices

ferdymercury commented 4 years ago

As a suggestion, RTI could automatically set the spot sigma and SAD based on the tags Virtual Source-Axis Distance Scanning Spot Size / 2.35 and let the user override it in the beammodel file, if wanted. (This way, adding a new facility requires less work, as more info is taken from the RTplan automatically.)

Another idea from TOPAS forum ene 2023:

The spot properties in the description file characterizes the spot at the SID, not at the isocenter plane. If you want to reproduce same spot properties at isocenter with the spot starting from SID, you need to change the spot properties in the description file. You are right about the definition regarding spot info in dicom plan but it was bit out of scope to implement the automatic changes as a function of SID in this generic machine model when developing dicom-interface. But however, if you have a formula to define spot properties, e.g., energy spectrum and spot-properties, as a function of SID, I would recommend to write your own machine class and redefine “characterize_beamlet” method as follow:

    /// Characterize beamlet for MODULATED beam
    virtual
    rti::beamlet<T>
    characterize_beamlet(const rti::beam_module_ion::spot& s)
    {
        SID = rti::treatment_machine_ion<T>::source_to_isocenter_mm_); // this is SID
        spot_mean = your_function_spot_size(SID, s.e s.FHWM_x, s.FWHM_x);
        spot_std  = your_function_spot_divergence(SID, s.e, s.FHWM_x, s.FWHM_x));
        spot_std  = your_function_spot_correlation(SID, s.e, s.FHWM_x, s.FWHM_x));
        energy_spectrum = your_function_energy_spectrum(SID, s.e);
        auto fluence= new rti::phsp_6d<T>(spot_mean, spot_sigm, corr);
        return rti::beamlet<T>(energy, fluence);
    }
ferdymercury commented 4 years ago

SAD, Snout Position or BlockTrayDistance could be used to automatically set the Beam starting position, rather than the default 39cm.

jungwookshin commented 4 years ago

Those are good points. The main reason I keep SAD is to support RTIBTR (RT-Ion beam treatment record), which is log file because SAD doesn't exist in RTIBTR. There must be a way for example when it comes with Plan, we can use plan's SAD and when it comes with Log, we can use default. So it won't go away but can be flexibly used as you mentioned. Let's create TODO list.