Hi Ricardo,

  I think it makes most sense to compare screen captures since that is what you see on the screen.  In particular the non-screen-capture saved image with ChimeraX option "supersample 4" is expanding the resolution 4-fold and then binning which makes edges smoother but may smooth everything which I gather you don't want if you want to see detail.  It would probably be interesting to compare to a 3rd screen capture with nearest-neighbor so we see the actual size of the data voxels.

  At any rate here is a zoom in of 3dmod on left and ChimeraX on right from your screen captures.  My main impression is that the contrast set in 3dmod with the "Auto-contrast" function gives a higher contrast image which probably helps see detail.  The cubic interpolation 3dmod image actually looks less smooth than ChimeraX, but maybe that is also an effect of the higher contrast.  We don't have an auto-contrast feature in ChimeraX but I think that could be quite useful, more useful than cubic interpolation.

Tom


3dmod_chimerax_compare.png
On Mar 13, 2025, at 3:10 AM, Ricardo Righetto via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Tom,

I tried to reproduce almost exactly the same scene in IMOD and in ChimeraX. I made screenshots so you can see exactly what I see on my screen, but since we run everything through a VNC session on the cluster with OpenGL rendering through VirtualGL, which I know is not officially supported by either program, I also exported PNGs from both.

For IMOD, I used the default Auto-contrast at the slice I wanted to show, and exported the PNG using its snapshot key binding. For ChimeraX, I tried to pan the view to approximately the same position, enforced the same zoom level, and tried to match the contrast as best as possible (somehow, applying the same levels that the 3dmod main window showed me didn't yield the same results in ChimeraX -- but that's probably my misunderstanding of how levels are set in 3dmod). I then exported the scene with the command

save ~/Pictures/save_chimerax.png width 1563 height 1114 supersample 4
(these dimensions were meant to match the IMOD-exported PNG)

I hope you can appreciate how in IMOD the inner details of the contractile injection system, the ribosomes, the membrane leaflets and even from within the lipid droplets appear much "sharper".
Furthermore, it concerns me that in ChimeraX there is some sort of directional aliasing artifacts inside the membrane double leaflets (roughly horizontal, top ~left, and roughly vertical, center ~right). I don't know if that's a direct consequence of the trilinear interpolation, or some other issue.

I could not see any difference by setting 'volume #1 colormapOnGpu true', but it might be due to our "unusual" remote display setup, not sure.

Please find the files for download here:

Thank you so much for looking into this!

Best wishes,

--
Ricardo Diogo Righetto


Em qua., 12 de mar. de 2025 às 18:43, Tom Goddard <goddard@sonic.net> escreveu:
Hi Ricardo,

  ChimeraX volume display supports nearest neighbor and trilinear interpolation.  Nearest neighbor means when rendering on the screen the nearest volume grid point is used for the intensity while trilinear means the interpolation is linear along the x, y and z axes.  3dmod in IMOD says it does nearest neighbor and cubic:

"The checkerboard button toggles between nearest neighbor and slower, cubic interpolation."


It is a bit strange that 3dmod offers nearest neighbor but not linear and quadratic, and jumps right to cubic, especially since cubic involves sampling 4 data points along each axis.  But looking at the 3dmod code file b3dgfx.cpp getCubicFactors() reveals it indeed uses 4 consecutive data values and is using a form of cubic interpolation.  ChimeraX does linear interpolation on the GPU as it renders and it is built into OpenGL graphics so it is very fast.  While we could write out own GPU shader code to do higher-order interpolation it would be somewhat complicated.  I am curious how much better cubic interpolation looks.  Could you send an image of a tomogram view using 3dmod cubic interpolation and the same view with ChimeraX tri-linear interpolation (the default) to give an idea of the improvement?  If it is much better I may write the GPU shader code to do it.

  One thing you could try is to use the ChimeraX volume rendering option colormapOnGpu

volume #1 colormapOnGpu true

This interpolates the volume values for each screen pixel in the rendering and then maps them to color brightness while the default (colormapOnGpu false) interpolates the colors for each grid point of the data.  In my test on tomogram EMDB 1273 it made little difference.  This option is used primarily for DICOM medical imaging where very large jumps in intensity occur from voxel to voxel for seeing fine features like airways in lungs.

Tom


On Mar 12, 2025, at 6:37 AM, Ricardo Righetto via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Dear ChimeraX team,

(I have a vague memory of discussing this before, apologies if duplicate!)

When displaying volumes as images (e.g. cryo-ET volume slices), I see that by default it uses linear interpolation:

Would it be possible to offer higher-order interpolation options such as cubic?

I love how customizable it is to make figures in ChimeraX, but this is the one feature that we really miss compared e.g. to 3dmod from IMOD.

Thank you!

--
Ricardo Diogo Righetto
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/