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

Final Project - 3D fMRI viewer #46

Closed
G-S-Baz opened this issue Mar 17, 2024 · 7 comments
Closed

Final Project - 3D fMRI viewer #46

G-S-Baz opened this issue Mar 17, 2024 · 7 comments

Comments

@G-S-Baz
Copy link
Contributor

G-S-Baz commented Mar 17, 2024

https://github.com/G-S-Baz/3D-fMRI-viewer

@szabgab
Copy link
Owner

szabgab commented Mar 19, 2024

The requirements.txt should only contain the names of the packages, no need for the "For the code to run, the following python packages should be installed:" it is actually bad to have it there as python will think that is also something to install.

Add pip install -r requirements.txt to the readme

Also I got this error: Please install the scikit-image package (instead of skimage)

$ python STR_viewer_main.py 
Traceback (most recent call last):
  File "/home/gabor/work/3D-fMRI-viewer/Code/STR_viewer_main.py", line 3, in <module>
    from striatum_viewer_ui import STRviewerUI
  File "/home/gabor/work/3D-fMRI-viewer/Code/striatum_viewer_ui.py", line 5, in <module>
    import striatum_viewer_supporting_functions as sf
  File "/home/gabor/work/3D-fMRI-viewer/Code/striatum_viewer_supporting_functions.py", line 33
    % loading the 4D fMRI data
                  ^
SyntaxError: invalid decimal literal

That % on some of the lines is incorrect.

Please fix these and comment here when you pushed out the fixed code.

@szabgab
Copy link
Owner

szabgab commented Mar 19, 2024

Also there is no .gitigrnore file.

@G-S-Baz
Copy link
Contributor Author

G-S-Baz commented Mar 19, 2024

Hi,
I fixed (hopefully) those issues.
Thanks,
Guy

@szabgab
Copy link
Owner

szabgab commented Mar 25, 2024

Now I get this:

Traceback (most recent call last):
  File "/home/gabor/work/3D-fMRI-viewer/Code/STR_viewer_main.py", line 3, in <module>
    from striatum_viewer_ui import STRviewerUI
  File "/home/gabor/work/3D-fMRI-viewer/Code/striatum_viewer_ui.py", line 5, in <module>
    import striatum_viewer_supporting_functions as sf
  File "/home/gabor/work/3D-fMRI-viewer/Code/striatum_viewer_supporting_functions.py", line 4, in <module>
    from stl import mesh
ImportError: cannot import name 'mesh' from 'stl' (/home/gabor/work/3D-fMRI-viewer/venv/lib/python3.11/site-packages/stl/__init__.py)

Are you sure we need str and not numpy-stl ?

@szabgab
Copy link
Owner

szabgab commented Mar 25, 2024

After installing numpy-stl I could run the program (Fix it in requirements.txt !)

I selected the 3 files via the GUI and got this on the command line. This does not look good.

Selected Files:
STR R: /home/gabor/work/3D-fMRI-viewer/ExampleData/rwSTR_R_prob_mni_non_linear_young.nii
STR L: /home/gabor/work/3D-fMRI-viewer/ExampleData/rwSTR_L_prob_mni_non_linear_young.nii
fMRI: /home/gabor/work/3D-fMRI-viewer/ExampleData/swTmaps_1-10.nii
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  12 (X_ConfigureWindow)
  Resource id in failed request:  0x2
  Serial number of failed request:  7
  Current serial number in output stream:  8

@G-S-Baz
Copy link
Contributor Author

G-S-Baz commented Mar 26, 2024

Oh... that is bad.
I tried to look for it online...
Maybe it has something to do with linux?
see: pyvista/pyvistaqt#239.
There is a mention of "Wayland display server" in that link,
and also here: pyvista/pyvistaqt#445,
and here: https://gitlab.kitware.com/vtk/vtk/-/issues/18701.
I will try running the program on a mac computer I have to make sure it works,
Guy

@szabgab
Copy link
Owner

szabgab commented Apr 2, 2024

I recommend you add logging so we can see where does the crash happen. You can use either plain print statement or the logging module of Python. The latter is better.

There is no .gitignore file (there is one called .gitigrnore. That does not do much. I see it was my typo above. Sorry for that. Rename the file.

@szabgab szabgab closed this as completed Apr 2, 2024
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