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

I do not know how to use this package in both Windows command line environment and Python 3 Jupyter Notebook environment. If you could explain how to use med2image? The description on https://pypi.org/project/med2image/#description is insufficient to explain how to use this package. Thanks. #19

Open
sivaskandha opened this issue May 19, 2019 · 9 comments

Comments

@sivaskandha
Copy link

I do not know how to use this package in both Windows command line environment and Python 3 Jupyter Notebook environment. If you could explain how to use med2image? The description on https://pypi.org/project/med2image/#description is insufficient to explain how to use this package. Thanks.

cmd_error

notebook_error

Originally posted by @mangozy in #8 (comment)

@xihuanliuliu
Copy link

can u slove the problem?

@javierrodenas
Copy link

Same problem!

@rudolphpienaar
Copy link
Member

Have you looked at the updated README? We also now provide a docker version in the pl-med2img repo.

But looking at your very initial report, I guess my first naive question to you is, "are you in the correct dir?" The Windows error message seems quite clear: "not recognized as an internal or external command..." suggests to me that the script is not on your path.

Alternatively, you might want to prefix the command with "python3..." , ie

python3 med2image ...

Having said all this, unfortunately we don't typically have or develop to Windows so it's hard to debug.

@rudolphpienaar
Copy link
Member

Also, from an python import you don't run the command as though it were a command line. Your jupyter notebook command makes no sense. If you import the module you should call it from its python API. Does this make sense?

@miguel961804
Copy link

Someone found how to run on windows, the script is supposed to run but it does not generate any image, I would appreciate the support

@rudolphpienaar
Copy link
Member

@miguel961804 -- can you provide a better help/issue request? Saying it didn't work, other than conveying that something went wrong, doesn't help us. At the very least, please provide the exact CLI you used and also what led you to conclude that it didn't work. Or did you do this in a jupyter notebook? Whatever it is that you did, you have to give us enough info to replicate.

Does that make sense?

@dimasquest
Copy link

dimasquest commented Feb 8, 2021

works in jupyter if you add ! before running the command
working example below:
! med2image -i hippocampus_img.nii -d out_hippl

@shun2311
Copy link

python E:\Anaconda\Lib\site-packages\med2image\med2image.py -i SMIR.Brain.XX.O.CT.339336.nii -d out
I tried running with the command above and it did not show any error, however no image is generated

@sparklerl
Copy link

run med2image on windows like this
1712053378668

need change the "nimg.get_data()" to "nimg.get_fdata()" ,the nibabel new version change the function name?

good luck!

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

8 participants