﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1745	Error opening DICOM with lossless JPEG image encoding	goddard@…	Zach Pearson	"{{{
The following bug report has been submitted:
Platform:        Darwin-17.7.0-x86_64-i386-64bit
ChimeraX Version: 0.9 (2019-02-19)
Description
Opening the attached DICOM file with lossless JPEG image encoding gives this error.

Log:
UCSF ChimeraX version: 0.9 (2019-02-19)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open
/Users/goddard/ucsf/data/dicom/02ef8f31ea86a45cfce6eb297c274598/series-000001/image-000001.dcm

Traceback (most recent call last):  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py"", line 197, in
get_pixeldata  
decompressed_image = Image.open(fio)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/PIL/Image.py"", line 2687, in open  
% (filename if filename else fp))  
OSError: cannot identify image file <_io.BytesIO object at 0x13d5254c0>  
  
During handling of the above exception, another exception occurred:  
  
Traceback (most recent call last):  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/cmd_line/tool.py"", line 252, in execute  
cmd.run(cmd_text)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/cli.py"", line 2617, in run  
result = ci.function(session, **kw_args)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/open.py"", line 41, in open  
from_database=from_database, ignore_cache=ignore_cache, **kw))  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/open.py"", line 117, in open  
models = handle_unknown_kw(session.models.open, paths, format=format,
name=name, **kw)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/commands/open.py"", line 62, in handle_unknown_kw  
return f(*args, **kw)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py"", line 598, in open  
session, filenames, format=format, name=name, **kw)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/io.py"", line 463, in open_multiple_data  
models, status = open_func(session, paths, mname, **kw)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom.py"", line 39, in open_dicom  
models, msg = dicom_volumes(session, image_series, **kw)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom.py"", line 117, in dicom_volumes  
gmodels, gmsg = open_grids(session, grid_group, gname, **kw)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 3222, in open_grids  
v.initialize_thresholds()  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 518, in initialize_thresholds  
s = self.matrix_value_statistics()  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1613, in matrix_value_statistics  
matrices = self.displayed_matrices(read_matrix)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1648, in displayed_matrices  
matrices.append(self.matrix(read_matrix))  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1163, in matrix  
m = self.region_matrix(r, read_matrix)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1187, in region_matrix  
m = d.matrix(origin, size, step, progress, from_cache_only)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/data/griddata.py"", line 249, in matrix  
m = self._read_full_planes(ijk_origin, ijk_size, ijk_step, progress)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/data/griddata.py"", line 274, in _read_full_planes  
fm = self.read_matrix(f_ijk_origin, f_ijk_size, f_ijk_step, progress)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom_grid.py"", line 117, in read_matrix  
self.time, c, m, progress)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom_format.py"", line 523, in read_matrix  
p = self.read_plane(k, time, channel)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom_format.py"", line 541, in read_plane  
data = d.pixel_array  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/dataset.py"", line 929, in pixel_array  
self.convert_pixel_data()  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/dataset.py"", line 875, in convert_pixel_data  
raise last_exception  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/dataset.py"", line 843, in convert_pixel_data  
arr = handler.get_pixeldata(self)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py"", line 199, in
get_pixeldata  
raise NotImplementedError(e.strerror)  
NotImplementedError: None  
  
NotImplementedError: None  
  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py"", line 199, in
get_pixeldata  
raise NotImplementedError(e.strerror)  
  
See log for complete Python traceback.  
  
Traceback (most recent call last):  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py"", line 197, in
get_pixeldata  
decompressed_image = Image.open(fio)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/PIL/Image.py"", line 2687, in open  
% (filename if filename else fp))  
OSError: cannot identify image file <_io.BytesIO object at 0x13d5c0990>  
  
During handling of the above exception, another exception occurred:  
  
Traceback (most recent call last):  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/triggerset.py"", line 130, in invoke  
return self._func(self._name, data)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 3470, in _update_drawings  
v.initialize_thresholds()  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 518, in initialize_thresholds  
s = self.matrix_value_statistics()  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1613, in matrix_value_statistics  
matrices = self.displayed_matrices(read_matrix)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1648, in displayed_matrices  
matrices.append(self.matrix(read_matrix))  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1163, in matrix  
m = self.region_matrix(r, read_matrix)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/volume.py"", line 1187, in region_matrix  
m = d.matrix(origin, size, step, progress, from_cache_only)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/data/griddata.py"", line 249, in matrix  
m = self._read_full_planes(ijk_origin, ijk_size, ijk_step, progress)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/data/griddata.py"", line 274, in _read_full_planes  
fm = self.read_matrix(f_ijk_origin, f_ijk_size, f_ijk_step, progress)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom_grid.py"", line 117, in read_matrix  
self.time, c, m, progress)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom_format.py"", line 523, in read_matrix  
p = self.read_plane(k, time, channel)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/dicom/dicom_format.py"", line 541, in read_plane  
data = d.pixel_array  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/dataset.py"", line 929, in pixel_array  
self.convert_pixel_data()  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/dataset.py"", line 875, in convert_pixel_data  
raise last_exception  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/dataset.py"", line 843, in convert_pixel_data  
arr = handler.get_pixeldata(self)  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py"", line 199, in
get_pixeldata  
raise NotImplementedError(e.strerror)  
NotImplementedError: None  
  
Error processing trigger ""graphics update"": None:  
NotImplementedError: None  
  
File
""/Users/goddard/Desktop/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/pydicom/pixel_data_handlers/pillow_handler.py"", line 199, in
get_pixeldata  
raise NotImplementedError(e.strerror)  
  
See log for complete Python traceback.  
  




OpenGL version: 4.1 NVIDIA-10.32.0 355.11.10.10.40.102
OpenGL renderer: NVIDIA GeForce GTX 680MX OpenGL Engine
OpenGL vendor: NVIDIA Corporation
File attachment: image-000001.dcm

}}}

[attachment:""image-000001.dcm""]
"	enhancement	closed	normal		DICOM		wontfix		Eric Pettersen Greg Couch				all	ChimeraX
