Opened 5 years ago

Closed 5 years ago

#3198 closed defect (fixed)

Segmentation map coloring in opaque mode gives error

Reported by: goddard@… 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-19.4.0-x86_64-i386-64bit
ChimeraX Version: 0.94 (2020-04-16)
Description
Segmentation colors on opaque image map rendering (box style) gives this error because the map colors do not have alpha.

Log:
Startup Messages  
---  
note | FYI: command is replacing existing command: "open"  
  
UCSF ChimeraX version: 0.94.dev202004160103 (2020-04-16)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open /Users/goddard/ucsf/data/layer4/electron-microscopy-volume/data442.cmap
> format cmap

Opened data442.cmap, grid size 1374,2108,1653, pixel 45,45,56, shown at step
1, values uint8  

> volume #1 level 97,0 level 186,0.8 level 252,1

> volume #1 level 97,0 level 156.1,0.9765 level 252,1

> turn z 90

> volume #1 region 0,0,0,1373,2107,1652 step 8

> volume #1 region 0,0,0,1373,2107,1652 step 2 colorMode opaque8
> showOutlineBox true imageMode "box faces"

> set bgColor white

> volume #1 level 97,0 level 157.5,0.9559 level 252,1

> open /Users/goddard/ucsf/data/layer4/segmentation-volume/seg442.cmap format
> cmap

Opened seg442.cmap, grid size 1374,2108,1653, pixel 45,45,56, shown at step 1,
values uint32  

Unknown command: useage segm  

> usage segm

segmentation colors segmentations [color] [map a density map specifier]
[surface a surface specifier] [byAttribute a text string] [outsideColor a
color] [maxSegmentId an integer] [step map step]  
— Set segmentation to use random colors, or apply segmentation coloring to a
volume  
color: a color

segmentation surfaces segmentations [where where] [each a text string] [region
map region] [step map step] [color a color]  
— Create surfaces for a segmentation regions.  
where: a text string, repeatable  

> segmentation colors #2 map #1 byAttribute neuron

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.  
  
Traceback (most recent call last):  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/updateloop.py", line 73, in draw_new_frame  
view.draw(check_for_changes = False)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/view.py", line 166, in draw  
self._draw_scene(camera, drawings)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/view.py", line 233, in _draw_scene  
draw_opaque(r, opaque_drawings)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 1420, in draw_opaque  
_draw_multiple(drawings, renderer, Drawing.OPAQUE_DRAW_PASS)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 1431, in _draw_multiple  
d.draw(renderer, draw_pass)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/image3d.py", line 762, in draw  
pd._update_coloring()  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/image3d.py", line 918, in _update_coloring  
self._fill_textures()  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/image3d.py", line 1083, in _fill_textures  
self._fill_plane_texture(k, axis, t)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/image3d.py", line 1053, in _fill_plane_texture  
data = ir._color_plane(plane, axis)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/map/image3d.py", line 245, in _color_plane  
self.mask_colors(colors, region)  
File
"/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/segment/segment.py", line 92, in seg_color  
indices_to_colors(segment_ids, segment_colors, color_plane, modulate = True)  
TypeError: Color array (827, 1054, 3) does not have 4 color components  
  




OpenGL version: 4.1 ATI-3.8.24
OpenGL renderer: AMD Radeon Pro Vega 20 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.

Change History (2)

comment:1 by Tom Goddard, 5 years ago

Component: UnassignedVolume Data
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionSegmentation map coloring in opaque mode gives error

comment:2 by Tom Goddard, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Segment colors array was not correctly converted to opaque colors.

Note: See TracTickets for help on using tickets.