Opened 4 years ago

Closed 4 years ago

#6308 closed defect (fixed)

traceback using "measure center" on map model that hasn't been shown as a surface

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

For example, use

measure center #1

after opening the DICOM folder created by unzipping
https://www.rbvi.ucsf.edu/chimerax/data/dicom/4-24533.zip

(data supplied in the DICOM in VR tutorial)

This is initially shown as a single plane in solid style. Same traceback even if full region is shown.

Copied from Log:

UCSF ChimeraX version: 1.4.dev202203030220 (2022-03-03)
© 2016-2022 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX

open 4-24533 format dicom
Opened CHEST CT 4 as #1.1.1.1, grid size 512,512,236, pixel 0.576,0.576,1.25, shown at step 1, values int16
measure center #1Traceback (most recent call last):

File "/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/cmd_line/tool.py", line 302, in execute

cmd.run(cmd_text)

File "/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2897, in run

result = ci.function(session, kw_args)

File "/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/std_commands/measure_center.py", line 31, in measure_center

ijk = volume_center_of_mass(v, level)

File "/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/std_commands/measure_center.py", line 65, in volume_center_of_mass

kji = (m >= level).nonzero()

TypeError: '>=' not supported between instances of 'int' and 'NoneType'

TypeError: '>=' not supported between instances of 'int' and 'NoneType'

File "/Users/meng/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/std_commands/measure_center.py", line 65, in volume_center_of_mass
kji = (m >= level).nonzero()

Change History (1)

comment:1 by Tom Goddard, 4 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Made measure center command use all voxels if volume has no surface and no "level" option is specified.

It always considers the full map even if just a subregion is shown.

Note: See TracTickets for help on using tickets.