Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing storage scheme of AcquisitionData #715

Open
rijobro opened this issue Jun 12, 2020 · 2 comments · May be fixed by #716
Open

Changing storage scheme of AcquisitionData #715

rijobro opened this issue Jun 12, 2020 · 2 comments · May be fixed by #716

Comments

@rijobro
Copy link
Contributor

rijobro commented Jun 12, 2020

If I do something along the lines of:

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.

@evgueni-ovtchinnikov
Copy link
Contributor

one would then have to specify somehow the storage scheme for forward projection, acquisitions processor and the results of most algebraic operations

@rijobro
Copy link
Contributor Author

rijobro commented Jun 12, 2020

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.

@rijobro rijobro linked a pull request Jun 12, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants