Closed KrisThielemans closed 3 years ago
Actually, read_from_file
does not return:
def read_from_file(self, filename):
'''Read data from file.
Replaces the current content of the object.
'''
if self.handle is not None:
pyiutil.deleteDataHandle(self.handle)
self.handle = pystir.cSTIR_objectFromFile('Image', filename)
check_status(self.handle)
So, im=im.read_from_file("myfile.hv")
would result in im
being None
.
No idea why we have it.
Possibly might be useful if we would ever be able to discover which "engine" can read an image?
Let's remove it. (will have to be in CHANGES.md)
Please check if it's used anywhere (including SIRF-exercises) though.
There is hardly any harm in having read_from_file
, whereas removing it would unnecessarily hit those who use it already.
It seems that syntax is
(could work with any image constructed). To me, that's surprising. I would have expected
read_from_file
to be astatic
method.It's possible that we don't need this function at all, as it would be equivalent to
@evgueni-ovtchinnikov @rijobro Opinions?
Presumably it's the same for
AcquisitionData
orGadgetronImageData