spidersaint / dicompyler

Automatically exported from code.google.com/p/dicompyler
1 stars 0 forks source link

ValueError: total size of new array must be unchanged #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This new study with plan and dose is crashing on slices 4 and 39. In python, 
the error causes a GUI bug which stops the 2dview buttons from showing on the 
toolbar sporatically and causes weird behavior when loading new data. When a 
broken slice is being viewed in python the 2dview goes blank.

Traceback is as follows:

File "P:\python\dicompyler-bdist\dist\baseplugins\2dview.py", line 382, in 
OnPaint
File "dicompyler\dicomparser.pyo", line 175, in GetImage
File "dicom\dataset.pyo", line 398, in _get_pixel_array
File "dicom\dataset.pyo", line 393, in _getPixelArray
File "dicom\dataset.pyo", line 375, in _PixelDataNumpy
ValueError: total size of new array must be unchanged

Original issue reported on code.google.com by bastula on 2 Feb 2012 at 12:47

GoogleCodeExporter commented 9 years ago
This seems like a problem where the NumPy array from pydicom is not the correct 
size. Has it been modified by your plugin?

Please see the following website: 
http://dsnra.jpl.nasa.gov/software/Python/numpydoc/numpy-6.html for more 
information on setting the shape of the array. Maybe this is a bug in pydicom 
rather than dicompyler if this is raw DICOM data that has not been modified.

Original comment by bastula on 2 Feb 2012 at 12:53

GoogleCodeExporter commented 9 years ago
I am trying to recreate the error in a stable manner but it is quite strange. 
Im not sure if it was caused by a bad copy or if a related DICOM file in the 
directory was corrupting the set somehow. The plugin is not being used in this 
case.

Original comment by lstrd...@gmail.com on 2 Feb 2012 at 3:56