Opened 3 years ago

Closed 3 years ago

#8627 closed defect (fixed)

Graphics crash when DICOM has unexpected size relative to other images in same dataset

Reported by: Zach Pearson Owned by: Zach Pearson
Priority: normal Milestone: 1.7
Component: DICOM Version:
Keywords: Cc: Greg Couch, Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        macOS-13.2-arm64-arm-64bit
ChimeraX Version: 1.6.dev202303032252 (2023-03-03 22:52:18 UTC)
Description
The attached TCIA dataset causes ChimeraX graphics to crash, both when trying to display the DICOM as a surface and when moving the volume viewer plane slider to the last position, presumably because the last image in the dataset is so much bigger than the others. 

Log:
UCSF ChimeraX version: 1.6.dev202303032252 (2023-03-03)  
© 2016-2023 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 127.0.0.1

Failed opening file 127.0.0.1:  
Unrecognized file suffix '.1'  

> open 1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192 format
> dicom fromDatabase tcia

Summary of feedback from opening
1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192 fetched from
tcia  
---  
notes | Downloading 1 Series Instance UIDs (scans).  
Series 1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192
already downloaded.  
Downloaded 0 out of 1 Series Instance UIDs (scans).  
0 failed to download.  
1 previously downloaded.  

> open
> /Users/zjp/Downloads/ChimeraX/tciaDownload/1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192
> format dicom

  
  
  
  
| Summary of feedback from opening
/Users/zjp/Downloads/ChimeraX/tciaDownload/1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192  
  
---  
  
  
  
  
warning | Plane z spacings are unequal, min = -68.8271, max = 353.413, using
max.  
Perpendicular axis (-1.000, 0.000, 0.000)  
Directory
/Users/zjp/Downloads/ChimeraX/tciaDownload/1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192  
1-01.dcm (-2.05712210063, -541.70186990527, -790.38228)  
1-02.dcm (-70.545535380961, -534.77644036605, -790.38228)  
1-03.dcm (-136.26115057047, -514.28053228115, -790.38228)  
1-04.dcm (-196.54342811791, -481.04393586013, -790.38228)  
1-05.dcm (-248.95180069096, -436.41225639134, -790.38228)  
1-06.dcm (-291.36448113683, -382.19243653405, -790.38228)  
1-07.dcm (-322.06436441929, -320.57960106608, -790.38228)  
1-08.dcm (-339.80854573624, -254.06818582515, -790.38228)  
1-09.dcm (-343.87864033145, -185.35094884675, -790.38228)  
1-10.dcm (-334.10986777008, -117.20995229838, -790.38228)  
1-11.dcm (-310.89772318202, -52.403928877846, -790.38228)  
1-12.dcm (-275.18196538363, 6.443407279765, -790.38228)  
1-13.dcm (-228.40857012894, 56.949583380402, -790.38228)  
1-14.dcm (-172.47118883797, 97.069823936372, -790.38228)  
1-15.dcm (-109.63448288366, 125.17983483589, -790.38228)  
1-16.dcm (-42.442437298767, 140.14156394981, -790.38228)  
1-17.dcm (26.384634117721, 141.34927591451, -790.38228)  
1-18.dcm (94.060222479419, 128.75407572324, -790.38228)  
1-19.dcm (157.84443744259, 102.86588827235, -790.38228)  
1-20.dcm (215.15493345411, 64.73281371924, -790.38228)  
1-21.dcm (263.67145769584, 15.89869446372, -790.38228)  
1-22.dcm (301.42978703355, -41.659388318677, -790.38228)  
1-23.dcm (326.90125087194, -105.61115809786, -790.38228)  
1-24.dcm (339.05462038094, -173.36748575467, -790.38228)  
1-25.dcm (337.39785846758, -242.18521216236, -790.38228)  
1-26.dcm (321.99804021874, -309.27820677329, -790.38228)  
1-27.dcm (293.47863732246, -371.9301659318, -790.38228)  
1-28.dcm (252.99427640994, -427.60458419966, -790.38228)  
1-29.dcm (202.18399324314, -474.04744643348, -790.38228)  
1-30.dcm (143.10487528271, -509.37848305822, -790.38228)  
1-31.dcm (78.148779160198, -532.16729400752, -790.38228)  
1-32.dcm (9.9454948019418, -541.49125940358, -790.38228)  
1-33.dcm (-343.46798730724, -557.95953015321, -838.0)  
  
  
note | Opened 604 PT (PROJECTIONS) as #1.1.1, grid size 168,168,33, pixel
4.07,4.07,1, shown at step 1, values float32  
  
  
  
  
  
