Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2556 closed defect (nonchimerax)

DICOM reader: broken data stream when reading image file

Reported by: satyshur@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.1.1.el7.x86_64-x86_64-with-redhat-7.7-Maipo
ChimeraX Version: 0.91 (2019-09-30)
Description
Reading DICOM directory


Log:
Startup Messages  
---  
warning | 'clip' is a prefix of an existing command 'clipper'  
  
UCSF ChimeraX version: 0.91 (2019-09-30)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open /home/satyshur/superoxide-dismutase/SodCII_refine_21-coot-3_zanuda1.pdb

Summary of feedback from opening /home/satyshur/superoxide-
dismutase/SodCII_refine_21-coot-3_zanuda1.pdb  
---  
warning | Ignored bad PDB record found on line 1  
REMARK subgroup_number 1  
  
Chain information for SodCII_refine_21-coot-3_zanuda1.pdb #1  
---  
Chain | Description  
A B C D E F G H | No description available  
  

> style stick

Changed 8240 atom styles  

> style ball

Changed 8240 atom styles  

> view

> view cofr false

> lighting full

> lighting soft

> lighting simple

> style stick

Changed 8240 atom styles  

> style sphere

Changed 8240 atom styles  

> color byhetero

> color bychain

> color byhetero

> rainbow

> color bfactor

8240 atoms, 1144 residues, atom bfactor range 2.4 to 48.1  

> rainbow

> mlp

Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_A SES surface":
minimum -27.06, mean -6.296, maximum 19.96  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_B SES surface":
minimum -28.6, mean -6.484, maximum 22.4  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_C SES surface":
minimum -27.3, mean -6.31, maximum 19.34  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_D SES surface":
minimum -28.35, mean -6.47, maximum 21.23  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_E SES surface":
minimum -30.86, mean -6.3, maximum 19.5  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_F SES surface":
minimum -27.09, mean -6.42, maximum 21.37  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_G SES surface":
minimum -30.58, mean -6.366, maximum 19.85  
Map values for surface "SodCII_refine_21-coot-3_zanuda1.pdb_H SES surface":
minimum -27.33, mean -6.48, maximum 20.92  

> color bfactor

8240 atoms, 1144 residues, 8 surfaces, atom bfactor range 2.4 to 48.1  

> color bychain

> color byhetero

> color bynucleotide

> hbonds

743 hydrogen bonds found  

> interfaces ~solvent

8 buried areas: H G 757, E F 753, A B 713, C D 708, A H 480, C F 476, D E 471,
B G 464  
/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/networkx/drawing/nx_pylab.py:579: MatplotlibDeprecationWarning:  
The iterable function was deprecated in Matplotlib 3.1 and will be removed in
3.3. Use np.iterable instead.  
if not cb.iterable(width):  

> show surfaces

> hide surfaces

> show surfaces

> show cartoons

> hide cartoons

> show cartoons

> hide surfaces

> hide cartoons

> show cartoons

> show atoms

> hide cartoons

> lighting flat

> lighting shadows true intensity 0.5

> lighting full

> lighting soft

> lighting full

> lighting simple

> lighting soft

> lighting full

> open /home/satyshur/Downloads/dicom format dicom

Summary of feedback from opening /home/satyshur/Downloads/dicom  
---  
warnings | Missing PixelSpacing, using value 1,
/home/satyshur/Downloads/dicom/bmode.dcm  
Cannot determine z spacing, missing ImagePositionPatient, using value 1,
/home/satyshur/Downloads/dicom/bmode.dcm  
  
broken data stream when reading image file  
Traceback (most recent call last):  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/triggerset.py", line 130, in invoke  
return self._func(self._name, data)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/map/volume.py", line 3568, in _update_drawings  
v.update_drawings()  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/map/volume.py", line 715, in update_drawings  
self._keep_displayed_data = self.displayed_matrices()  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/map/volume.py", line 1628, in displayed_matrices  
matrices.append(self.matrix(read_matrix))  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/map/volume.py", line 1143, in matrix  
m = self.region_matrix(r, read_matrix)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/map/volume.py", line 1167, in region_matrix  
m = d.matrix(origin, size, step, progress, from_cache_only)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/map/data/griddata.py", line 249, in matrix  
m = self.read_matrix(ijk_origin, ijk_size, ijk_step, progress)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/dicom/dicom_grid.py", line 146, in dicom_read_matrix  
self.time, c, m, progress)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/dicom/dicom_format.py", line 522, in read_matrix  
a = self.read_frames(time, channel)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/dicom/dicom_format.py", line 567, in read_frames  
data = d.pixel_array  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/pydicom/dataset.py", line 1362, in pixel_array  
self.convert_pixel_data()  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/pydicom/dataset.py", line 1308, in convert_pixel_data  
raise last_exception  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/pydicom/dataset.py", line 1276, in convert_pixel_data  
arr = handler.get_pixeldata(self)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py", line 188, in
get_pixeldata  
UncompressedPixelData.extend(decompressed_image.tobytes())  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/PIL/Image.py", line
762, in tobytes  
self.load()  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/PIL/ImageFile.py",
line 272, in load  
raise_ioerror(err_code)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/PIL/ImageFile.py",
line 58, in raise_ioerror  
raise IOError(message + " when reading image file")  
OSError: broken data stream when reading image file  
  
