OpenGATE / opengate

Gate 10 (beta)
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
46 stars 40 forks source link

Implement dynamic properties for actor with multiple outputs #304

Open nkrah opened 11 months ago

nkrah commented 11 months ago

Some actor store more than one file to disk. E.g., the dose actor stores the dose, but possibly also the dose uncertainty etc. The filename is created automatically based on the main output filename but appending terms, such as '_uncertainty'. It would be useful to implement these string manipulations as properties of the actor class so one can always refer to it later in the data analysis. E.g., one could do:

itk.imread(dose.output_uncertainty)

... without explicitly knowing how Gate concatenated the file name. That avoids hardcoding file names in analysis scripts.

So the development rule should be: every actor has a main output. Derived output paths are implement as @property and all IO operating are coded against this property.

I suggest implementing this as part of the actor refactoring.