Traceback (most recent call last):  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/core/triggerset.py", line 138, in invoke  
return self._func(self._name, data)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/volume.py", line 4020, in _update_drawings  
v.update_drawings()  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/volume.py", line 799, in update_drawings  
self._keep_displayed_data = self.displayed_matrices()  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/volume.py", line 1745, in displayed_matrices  
matrices.append(self.matrix(read_matrix))  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/volume.py", line 1230, in matrix  
m = self.region_matrix(r, read_matrix)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/volume.py", line 1254, in region_matrix  
m = d.matrix(origin, size, step, progress, from_cache_only)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 306, in matrix  
m = self.read_matrix(ijk_origin, ijk_size, ijk_step, progress)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 339, in read_matrix  
m = self._read_full_planes(ijk_origin, ijk_size, ijk_step, progress)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 369, in _read_full_planes  
m = m2d.reshape((1,ys,xs))  
ValueError: cannot reshape array of size 234256 into shape (1,168,168)  
  
Error processing trigger "graphics update":  
ValueError: cannot reshape array of size 234256 into shape (1,168,168)  
  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 369, in _read_full_planes  
m = m2d.reshape((1,ys,xs))  
  
See log for complete Python traceback.  
  
An error occurred in drawing the scene. Redrawing graphics is now stopped to
avoid a continuous stream of error messages. To restart graphics use the
command "graphics restart" after changing the settings that caused the error.  
  
cannot reshape array of size 234256 into shape (1,168,168)  
  
Traceback (most recent call last):  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/core/updateloop.py", line 73, in draw_new_frame  
view.draw(check_for_changes = False)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/graphics/view.py", line 177, in draw  
self._draw_scene(camera, drawings)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/graphics/view.py", line 254, in _draw_scene  
draw_transparent(r, transparent_drawings)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/graphics/drawing.py", line 1544, in draw_transparent  
r.draw_transparent(  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/graphics/opengl.py", line 1252, in draw_transparent  
draw()  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/graphics/drawing.py", line 1546, in <lambda>  
lambda: _draw_multiple(drawings, r, Drawing.TRANSPARENT_DRAW_PASS))  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/graphics/drawing.py", line 1552, in _draw_multiple  
d.draw(renderer, draw_pass)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 786, in draw  
pd.update_region()  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 988, in update_region  
self._update_textures(planes)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 1056, in _update_textures  
textures = [self._plane_texture(k, axis) for k,axis in planes]  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 1056, in <listcomp>  
textures = [self._plane_texture(k, axis) for k,axis in planes]  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 1063, in _plane_texture  
self._fill_plane_texture(k, axis, t)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 1082, in _fill_plane_texture  
data = ir._color_plane(plane, axis)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 234, in _color_plane  
m = self._matrix_plane(plane, axis)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map/image3d.py", line 209, in _matrix_plane  
m = self._data.matrix(ijk_origin, ijk_size, ijk_step)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 306, in matrix  
m = self.read_matrix(ijk_origin, ijk_size, ijk_step, progress)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 339, in read_matrix  
m = self._read_full_planes(ijk_origin, ijk_size, ijk_step, progress)  
File
"/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-
packages/chimerax/map_data/griddata.py", line 369, in _read_full_planes  
m = m2d.reshape((1,ys,xs))  
ValueError: cannot reshape array of size 234256 into shape (1,168,168)  
  




OpenGL version: 4.1 Metal - 83
OpenGL renderer: Apple M1 Pro
OpenGL vendor: Apple

