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

How to edit the OSEM.m to transform the sinogram I have to image directly ? #54

Open
Joker-Yision opened this issue Dec 18, 2024 · 11 comments

Comments

@Joker-Yision
Copy link

Because I am not familiar with matlab code, there are a lot of code I can't understand absolutely. Now , I have the ready-made sinogram,1501 × 471 from the PET simulation,in order to transform it to the reconstructed image by this OSEM algorithm. So,how can I do to reach it? edit the OSEM.m? How to do it? I have been trapped with it for a long time.
thank you!
best wishes!

@villekf
Copy link
Owner

villekf commented Dec 18, 2024

Have you looked at the examples? Basically you'll need two steps: define the scanner, sinogram and reconstruction parameters and input the measurement data (sinogram) into options.SinM.

A simple example is here: https://github.com/villekf/OMEGA/blob/master/main-files/PET_main_gateExampleSimple.m. For Python there is a similar example here: https://github.com/villekf/OMEGA/blob/master/source/Python/gate_PET_simpleExample.py

@Joker-Yision
Copy link
Author

Thank you for you answer!It is really be helpful to me. But now except for the parameters about the scanner and reconstruction, I just have the sinogram(from geant4 not GATE) processed by ourselves(so now the sinogram is .mat type not a .root), and I have looked at the exmple you informed. Whether my sinogram data can be identified and used or not? If so, I have to search for other ways to get my date of GATE root type.
Thanks again!

@villekf
Copy link
Owner

villekf commented Dec 19, 2024

Yes, you can input your sinogram from a mat-file. Simply input it into options.SinM variable and then make sure that all the scanner, sinogram and reconstruction properties match your simulated scanner.

@Joker-Yision
Copy link
Author

Thank you for your answer! Now, I have done the steps you informed above.(define the scanner in my program of matlab like the example, and reconstruction parameters, very simple because I just want to reconstructed a 2D image from a ring, and input my sinogram.mat in options.SinM)

But unfortunately, errors "projector_mex can't be identified" like the figure following, I don't understand this parameter and how to solve it.

thanks again!
屏幕截图 2024-12-19 203236

@villekf
Copy link
Owner

villekf commented Dec 19, 2024

Did you compile the mex-files (https://omega-doc.readthedocs.io/en/latest/installation.html)?

@Joker-Yision
Copy link
Author

Thank you!How about the errors following, it can't find the file('Cylindrical_bPET_cylpet_bPET_new_sinograms_combined_static_1501x471x1_span1.mat') and actually I do know what't that and the file must contain what information.

Thank you for you answer! I sincerely appreciate your taking the trouble to help me.
屏幕截图 2024-12-19 2

@villekf
Copy link
Owner

villekf commented Dec 19, 2024

Did you input your sinogram into options.SinM before running the reconstruction?

@Joker-Yision
Copy link
Author

Of course I do

@villekf
Copy link
Owner

villekf commented Dec 19, 2024

Then it disappears somewhere along the way.

You can try one or some of the following:
a) Debug the case manually to see at which points the sinogram still exists and where it disappears
b) Rename your sinogram variable into raw_SinM and save it as the mat-file shown in the error message
c) Send me the main-file and sinogram data for testing

@Joker-Yision
Copy link
Author

Thank you for your answer! I will try the first two, if both of them don‘t work out, I will send you the data.
Thank you again!

@Joker-Yision
Copy link
Author

Joker-Yision commented Dec 19, 2024 via email

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

No branches or pull requests

2 participants