golosio / xrmc

17 stars 10 forks source link

Question: using only C++ code without scripting. #41

Closed MichaelColonel closed 4 years ago

MichaelColonel commented 5 years ago

Dear developers,

I would like to use XRMC for simulation of x-ray contrast markers position on a flat-screen detector as a part of a process of patient position evaluation before ion beam therapy (carbon ions beam to be more specific). Is it possible to use pure C++ code for simulation process without any script files? My program will show a simulated XRMC image and a DICOM image from a real detector for further evaluation.

Best regards, Mikhail Polkovnikov

Researcher at the Institute for High Energy Physics (IHEP), Department of Experimental Physics.

tschoonj commented 5 years ago

Hi Michael,

That is currently not easily achievable as the device class constructors expect to be fed a filename...

At the very least, you would need to force the implicit default constructor in the device classes, and then assign proper values to the member variables (which are public everywhere I think).

If you're willing to put in this work, it should be possible though...

blockspacer commented 5 years ago

cling based C++ as scripting language / hot code reload Why? Able to run C++ script in runtime or compile it for max speed ( as in example https://github.com/derofim/cling-cmake ) Also: May be used to improve modules compile time

HOT code reload possible approaches:

store app state fix cling undo for files https://root-forum.cern.ch/t/loading-unloading-class-as-interpreted-macro-in-cling-multiple-times/32976/2

execute cling code to change callbacks & variables nested cling::Interpreter with multiple cling::MetaProcessor IDK how to do it, but you can create child cling::Interpreter