cryoem / eman2

A scientific image processing software suite with a focus on CryoEM and CryoET
143 stars 50 forks source link

Volume filter for template matching #548

Closed thorstenwagner closed 1 year ago

thorstenwagner commented 1 year ago

Hi,

I've added an option to filter by the peak volume to the template matching procedure.

It is useful to have an option to remove peaks with a very large volume. For example, false positive picks on membranes can have a very large volume. But its useful in general, as the peak volume correlates to the reference volume.

Therefore I remove all picks by default, which have a peak volume bigger than the reference volume.

All my tests were successful. However, I'm just not sure if I put all parameters in the argument parser in the correct way. I would appreciate if someone could double check it.

Best, Thorsten

thorstenwagner commented 1 year ago

I don't see any problems per-se. A couple of comments. Usually we'd try to put similar arguments into the same row with different columns. ie - look at the layout in e2projectmanager and find a logical place to put them rather than just adding two rows.

I will have a look!

Also, what you're trying to capture here I think would normally be done by doing a low-pass filter on the CCF volume, which is generally a lot more efficient than a real-space localized sum, particularly in 3-D. Unless your peak sum is sensitive to geometry (ie - iteratively following the edge of a membrane or somesuch), the filter approach would likely be better.

OK, thats true. But as we are extracting the connected components anyway, I think we can simply reuse it and the solution should be fine?

Also worth pointing out that this approach is only really true for isolated objects. If you are doing template matching on, say an actin filament, then clearly the peak should not be localized.

Ah, true! That means I should not filter volumes bigger than the reference volume? I can certainly remove this part.

thorstenwagner commented 1 year ago

OK, position in the GUI is adjusted.

thorstenwagner commented 1 year ago

Is there anything missing that I can do to have this merged? :-)

sludtke42 commented 1 year ago

Sorry, I thought I already had... We don't use PR's much on this side. Too few people