FNNDSC / med2image

Converts medical images to more displayable formats, e.g. NIfTI to jpg.
MIT License
185 stars 56 forks source 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. #19

Open sivaskandha opened 5 years ago

sivaskandha commented 5 years ago

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 https://github.com/FNNDSC/med2image/issues/8#issuecomment-425184853

xihuanliuliu commented 5 years ago

can u slove the problem?

javierrodenas commented 4 years ago

Same problem!

rudolphpienaar commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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

shun2311 commented 3 years ago

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 commented 3 months ago

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!