FNNDSC / med2image

Converts medical images to more displayable formats, e.g. NIfTI to jpg.
MIT License
188 stars 56 forks source link

error trying to convert DICOM to JPG #10

Closed phrozendice closed 2 years ago

phrozendice commented 6 years ago

Hi There,

Thank you for putting this together, its greatly appreciated. I'm having an issue trying to convert a DICOM to JPG as follows:

med2image -i ~/Desktop/myfile.dcm -d ~/Desktop/ -o test.jpg /usr/local/lib/python3.6/site-packages/dicom/init.py:53: UserWarning: This code is using an older version of pydicom, which is no longer maintained as of Jan 2017. You can access the new pydicom features and API by installing pydicom from PyPI. See 'Transitioning to pydicom 1.x' section at pydicom.readthedocs.org for more information.

warnings.warn(msg)

:: FATAL ERROR :: For input DICOM file ~/Desktop/myfile.dcm could not broadcast input array from shape (3,1444,1444) into shape (3,1444)

Sorry, some error seems to have occurred in:
<med2image::error.fatal(self, 'dcmInsertionFail', '\nFor input DICOM file %s\n%s\n' % (img, str(e)))> called by <med2image::reslice=args.reslice>
While attempting insert DICOM into volume structure, 
a dimension mismatch occurred. This DICOM file is of different image size to the rest.

Returning to system with error code 20

I'm on Mac OSx, installed via 'pip3 install med2image' and running python 3.6.5

Thank you for your help in advance!

windwaterbo commented 5 years ago

the same error for me env: python 3.6.3

rudolphpienaar commented 2 years ago

Closing this since latest builds use latest pydicom.