Python: 3.9.11
Locale: en_US.UTF-8
Qt version: PyQt6 6.4.2, Qt 6.4.2
Qt runtime version: 6.4.2
Qt platform: cocoa
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,1
      Model Number: MK193LL/A
      Chip: Apple M1 Pro
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 16 GB
      System Firmware Version: 8419.80.7
      OS Loader Version: 8419.80.7

Software:

    System Software Overview:

      System Version: macOS 13.2 (22D49)
      Kernel Version: Darwin 22.3.0
      Time since boot: 43 days, 20 hours

Graphics/Displays:

    Apple M1 Pro:

      Chipset Model: Apple M1 Pro
      Type: GPU
      Bus: Built-In
      Total Number of Cores: 16
      Vendor: Apple (0x106b)
      Metal Support: Metal 3
      Displays:
        Color LCD:
          Display Type: Built-in Liquid Retina XDR Display
          Resolution: 3456 x 2234 Retina
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Automatically Adjust Brightness: Yes
          Connection Type: Internal
        PHL 279P1:
          Resolution: 6016 x 3384
          UI Looks like: 3008 x 1692 @ 60.00Hz
          Mirror: Off
          Online: Yes
          Rotation: Supported


Installed Packages:
    alabaster: 0.7.13
    appdirs: 1.4.4
    appnope: 0.1.3
    asttokens: 2.2.1
    Babel: 2.12.1
    backcall: 0.2.0
    beautifulsoup4: 4.11.2
    blockdiag: 3.0.0
    build: 0.10.0
    certifi: 2021.10.8
    cftime: 1.6.2
    charset-normalizer: 3.0.1
    ChimeraX-AddCharge: 1.5.9
    ChimeraX-AddH: 2.2.3
    ChimeraX-AlignmentAlgorithms: 2.0.1
    ChimeraX-AlignmentHdrs: 3.3.1
    ChimeraX-AlignmentMatrices: 2.1
    ChimeraX-Alignments: 2.9.2
    ChimeraX-AlphaFold: 1.0
    ChimeraX-AltlocExplorer: 1.0.3
    ChimeraX-AmberInfo: 1.0
    ChimeraX-Arrays: 1.1
    ChimeraX-Atomic: 1.43.8
    ChimeraX-AtomicLibrary: 10.0.5
    ChimeraX-AtomSearch: 2.0.1
    ChimeraX-AxesPlanes: 2.3.2
    ChimeraX-BasicActions: 1.1.2
    ChimeraX-BILD: 1.0
    ChimeraX-BlastProtein: 2.1.2
    ChimeraX-BondRot: 2.0.1
    ChimeraX-BugReporter: 1.0.1
    ChimeraX-BuildStructure: 2.8
    ChimeraX-Bumps: 1.0
    ChimeraX-BundleBuilder: 1.2.1
    ChimeraX-ButtonPanel: 1.0.1
    ChimeraX-CageBuilder: 1.0.1
    ChimeraX-CellPack: 1.0
    ChimeraX-Centroids: 1.3.2
    ChimeraX-ChangeChains: 1.0.2
    ChimeraX-CheckWaters: 1.3.1
    ChimeraX-ChemGroup: 2.0.1
    ChimeraX-Clashes: 2.2.4
    ChimeraX-ColorActions: 1.0.3
    ChimeraX-ColorGlobe: 1.0
    ChimeraX-ColorKey: 1.5.3
    ChimeraX-CommandLine: 1.2.5
    ChimeraX-ConnectStructure: 2.0.1
    ChimeraX-Contacts: 1.0.1
    ChimeraX-Core: 1.6.dev202303032252
    ChimeraX-CoreFormats: 1.1
    ChimeraX-coulombic: 1.4.2
    ChimeraX-Crosslinks: 1.0
    ChimeraX-Crystal: 1.0
    ChimeraX-CrystalContacts: 1.0.1
    ChimeraX-DataFormats: 1.2.3
    ChimeraX-Dicom: 1.2
    ChimeraX-DistMonitor: 1.3.3
    ChimeraX-DockPrep: 1.1.1
    ChimeraX-Dssp: 2.0
    ChimeraX-EMDB-SFF: 1.0
    ChimeraX-ESMFold: 1.0
    ChimeraX-ExperimentalCommands: 1.0
    ChimeraX-FileHistory: 1.0.1
    ChimeraX-FunctionKey: 1.0.1
    ChimeraX-Geometry: 1.3
    ChimeraX-gltf: 1.0
    ChimeraX-Graphics: 1.1.1
    ChimeraX-Hbonds: 2.4
    ChimeraX-Help: 1.2.1
    ChimeraX-HKCage: 1.3
    ChimeraX-IHM: 1.1
    ChimeraX-ImageFormats: 1.2
    ChimeraX-IMOD: 1.0
    ChimeraX-IO: 1.0.1
    ChimeraX-ItemsInspection: 1.0.1
    ChimeraX-Label: 1.1.7
    ChimeraX-ListInfo: 1.1.1
    ChimeraX-Log: 1.1.5
    ChimeraX-LookingGlass: 1.1
    ChimeraX-Maestro: 1.8.2
    ChimeraX-Map: 1.1.4
    ChimeraX-MapData: 2.0
    ChimeraX-MapEraser: 1.0.1
    ChimeraX-MapFilter: 2.0.1
    ChimeraX-MapFit: 2.0
    ChimeraX-MapSeries: 2.1.1
    ChimeraX-Markers: 1.0.1
    ChimeraX-Mask: 1.0.2
    ChimeraX-MatchMaker: 2.0.11
    ChimeraX-MDcrds: 2.6
    ChimeraX-MedicalToolbar: 1.0.2
    ChimeraX-Meeting: 1.0.1
    ChimeraX-MLP: 1.1.1
    ChimeraX-mmCIF: 2.12
    ChimeraX-MMTF: 2.2
    ChimeraX-Modeller: 1.5.8
    ChimeraX-ModelPanel: 1.3.6
    ChimeraX-ModelSeries: 1.0.1
    ChimeraX-Mol2: 2.0
    ChimeraX-Mole: 1.0
    ChimeraX-Morph: 1.0.2
    ChimeraX-MouseModes: 1.2
    ChimeraX-Movie: 1.0
    ChimeraX-Neuron: 1.0
    ChimeraX-Nifti: 1.0
    ChimeraX-NRRD: 1.0
    ChimeraX-Nucleotides: 2.0.3
    ChimeraX-OpenCommand: 1.10.1
    ChimeraX-PDB: 2.7
    ChimeraX-PDBBio: 1.0
    ChimeraX-PDBLibrary: 1.0.2
    ChimeraX-PDBMatrices: 1.0
    ChimeraX-PickBlobs: 1.0.1
    ChimeraX-Positions: 1.0
    ChimeraX-PresetMgr: 1.1
    ChimeraX-PubChem: 2.1
    ChimeraX-ReadPbonds: 1.0.1
    ChimeraX-Registration: 1.1.1
    ChimeraX-RemoteControl: 1.0
    ChimeraX-RenderByAttr: 1.0
    ChimeraX-RenumberResidues: 1.1
    ChimeraX-ResidueFit: 1.0.1
    ChimeraX-RestServer: 1.1
    ChimeraX-RNALayout: 1.0
    ChimeraX-RotamerLibMgr: 3.0
    ChimeraX-RotamerLibsDunbrack: 2.0
    ChimeraX-RotamerLibsDynameomics: 2.0
    ChimeraX-RotamerLibsRichardson: 2.0
    ChimeraX-SaveCommand: 1.5.1
    ChimeraX-SchemeMgr: 1.0
    ChimeraX-SDF: 2.0.1
    ChimeraX-Segger: 1.0
    ChimeraX-Segment: 1.0.1
    ChimeraX-SelInspector: 1.0
    ChimeraX-SeqView: 2.8.3
    ChimeraX-Shape: 1.0.1
    ChimeraX-Shell: 1.0.1
    ChimeraX-Shortcuts: 1.1.1
    ChimeraX-ShowSequences: 1.0.1
    ChimeraX-SideView: 1.0.1
    ChimeraX-Smiles: 2.1
    ChimeraX-SmoothLines: 1.0
    ChimeraX-SpaceNavigator: 1.0
    ChimeraX-StdCommands: 1.10.1
    ChimeraX-STL: 1.0.1
    ChimeraX-Storm: 1.0
    ChimeraX-StructMeasure: 1.1.1
    ChimeraX-Struts: 1.0.1
    ChimeraX-Surface: 1.0.1
    ChimeraX-SwapAA: 2.0.1
    ChimeraX-SwapRes: 2.2.1
    ChimeraX-TapeMeasure: 1.0
    ChimeraX-Test: 1.0
    ChimeraX-Toolbar: 1.1.2
    ChimeraX-ToolshedUtils: 1.2.1
    ChimeraX-Topography: 1.0
    ChimeraX-Tug: 1.0.1
    ChimeraX-UI: 1.27.3
    ChimeraX-uniprot: 2.2.2
    ChimeraX-UnitCell: 1.0.1
    ChimeraX-ViewDockX: 1.2
    ChimeraX-VIPERdb: 1.0
    ChimeraX-Vive: 1.1
    ChimeraX-VolumeMenu: 1.0.1
    ChimeraX-VTK: 1.0
    ChimeraX-WavefrontOBJ: 1.0
    ChimeraX-WebCam: 1.0.2
    ChimeraX-WebServices: 1.1.1
    ChimeraX-Zone: 1.0.1
    colorama: 0.4.6
    comm: 0.1.2
    contourpy: 1.0.7
    cxservices: 1.2.2
    cycler: 0.11.0
    Cython: 0.29.33
    debugpy: 1.6.6
    decorator: 5.1.1
    docutils: 0.19
    executing: 1.2.0
    filelock: 3.9.0
    fonttools: 4.38.0
    funcparserlib: 1.0.1
    grako: 3.16.5
    h5py: 3.8.0
    html2text: 2020.1.16
    idna: 3.4
    ihm: 0.35
    imagecodecs: 2022.2.22
    imagesize: 1.4.1
    importlib-metadata: 6.0.0
    ipykernel: 6.21.1
    ipython: 8.10.0
    ipython-genutils: 0.2.0
    ipywidgets: 8.0.4
    jedi: 0.18.2
    Jinja2: 3.1.2
    jupyter-client: 8.0.2
    jupyter-core: 5.2.0
    jupyterlab-widgets: 3.0.5
    kiwisolver: 1.4.4
    line-profiler: 4.0.2
    lxml: 4.9.2
    lz4: 4.3.2
    MarkupSafe: 2.1.2
    matplotlib: 3.6.3
    matplotlib-inline: 0.1.6
    msgpack: 1.0.4
    nest-asyncio: 1.5.6
    netCDF4: 1.6.2
    networkx: 2.8.8
    nibabel: 5.0.1
    nptyping: 2.5.0
    numexpr: 2.8.4
    numpy: 1.23.5
    openvr: 1.23.701
    packaging: 21.3
    pandas: 1.5.3
    ParmEd: 3.4.3
    parso: 0.8.3
    pep517: 0.13.0
    pexpect: 4.8.0
    pickleshare: 0.7.5
    Pillow: 9.3.0
    pip: 23.0
    pkginfo: 1.9.6
    platformdirs: 3.0.0
    prompt-toolkit: 3.0.38
    psutil: 5.9.4
    ptyprocess: 0.7.0
    pure-eval: 0.2.2
    pycollada: 0.7.2
    pydicom: 2.3.0
    Pygments: 2.14.0
    pynrrd: 1.0.0
    PyOpenGL: 3.1.5
    PyOpenGL-accelerate: 3.1.5
    pyparsing: 3.0.9
    pyproject-hooks: 1.0.0
    PyQt6: 6.4.2
    PyQt6-Qt6: 6.4.2
    PyQt6-sip: 13.4.1
    PyQt6-WebEngine: 6.4.0
    PyQt6-WebEngine-Qt6: 6.4.2
    python-dateutil: 2.8.2
    python-gdcm: 3.0.21
    pytz: 2022.7.1
    pyzmq: 25.0.0
    qtconsole: 5.4.0
    QtPy: 2.3.0
    RandomWords: 0.4.0
    requests: 2.28.2
    scipy: 1.9.3
    setuptools: 67.4.0
    setuptools-scm: 7.0.5
    sfftk-rw: 0.7.3
    six: 1.16.0
    snowballstemmer: 2.2.0
    sortedcontainers: 2.4.0
    soupsieve: 2.4
    sphinx: 6.1.3
    sphinx-autodoc-typehints: 1.22
    sphinxcontrib-applehelp: 1.0.4
    sphinxcontrib-blockdiag: 3.0.0
    sphinxcontrib-devhelp: 1.0.2
    sphinxcontrib-htmlhelp: 2.0.1
    sphinxcontrib-jsmath: 1.0.1
    sphinxcontrib-qthelp: 1.0.3
    sphinxcontrib-serializinghtml: 1.1.5
    stack-data: 0.6.2
    tables: 3.7.0
    tcia-utils: 1.0.2
    tifffile: 2022.10.10
    tinyarray: 1.2.4
    tomli: 2.0.1
    tornado: 6.2
    traitlets: 5.9.0
    typing-extensions: 4.5.0
    urllib3: 1.26.14
    wcwidth: 0.2.6
    webcolors: 1.12
    wheel: 0.38.4
    wheel-filename: 1.4.1
    widgetsnbextension: 4.0.5
    zipp: 3.15.0
