You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pet.AcquisitionData.set_storage_scheme("file")
a = pet.AcquisitionData(fname1)
pet.AcquisitionData.set_storage_scheme("memory")
b = pet.AcquisitionData(fname2)
print(a.get_storage_scheme())
Despite the fact that a uses file as its storage scheme, the printed output will be memory. This is because the storage scheme is a static variable.
It seems to me that it would be safer to set the storage scheme for each AcquisitionData individually. It can default to file, since this is the current default. Could look like this:
a = pet.AcquisitionData(fname, scheme="file")
If we do not like this, then at the very least, we need to change get_storage_scheme so that it is no longer static and returns its own storage scheme. This could be done by dynamically casting to ProjDataInMemory, and returning the value of is_null_ptr.
The text was updated successfully, but these errors were encountered:
I don't think that's necessarily true. A forward projector will be set up with an AcquisitionData. And that AcquisitionData knows which storage scheme it uses.
If I do something along the lines of:
Despite the fact that
a
usesfile
as its storage scheme, the printed output will bememory
. This is because the storage scheme is a static variable.It seems to me that it would be safer to set the storage scheme for each
AcquisitionData
individually. It can default tofile
, since this is the current default. Could look like this:If we do not like this, then at the very least, we need to change
get_storage_scheme
so that it is no longer static and returns its own storage scheme. This could be done by dynamically casting toProjDataInMemory
, and returning the value ofis_null_ptr
.The text was updated successfully, but these errors were encountered: