-
Notifications
You must be signed in to change notification settings - Fork 50
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
mritopng command line won't convert #17
Comments
@phrozendice Would you be able to provide the file that causes this error? |
@danishm thank you for your prompt response, unfortunately I can’t provide the source file as it contains personal identifiable information. If there is anything else I can do to help you reproduce please let me know. |
@phrozendice That makes total sense! Yes, patient privacy is important. I've been developing on a cases by case basis using publicly available samples mostly. I have a few in this folder for testing in the project. Here is how you can help Possible ways to help
|
@phrozendice Any news on this issue ? |
@danishm Here is what I have when i print the image_2d_scaled variable: `mritopng IVA0\ (1) output.png [[ 0. 0. 0. ] [[ 0. 0. 0. ] ... [[ 0. 0. 0. ] [[ 0. 0. 0. ] [[ 0. 0. 0. ] During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Hi There,
Tried to convert a .dcm file to png, using the command line on Mac OS X with Python 2.7.12 here is the output:
mritopng ~/file1.dcm ~/file1.png
Traceback (most recent call last):
File "/usr/local/bin/mritopng", line 11, in
load_entry_point('mritopng==2.1', 'console_scripts', 'mritopng')()
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mritopng-2.1-py2.7.egg/mritopng/main.py", line 19, in main
convert_file(args.dicom_path, args.png_path)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mritopng-2.1-py2.7.egg/mritopng/init.py", line 50, in convert_file
mri_to_png(mri_file, png_file)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mritopng-2.1-py2.7.egg/mritopng/init.py", line 28, in mri_to_png
w.write(png_file, image_2d_scaled)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/png.py", line 655, in write
nrows = self.write_passes(outfile, rows)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/png.py", line 804, in write_passes
extend(row)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/png.py", line 801, in
return lambda sl: f(map(int, sl))
TypeError: only size-1 arrays can be converted to Python scalars
Any ideas?
The text was updated successfully, but these errors were encountered: