#1606 closed defect (fixed)
Singular matrix reading DICOM time series
Reported by: | Elaine Meng | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Volume Data | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Darwin-17.7.0-x86_64-i386-64bit ChimeraX Version: 0.9 (2019-01-14) Description For opening DICOM I haven't been able to specify a whole directory successfully. In this case the attached folder (after unzipping) contains 6 subdirectories, each with a dicom stack. It is subset of the mouse brain data from TCIA. Opening this folder gives a traceback, as shown in the log. Log: UCSF ChimeraX version: 0.9 (2019-01-14) How to cite UCSF ChimeraX > open /Users/meng/Desktop/10-01-2010-339068828-GBMintracranial-631.2 format dicom Traceback (most recent call last): File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/cmd_line/tool.py", line 252, in execute cmd.run(cmd_text) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/cli.py", line 2612, in run result = ci.function(session, **kw_args) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/open.py", line 41, in open from_database=from_database, ignore_cache=ignore_cache, **kw)) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/open.py", line 62, in handle_unknown_kw return f(*args, **kw) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/models.py", line 598, in open session, filenames, format=format, name=name, **kw) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/io.py", line 457, in open_multiple_data models, status = open_func(session, paths, mname, **kw) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/volume.py", line 3405, in open_map_format return open_map(session, stream, name=name, format=format, **kw) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/volume.py", line 3041, in open_map grids = data.open_file(map_path, file_type = format, verbose = kw.get('verbose')) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/fileformats.py", line 139, in open_file data = module.open(apath, **kw) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/dicom/__init__.py", line 20, in open return dicom_grids(paths, verbose = verbose) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/dicom/dicom_grid.py", line 34, in dicom_grids grids.append(DicomGrid(d)) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/dicom/dicom_grid.py", line 48, in __init__ file_type = 'dicom', channel = channel) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/griddata.py", line 100, in __init__ self.update_transform() File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/griddata.py", line 186, in update_transform tf, tf_inv = transformation_and_inverse(self.origin, self.step, rsaxes) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/map/data/griddata.py", line 428, in transformation_and_inverse tf_inv = tf.inverse() File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/geometry/place.py", line 187, in inverse self._inverse = Place(m34.invert_matrix(self._matrix)) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/geometry/matrix.py", line 130, in invert_matrix rinv[:, :] = matrix_inverse(r) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/numpy/linalg/linalg.py", line 532, in inv ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj) File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/numpy/linalg/linalg.py", line 89, in _raise_linalgerror_singular raise LinAlgError("Singular matrix") numpy.linalg.linalg.LinAlgError: Singular matrix numpy.linalg.linalg.LinAlgError: Singular matrix File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/numpy/linalg/linalg.py", line 89, in _raise_linalgerror_singular raise LinAlgError("Singular matrix") 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 675MX OpenGL Engine OpenGL vendor: NVIDIA Corporation File attachment: 10-01-2010-339068828-GBMintracranial-631.2.zip
Attachments (1)
Change History (5)
by , 7 years ago
Attachment: | 10-01-2010-339068828-GBMintracranial-631.2.zip added |
---|
comment:1 by , 7 years ago
Component: | Unassigned → Volume Data |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → traceback trying to specify whole directory for DICOM input |
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Summary: | traceback trying to specify whole directory for DICOM input → Singular matrix reading DICOM time series |
Error was caused by reading a DICOM time series which is not yet supported. The reader did not know it was a time series and the first two slices were at exactly the same position (but different times) and so it decided the z slice spacing was 0 leading to a singular matrix error.
I added code to detect DICOM time series and warn that they are not yet handled instead of giving a traceback.
In the future it will not be too hard to add time series support.
comment:4 by , 7 years ago
Great! When I opened this directory with 6 subdirectories/datasets in Horos, I couldn’t even tell which one was the time series, except by guessing because it had “Dyn” in its name. Horos has a “play” button and slider, but it has that for all the datasets, and for the single-time-point sets at least, it animates through the slices, i.e. spatial dimension rather than time. Not sure what it is doing for the 4D dataset… it might play through the times for each slice before going to the next slice. It did something crazy when I tried to use the 3D viewer on that dataset, maybe stacking all the images spatially? I am pretty sure Horos knows how to deal with 4D correctly, so I probably failed to use the correct options. Now in ChimeraX it is obvious which is the time series because the time slider shows the dataset name. It does look somewhat holey or pixelated (viewed either as plane or volume), but that might just be the way it is.
Note:
See TracTickets
for help on using tickets.
Added by email2trac