#2098 closed enhancement (not a bug)
Ephemeral convexity display
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Surface | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Windows-10-10.0.17134 ChimeraX Version: 0.9 (2019-06-03) Description I am currently trying to get the 'measure convexity' function to save/play as a vseries but the convexity display is consistently overwritten/lost. Additionally, every time I try to change a setting such as transparency, the convexity display is lost. Log: UCSF ChimeraX version: 0.9 (2019-06-03) © 2016-2019 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > open X:/Macropinocytosis/ChimeraProject/9_PosterChild/Cropped/*cell_CamB_ch1*.tif Opened map series cell_CamB_ch1_stack0000_488nm_0000000msec_0010986113msecAbs_COR_decon.tif, 100 images, grid size 936,660,274, pixel 1, shown at level 327, step 4, values uint16 > volume #1 step 2 > volume #1 level 60 > color #1 blue > volume #1 style surface > volume #1 transparency 0 > set bgColor slategray > close #1 > open X:/Macropinocytosis/ChimeraProject/9_PosterChild/Cropped/*cell_CamB_ch1*.tif Opened map series cell_CamB_ch1_stack0000_488nm_0000000msec_0010986113msecAbs_COR_decon.tif, 100 images, grid size 936,660,274, pixel 1, shown at level 327, step 4, values uint16 > volume #1 step 2 > volume #1 level 60 > set bgColor slategray > lighting depthCue false > material dull > lighting full > volume #1 projectionMode 3d > set bgColor slategray > measure convexity #1 Convexity -4.92 - 6.28, mean 0.26, std deviation 1.18 at 672719 vertices of surface 1.1.1 Missing or invalid "surfaces" argument: invalid surfaces specifier > perframe "measure convexity #$1" Convexity -4.92 - 6.28, mean 0.26, std deviation 1.18 at 672719 vertices of surface 1.1.1 Convexity -4.91 - 5.65, mean 0.266, std deviation 1.18 at 676926 vertices of surface 1.2.1 Convexity -5.26 - 5.64, mean 0.26, std deviation 1.18 at 679068 vertices of surface 1.3.1 Convexity -5.11 - 5.58, mean 0.254, std deviation 1.17 at 671715 vertices of surface 1.4.1 Convexity -5.58 - 5.63, mean 0.265, std deviation 1.19 at 663132 vertices of surface 1.5.1 Convexity -5.63 - 6.28, mean 0.273, std deviation 1.21 at 655581 vertices of surface 1.6.1 Convexity -5.19 - 5.7, mean 0.28, std deviation 1.19 at 650314 vertices of surface 1.7.1 Convexity -5.6 - 5.64, mean 0.285, std deviation 1.2 at 651244 vertices of surface 1.8.1 > perframe "measure convexity #$1" Convexity -4.92 - 6.28, mean 0.26, std deviation 1.18 at 672719 vertices of surface 1.1.1 Convexity -4.91 - 5.65, mean 0.266, std deviation 1.18 at 676926 vertices of surface 1.2.1 Convexity -5.26 - 5.64, mean 0.26, std deviation 1.18 at 679068 vertices of surface 1.3.1 Convexity -5.11 - 5.58, mean 0.254, std deviation 1.17 at 671715 vertices of surface 1.4.1 Convexity -5.58 - 5.63, mean 0.265, std deviation 1.19 at 663132 vertices of surface 1.5.1 Convexity -5.63 - 6.28, mean 0.273, std deviation 1.21 at 655581 vertices of surface 1.6.1 Convexity -5.19 - 5.7, mean 0.28, std deviation 1.19 at 650314 vertices of surface 1.7.1 Convexity -5.6 - 5.64, mean 0.285, std deviation 1.2 at 651244 vertices of surface 1.8.1 > select #1.2 3 models selected > ~select #1.2 Nothing selected > volume #1 transparency .5 OpenGL version: 3.3.0 NVIDIA 431.02 OpenGL renderer: Quadro M4000/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation
Change History (6)
comment:1 by , 6 years ago
Component: | Unassigned → Surface |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Ephemeral convexity display |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
If using a per-frame script to do the convexity coloring, this may happen after the volume surface is computed when the series is being played back. No, I think from looking at the code the perframe command will be run first. Then the volume surface will be computed later if the rendering code sees that it needs to be drawn. So a new command would be needed to force the volume surface to be computed before the measure convexity is run. Or all the coloring need to be computed without deleting any of the surfaces as described in the preceding comment.
comment:4 by , 6 years ago
Ok. I've added a volume command option to force calculating the surface immediately "volume #1 calculateSurfaces true". So instead of running "measure convexity #1" you could try "volume #1 calc true ; measure convexity #1".
Unfortunately I think this may not help you. The problem is that if you are playing a volume series with vseries and at the same time using perframe to do convexity coloring, at each time step, will the series advance one time increment or will the perframe command run first. The order is not guaranteed. Both of these things are asking to be called each frame. It might be that if vseries is started before perframe then it will advance to the next map, then the perframe measure convexity will run, then the frame is drawn. But I don't know whether that ordering is guaranteed. One solution is to not use vseries and instead show the maps and color all with a perframe command. But that gets a bit complicated, to hide current map, show next map, color it.
Another route to improve this is that some surface coloring routines (e.g. color by electrostatic potential, ie interpolating another map) have an option to automatically update the coloring when the surface geometry changes. If such a flag were added to the measure convexity command then it would do the coloring whenever the surface ends up being calculated.
comment:5 by , 6 years ago
Resolution: | → not a bug |
---|---|
Status: | assigned → closed |
Type: | defect → enhancement |
The practical way to show convexity coloring on a volume series is to play the series entirely through first to create the surfaces for each time point. This requires using the "cacheFrames" option to the vseries command, or use the volume series slider which caches all the surfaces. Without that caching then playing the volume series deletes each surface after it shows the next time point. Once you have all the surfaces, color them ("measure convexity #1" if the series is #1).
This is a bit cumbersome, but is needed because volume series removes surfaces that are not being shown in order to reduce memory use. Also it does not compute all the surfaces when you open the data because that would take a long time. So to color the surfaces you either have to first compute all the surfaces then color, or after each one is computed you color it. The latter approach is also possible with the perframe command but is more difficult because the perframe command needs to do several steps, hide the current surface, show the next surface, and color the new surface.
I don't see an easy way to improve this situation given the current volume series optimization where surfaces are not computed until they are needed.
follow-up: 6 comment:6 by , 6 years ago
Thank you, I appreciate all the effort you put into that, and I think the solution you came up with will work just fine for us! -Brandon ____________________ Brandon Scott, PhD Research Assistant Professor SDSMT, Nanoscience and Nanoengineering ________________________________ From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> Sent: Tuesday, July 30, 2019 3:48 PM Cc: Scott, Brandon L.; goddard@cgl.ucsf.edu Subject: [EXT] Re: [ChimeraX] #2098: Ephemeral convexity display *** This email is from an EXTERNAL sender. Use CAUTION before opening attachments or clicking links.*** #2098: Ephemeral convexity display --------------------------------------+--------------------- Reporter: brandon.scott@… | Owner: goddard Type: enhancement | Status: closed Priority: normal | Milestone: Component: Surface | Version: Resolution: not a bug | Keywords: Blocked By: | Blocking: Notify when closed: | Platform: all Project: ChimeraX | --------------------------------------+--------------------- Changes (by goddard): * status: assigned => closed * type: defect => enhancement * resolution: => not a bug Comment: The practical way to show convexity coloring on a volume series is to play the series entirely through first to create the surfaces for each time point. This requires using the "cacheFrames" option to the vseries command, or use the volume series slider which caches all the surfaces. Without that caching then playing the volume series deletes each surface after it shows the next time point. Once you have all the surfaces, color them ("measure convexity #1" if the series is #1). This is a bit cumbersome, but is needed because volume series removes surfaces that are not being shown in order to reduce memory use. Also it does not compute all the surfaces when you open the data because that would take a long time. So to color the surfaces you either have to first compute all the surfaces then color, or after each one is computed you color it. The latter approach is also possible with the perframe command but is more difficult because the perframe command needs to do several steps, hide the current surface, show the next surface, and color the new surface. I don't see an easy way to improve this situation given the current volume series optimization where surfaces are not computed until they are needed. -- Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2098#comment:5> ChimeraX <http://www.rbvi.ucsf.edu/chimerax/> ChimeraX Issue Tracker
Setting transparency on multicolored volume surfaces was changing it back to single color. I've fixed that.
For playing a volume series you will need to keep some things in mind to preserve the convexity coloring on volume surfaces. The vseries command deletes all but the shown surface by default and recreates the surface -- and of course a recalculated surfaces won't have the convexity coloring. This is controlled by the vseries command cacheFrames option
https://www.cgl.ucsf.edu/chimerax/docs/user/commands/vseries.html
You will need to set that so that all frames are cached if you are playing through and visiting them more than once. If you are only showing them once, say for recording a movie then that is not needed.
When a volume surface is shown when playing a series the surface is not actually calculated until it is drawn. The measure convexity command won't work on it until it is calculated. This is going to make it difficult to show the surface drawn initially with the convexity coloring. We ought to have a volume command option that says compute the surface now instead of waiting until it is going to be drawn. Lacking that I think the way to handle this is use vseries cacheFrames option so all surfaces are kept, and put the coloring on all of them after all the surfaces have been created. To make sure the surfaces are created they have to actually be displayed. So it would require playing through the series once first. Then compute the convexity coloring on all of them.
The reason for this non-sense is for good performance, surfaces are not computed unless they are shown.