Opened 4 years ago

Closed 3 years ago

#5366 closed enhancement (fixed)

Volume contour level for NIH 3D printable surface

Reported by: phil.cruz@… Owned by: pett
Priority: moderate Milestone:
Component: Volume Data Version:
Keywords: Cc: Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

At today's NIAID meeting (Oct 7, 2021) we discussed a problem with the NIH 3D pipeline making a 3D printable surface for emdb 8116. It uses "hide dust" which hides almost all of the fragmented virus capsid surface at the default threshold and step 4. At step 1 the surface is reasonable but the map size is 768 x 768 x 768 which makes the surface too large for printing.

We could try to detect that hide dust is hiding most of the surface and then try a lower contour level.

Other ideas we discussed include using "volume bin" with bin size 4. A test showed that the default threshold for the original map is way too high since the binned map has even lower intensity values due to averaging.

Change History (5)

comment:1 by Tom Goddard, 4 years ago

I tried detecting the problem and fixing it with a lower threshold in some hand tests.

open 8116 from emdb
volume #1 step 4

First I used command "measure volume #1" (= 2e6) to get the surface enclosed volume before hiding dust. Then "measure volume #1 includeMasked false" (= 8000) after issuing the hide dust command. The ratio is 2.5% so almost the entire surface is removed by hide dust.

The default threshold (4.3) puts 1% of the entire volume grid points above the threshold. I tried using a 2% threshold from the Python shell

v = session.models[0]
v.initial_surface_levels(vfrac = (0.02,0.90))

-> ([2.501382463132634], [(0.7, 0.7, 0.7, 1)])

Return value is level and color (can be two values for polar data). Threshold 2.5 makes surface not so fragmented, volume 5.4e6 before hiding dust and 3.8e6 after hiding dust (70% of volume with dust).

Trying a 3% threshold made hide dust reduce enclosed volume to 82%.

We could detect large volume decreases with hide dust, say greater than 50%, then try thresholds enclosing twice or 3 times the voxels, just a fixed set of choices until we find one where hide dust keeps at least 50% of the volume.

I am not super keen on this. It will fix the problem for EMDB 8116, but I suspect it will fail for many other EMDB maps, especially if you throw a tomogram at it where there is no hope that any level will give a single connected surface with most of the volume.

So I think a possibly more important goal than trying to reduce these rare failure cases is to have the code at least detect that the result is bad (using the enclosed volume reduction) and then log a warning and maybe not output that surface file. Handling such warnings well and giving clear explanations in the warnings of why it didn't work may be more important than twiddling with heuristics that fix very few cases.

comment:2 by pett, 3 years ago

Resolution: fixed
Status: assignedclosed

The current code detects if the threshold level hides two much of the volume and whether it forms a single connected object. If it hides too much or is disconnected, the script tries lower thresholds until an acceptable value is found.

comment:3 by Tom Goddard, 3 years ago

Resolution: fixed
Status: closedreopened

comment:4 by Tom Goddard, 3 years ago

Cc: Tom Goddard added; pett removed
Owner: changed from Tom Goddard to pett
Status: reopenedassigned

comment:5 by Tom Goddard, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.