Opened 3 years ago

Closed 3 years ago

#7896 closed defect (fixed)

DICOM: volume models not assigned unique colors

Reported by: Elaine Meng Owned by: Zach Pearson
Priority: high Milestone: 1.5
Component: DICOM Version:
Keywords: Cc: Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

If you open a DICOM folder with more than one series, they are all white. For example, uncompress /wynton/group/ferrin/usr.local/projects/chimerax/www/data/dicom/RIDER-1129164940.tar.bz2 and then open it in ChimeraX. One patient, one study but containing 2 CT series and 8 SEG series. They are all assigned color white as you can see in the Model Panel colorwells. If I show style surface for the SEGs, then those are all gray.

Previously, volume models from DICOM would initially be assigned unique colors, or at least the CT were different colors whereas the SEG were red-green-blue repeating. I don't think it is necessary to treat the SEG and CT differently, so instead they should get unique initial colors.

Tested in UCSF ChimeraX version: 1.6.dev202210270020 (2022-10-27) and UCSF ChimeraX version: 1.5rc202210270150 (2022-10-27)

Attachments (1)

Screenshot 2022-11-03 at 13.20.40.png (132.5 KB ) - added by Zach Pearson 3 years ago.
That's exactly what it is. Open one DICOM then another with several series; the second set of series will get unique colors.

Download all attachments as: .zip

Change History (8)

comment:1 by Elaine Meng, 3 years ago

However, if you do decide to treat SEG differently (e.g. use red-green-blue repeating), it would be also better to show them as full region in surface style.

in reply to:  2 ; comment:2 by Tom Goddard, 3 years ago

My recollection is that the red, green, blue coloring of segmentations is because those colors are used to modulate the gray scale image data and red, green, and blue provide 3 non-overlapping color channels.  If the segmentations are instead shows as surfaces instead of modulating the volume image style display then any colors can be used, although distinct colors for each segment are usually desirable.

in reply to:  3 ; comment:3 by Elaine Meng, 3 years ago

Currently they are all shown as "image" style single plane, and all white (2 CT and 8 SEG models).  So there should at least be the same treatment as when you open multiple density maps, that there is some kind of color series so that each is unique.

comment:4 by Tom Goddard, 3 years ago

To specify the initial color when opening a Volume model from some read in GridData use the GridData.init() default_color argument or set grid_data.rgba to a color. The color is specified as (red,green,blue,alpha) with each value a float from 0-1. For example

grid.rgba = (1.0,0,0,1.0)

comment:5 by Zach Pearson, 3 years ago

When I was refactoring DICOM the color assignment looked like it was external and based on how files were opened. Was that the case and if so where is that default color rotation defined? Otherwise I'll come up with one to put in the DICOM bundle.

comment:6 by Zach Pearson, 3 years ago

As best I can tell this is happening because the volume code resets the colors if no volumes are open in the session, but while the DICOM files are being opened and volumes are being created they are not immediately added to the session so the volume code always thinks there are no volumes open and so resets the colors.

by Zach Pearson, 3 years ago

That's exactly what it is. Open one DICOM then another with several series; the second set of series will get unique colors.

comment:7 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed

Fixed on develop and in the 1.5 release candidate here.

Note: See TracTickets for help on using tickets.