Closed tbaudier closed 4 years ago
I imagine another condition here: https://github.com/OpenGATE/GateTools/blob/master/gatetools/image_arithm.py#L86
to check if the value is a scalar: (https://stackoverflow.com/a/19773559) (not hasattr(N, 'len')) and (not isinstance(N, str))
For the moment I did this: https://github.com/OpenGATE/GateTools/commit/b78986b3fbd83805a6775797143498d1e8227dfe
I do not know if we can do it differently
To do an operation between images and scalars without using the binary (eg: directly with Python) we need to create an image containing this scalar value.