[chimerax-users] How to show fib-sem tomography data as solid volume
Tom Goddard
goddard at sonic.net
Thu Jun 23 13:45:44 PDT 2022
Hi Edoardo,
If I understand, you want to show a few planes in image style, but you want zero intensity values to be transparent because your 3D image apparently comes from tiling and some tiles are all 0. This doesn't look very good because since the boundaries are not clear where one plane overlaps another plane. But here's an example, image below,
volume #3 style image region 0,0,25,496,496,300 step 1,1,60 level 0,0 level 0.004,1 level 0.25,1 proj 2d-z showOutlineBox true
In this example I made an example masked map (size 496 by 496 by 496) from an EMDB ribosome map by masking to a Gaussian smoothed version of the map. That is of course not needed for your tiled map.
open 22586 from emdb
volume gaussian #1 sdev 10
volume #2 level 0.001
volume mask #1 surface #2
The appearance of this would be better with ambient shadows but those don't handle transparency. But that would not fix another major problem that intensity 0 occurs throughout the map, not just in the masked out edge region. So the regions with data are also speckled with transparency. That is a defect of using 0 as a mask value which is in the middle of the valid data value range.
Tom
> On Jun 23, 2022, at 5:03 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Dear Tom,
>
> Thanks a lot for your comprehensive explanation. I tried your suggestion and as you anticipated I am losing valuable intestines through the volume although I am still not make transparent the sides in the box visualisation mode that Elaine pointed out before (please see a snapshot attached). I do not understand what you meant for creating a notch filter yellow curve. Could you please elaborate more on that? @Ricardo, thanks for your tips too, I still need to figure out suitable to test your suggestion.
>
> Best wishes,
>
> Edoardo
>
> <Toms.png>
> ------------------------------------------------------
> Dr. Edoardo D'Imprima
> Postdoctoral fellow
> Structural and Computational Biology Unit
> EMBL Heidelberg - Mahamid Group
> Meyerhofstraße 1
> 69117 Heidelberg
> Germany
>
> Phone: +49 6221 387-8531
>
> <image.jpeg>
>
>> On 25. May 2022, at 19:52, Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>> wrote:
>>
>> Ricardo's suggest is good. Here are a few additional points. The "colormode l8" option I suggested will make the volume planes completely opaque even if you specify transparency as Ricardo suggested. I suggested "colormode l8" because I thought you wanted opaque planes based on the example figure you showed. You should leave out that option for Ricardo's suggestion to work. But if you leave it out then the non-zero part of the data will also be partly transparent and that may not be the appearance you want. The transparency goes from 100% to 0% as the yellow curve on the histogram rises from the bottom to the top. If you wanted completely opaque planes for the positive image values you might use levels like
>>
>> volume #1 style image level 0.001,1 color black level 25,1 color white
>>
>> Because no levels are specified below 0.001 in this command, all of the pixels below that intensity level will not be shown (100% transparent).
>>
>> It may be that you want to see negative and positive intensity levels but not 0 levels because the negative levels have interesting content. Using 0 to indicate "outside the data" is a really bad choice if both negative and positive levels are important. But you can still handle it by making a notch filter yellow curve that drops to zero just at the value 0.
>>
>> Tom
>>
>>
>>> On May 25, 2022, at 8:43 AM, Ricardo Righetto via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> wrote:
>>>
>>> Hi Edoardo,
>>>
>>> I believe what you want is to set all zero-valued voxels to have full transparency. This can be done via the histogram levels when viewing the volume as image and "box" mode, for example:
>>>
>>> <image.png>
>>> Here I have three different levels along the histogram, where the height of each level (you can drag with the mouse) is the transparency.
>>>
>>> In command line this would be like:
>>>
>>> volume #1 style image level -25,0 color black level 0,0 color gray level 25,1 color white voxelSize 1
>>>
>>> basically, I defined three levels where I assignin this example::
>>> -the voxel value (-25, 0 and 25 respectively)
>>> -the transparency (0, 0 and 1) where 0 means fully transparent and 1 fully opaque
>>> -the color I want for that level (black, gray, white)
>>>
>>> then voxel colors are saturated below and above the min/max levels (-25,25) and interpolated linearly between each defined level.
>>> (of course, adjust levels accordingly to your dynamic range, black/white contrast, etc)
>>>
>>> Hope this helps!
>>>
>>> Best wishes,
>>> Ricardo
>>>
>>>
>>>
>>> --
>>> Ricardo Diogo Righetto
>>>
>>>
>>> Em qua., 25 de mai. de 2022 às 13:41, Edoardo D Imprima via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> escreveu:
>>> Dear Tom, dear Elaine,
>>>
>>> Thanks a lot to both of you for the prompt and detailed reply. Elaine’s tip goes towards what I would like to achieve, however I think the issue is how ChimeraX reads the input. I managed to get this rendering with the software Dragonfly (attached the screenshot) where somehow the zeros are displayed in 3D as “empty space”. In ChimeraX though they are displayed as black pixels. I also adapted your command line Tom (volume #1 style image region 120,0,0,1346,1400,1449 step 1,1,1 colormode l16 proj 2d-z showOutlineBox true outlineBoxRgb white) and I still get the similar output (please see attached a snapshot). I converted the input .tiff frames as a single .mrc volume (header reports map mode=0) but the issue still persists.
>>>
>>> Do you have further suggestions?
>>> I am using ChimeraX (version 1.4rc202205200050 (2022-05-20)) on a windows desktop.
>>>
>>> Thank you,
>>>
>>> Edoardo
>>>
>>> <dragonfly_regions.jpg><chimerax_regions_03.PNG>
>>> ------------------------------------------------------
>>> Dr. Edoardo D'Imprima
>>> Postdoctoral fellow
>>> Structural and Computational Biology Unit
>>> EMBL Heidelberg - Mahamid Group
>>> Meyerhofstraße 1
>>> 69117 Heidelberg
>>> Germany
>>>
>>> Phone: +49 6221 387-8531
>>>
>>> <image.jpeg>
>>>
>>>> On 24. May 2022, at 19:28, Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>> wrote:
>>>>
>>>> Hi Edoardo,
>>>>
>>>> Elaine's example shows how to make the middle solid box image of your figure. To make the left image which shows 4 slices you can do something like this
>>>>
>>>> open 11638 from emdb
>>>> set bgColor white
>>>> volume #1 style image region 0,0,50,256,256,200 step 1,1,50 colormode l8 proj 2d-z showOutlineBox true outlineBoxRgb black
>>>>
>>>> Here's an explanation of the options in that long volume command. "style image" means gray scale rendering instead of surface. "region 0,0,50,256,256,200" gives the bounds of the region and says to start at z plane 50 and end at z plane 200, the six values xmin,ymin,zmin,xmax,ymax,zmax. The "step 1,1,50" means show every voxel along x and y axes, but only every 50th plane in z. The "colormode l8" means make the planes opaque. The "proj 2d-z" means show the planes of the volume as 2d planes perpendicular to the z axis. The "showOutlineBox true" means to draw the lines outlining the data and "outlineBoxRgb black" makes the line color black. Documentation here
>>>>
>>>> https://www.cgl.ucsf.edu/chimerax/docs/user/commands/volume.html#dispsolid <https://www.cgl.ucsf.edu/chimerax/docs/user/commands/volume.html#dispsolid>
>>>>
>>>> A simpler approach would be just to use the Volume Viewer panel and set the style (menu above the histogram) to "plane". That will show a scrollbar that lets you flip through the planes (you may have to scroll the volume viewer panel to see the horizontal scrollbar below the histogram). Then without rotating you just choose the planes you want and save an image of each plane with background transparency ("save plane1.png width 1500 transparent true") and stack them in photo editing program.
>>>>
>>>> Tom
>>>> <emd11638_planes.png>
>>>>
>>>>
>>>>> On May 24, 2022, at 9:18 AM, Elaine Meng via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> wrote:
>>>>>
>>>>> Hi Edoardo,
>>>>> I believe you can do this by choosing "box" display from the rightmost pulldown in the Volume Viewer dialog. See the screenshot attached below.
>>>>>
>>>>> Volume Viewer dialog settings:
>>>>> <https://rbvi.ucsf.edu/chimerax/docs/user/tools/volumeviewer.html <https://rbvi.ucsf.edu/chimerax/docs/user/tools/volumeviewer.html>>
>>>>>
>>>>> I hope this helps,
>>>>> Elaine
>>>>> -----
>>>>> Elaine C. Meng, Ph.D.
>>>>> UCSF Chimera(X) team
>>>>> Department of Pharmaceutical Chemistry
>>>>> University of California, San Francisco
>>>>>
>>>>> <Screen Shot 2022-05-24 at 9.15.15 AM.png>
>>>>>
>>>>>
>>>>>> On May 24, 2022, at 8:00 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:users at cgl.ucsf.edu>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>> Could you please tell me how to display fib-sem tomography data as a compact volume that can be navigated by sliding planes? The data consists of a series of frames that I can convert as .mrc volume or .mrcs stack. I attach a snapshot taken from a review that illustrates (middle panel) the visualisation I would like to obtain. The medical-image panel in ChimeraX is very handy however, the “full” option shows the volume while I need to display the planes of each side to slice through them.
>>>>>> Looking forward to your feedback,
>>>>>> Best wishes,
>>>>>> Edoardo
>>>>>
>>>>> _______________________________________________
>>>>> ChimeraX-users mailing list
>>>>> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
>>>>> Manage subscription:
>>>>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>>>>
>>>
>>> _______________________________________________
>>> ChimeraX-users mailing list
>>> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
>>> Manage subscription:
>>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>>> _______________________________________________
>>> ChimeraX-users mailing list
>>> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
>>> Manage subscription:
>>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>>
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220623/76ce4e47/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emdb_22586.png
Type: image/png
Size: 381309 bytes
Desc: not available
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220623/76ce4e47/attachment-0001.png>
More information about the ChimeraX-users
mailing list