File attachment: 1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192.zip

1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192.zip

Attachments (1)

1.3.6.1.4.1.14519.5.2.1.8421.4019.707473252718051217556812123192.zip (1.1 MB ) - added by Zach Pearson 3 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (9)

by Zach Pearson, 3 years ago

Added by email2trac

comment:1 by Zach Pearson, 3 years ago

Component: UnassignedDICOM
Platform: all
Project: ChimeraX
Summary: ChimeraX bug report submissionGraphics crash when DICOM has unexpected size relative to other images in same dataset

comment:2 by Zach Pearson, 3 years ago

'graphics restart' also doesn't seem to be affecting the volume viewer after a crash like this. I can open proteins and spin around new DICOM planes, but I can't change the display mode (surface, mesh), and attempting to change the plane shown has no efect, and neither do the level controls.

comment:3 by Zach Pearson, 3 years ago

Cc: Greg Couch Tom Goddard added
Owner: set to Zach Pearson
Status: newassigned

comment:4 by Tom Goddard, 3 years ago

This error message means that the DICOM volume data GridData object is reading 234256 values for one plane of the data which is not the right number of values for a 168 by 168 plane.

ValueError: cannot reshape array of size 234256 into shape (1,168,168)

So the trouble is that DicomGrid claims the data size is 168 by 168 by 33 and yet its read_xy_plane() method returns a numpy array that is not 168 by 168 in size. So this is a problem with the DICOM reader using a wrong grid size.

comment:5 by Tom Goddard, 3 years ago

When we use the word "crash" in bug reports we generally mean the program exited (e.g seg fault). This report is not a crash, just an error giving a Python traceback.

comment:6 by Zach Pearson, 3 years ago

I was surprised to learn that DICOM series can have files of different sizes. Indeed 16 files in this 17 file series are 168x168, the last one is 400-something x 400-something. I think we can get around this by having the Series class segregate files by size, then open different grids for each one.

comment:7 by Zach Pearson, 3 years ago

Milestone: 1.7

It took a sizable refactor to enable this: the Series code has to sort the files by size then open different DicomData objects for each one. Those DicomData objects then need all of the attribute derivation code that used to be in the Series class to figure out how to make themselves into valid grids. I don't think it should be backported to 1.6. I'll add some code to the 1.6 codebase to detect when these datasets come in and warn the user that viewing those slices may cause drawing to stop.

comment:8 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed

I pushed a commit that implements that refactor.

Note: See TracTickets for help on using tickets.