villekf / OMEGA

Open-source multi-dimensional tomographic reconstruction software (OMEGA)
https://omega-doc.readthedocs.io/en/latest/index.html
GNU General Public License v3.0
70 stars 16 forks source link

gate_main.m issue #24

Closed June-phy closed 3 years ago

June-phy commented 3 years ago

Hi, When I run gate_main.m on Mac, the error pop up as below:

Error using save
Cannot create 'Cylindrical_PET_example_lor_pixel_count_128x128x63_sino_200x168x703.mat'
because '/Users/shanqianxue/Library/Application Support/MathWorks/MATLAB
Add-Ons/Toolboxes/OMEGA - Open-mat-files/ MATLAB emission tomography
software/mat-files' does not exist.

Error in lor_pixel_count_prepass (line 455)
                    save(file_string,'lor','-v7.3')

Error in precompute_data (line 46)
    lor_pixel_count_prepass(options);

Error in gate_main (line 1639)
   precompute_data(options);

Because there is a space before the file name MATLAB emission tomography software. But I didn't find the way to correct it in inlor_pixel_count_prepass.m. How can I change the save path?

villekf commented 3 years ago

This is indeed a bug when using the toolbox-version. For a quick workaround, simply replace line 100 in lor_pixel_count_prepass.m with folder = [folder(1:end-6), 'mat-files/'];

This bug is not limited to only this file, but others as well (same fix works there). These will be fixed in the next release.

villekf commented 3 years ago

The current master branch now contains the same fix as outlined above.