Error processing trigger "graphics update":  
OSError: broken data stream when reading image file  
  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/PIL/ImageFile.py",
line 58, in raise_ioerror  
raise IOError(message + " when reading image file")  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 340.107
OpenGL renderer: Quadro FX 4800/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (5)

comment:1 by pett, 6 years ago

Component: UnassignedInput/Output
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionDICOM reader: broken data stream when reading image file

Reported by Ken Satyshur

comment:2 by Tom Goddard, 6 years ago

Resolution: nonchimerax
Status: assignedclosed

The error message "OSError: broken data stream when reading image file" means that ChimeraX was trying to read an image that was truncated. This is a problem with the data file.

I'm a bit puzzled why you are reading DICOM data (used for medical imaging) in together with PDB atomic models.

in reply to:  3 ; comment:3 by kenneth.satyshur@…, 6 years ago

Because it says I can. Why did you build this functionality if not expecting people to use it?
kas



Kenneth A. Satyshur, M.S., Ph.D.

Senior Scientist,

Depts. Bacteriology, Bio Molecular Chemistry,

Neuroscience, Oncology, Carbone Cancer Center,

and the School of Pharmacy

University of Wisconsin-Madison

Madison, Wisconsin, 53706

608-215-5207

________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: Friday, November 8, 2019 5:42 PM
Cc: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Kenneth Satyshur <kenneth.satyshur@wisc.edu>
Subject: Re: [ChimeraX] #2556: DICOM reader: broken data stream when reading image file

#2556: DICOM reader: broken data stream when reading image file
-----------------------------------+-------------------------
          Reporter:  satyshur@…    |      Owner:  Tom Goddard
              Type:  defect        |     Status:  closed
          Priority:  normal        |  Milestone:
         Component:  Input/Output  |    Version:
        Resolution:  nonchimerax   |   Keywords:
        Blocked By:                |   Blocking:
Notify when closed:                |   Platform:  all
           Project:  ChimeraX      |
-----------------------------------+-------------------------
Changes (by Tom Goddard):

 * status:  assigned => closed
 * resolution:   => nonchimerax


Comment:

 The error message "OSError: broken data stream when reading image file"
 means that ChimeraX was trying to read an image that was truncated.  This
 is a problem with the data file.

 I'm a bit puzzled why you are reading DICOM data (used for medical
 imaging) in together with PDB atomic models.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2556#comment:2>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:4 by Tom Goddard, 6 years ago

This is either caused by a corrupted DICOM file or by the Python Image Library being unable to read images images in an unusual format and giving a misleading error message. A new DICOM image library GDCM was added to ChimeraX a week ago and may be able to read the data if the error was in the Python Image LIbrary.

in reply to:  5 ; comment:5 by kenneth.satyshur@…, 6 years ago

Thanks. I want to talk to medical imaging about this. Our facility in the med school does mostly chemistry and drug design, but they may be able to use this.
kas



Kenneth A. Satyshur, M.S., Ph.D.

Senior Scientist,

Depts. Bacteriology, Bio Molecular Chemistry,

Neuroscience, Oncology, Carbone Cancer Center,

and the School of Pharmacy

University of Wisconsin-Madison

Madison, Wisconsin, 53706

608-215-5207

________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: Tuesday, December 3, 2019 8:01 PM
Cc: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Kenneth Satyshur <kenneth.satyshur@wisc.edu>
Subject: Re: [ChimeraX] #2556: DICOM reader: broken data stream when reading image file

#2556: DICOM reader: broken data stream when reading image file
-----------------------------------+-------------------------
          Reporter:  satyshur@…    |      Owner:  Tom Goddard
              Type:  defect        |     Status:  closed
          Priority:  normal        |  Milestone:
         Component:  Input/Output  |    Version:
        Resolution:  nonchimerax   |   Keywords:
        Blocked By:                |   Blocking:
Notify when closed:                |   Platform:  all
           Project:  ChimeraX      |
-----------------------------------+-------------------------

Comment (by Tom Goddard):

 This is either caused by a corrupted DICOM file or by the Python Image
 Library being unable to read images images in an unusual format and giving
 a misleading error message.  A new DICOM image library GDCM was added to
 ChimeraX a week ago and may be able to read the data if the error was in
 the Python Image LIbrary.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2556#comment:4>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker
Note: See TracTickets for help on using tickets.