saalfeldlab / render

Render transformed image tiles
GNU General Public License v2.0
34 stars 32 forks source link

Background correction for cellmap stack #159

Closed minnerbe closed 11 months ago

minnerbe commented 11 months ago

I started implementing background correction as discussed:

  1. average all affected tiles in the stack
  2. heavily smooth the resulting image
  3. subtract the resulting background image from all affected tiles (as Filter)

However, I see some problems with this approach (technical and conceptional):

Alternative: we could use the already implemented RollingBallSubtraction filter that uses an ImageJ plugin to do local background correction for a single image. The results of applying this filter don't look too bad (original vs. rolling paraboloid vs. rolling ball): original-vs-paraboloid-vs-ball

The downside would be that this is pretty computation heavy, so pre-applying the filter would be necessary, essentially duplicating the whole stack. What are your thoughts @StephanPreibisch ?

trautmane commented 11 months ago

Currently, the Filter.process method only gets an ImageProcessor, so there is no way of matching the incoming image to the background in terms of stage coordinates.

Yeah - I guess to make this work, we'd have to inversely transform the full background image and chop it up into separate tiles. So, you'd end up with 4 background tiles for the thymus data set (2 rows x 2 columns). Not sure if this is doable.

trautmane commented 11 months ago

Because of the success of https://github.com/saalfeldlab/render/pull/162 , @minnerbe thinks we should abandon this effort. We can keep this feature branch around for a while just in case we want to reference the changes. If/when we confirm it's not ever going to be needed, we can delete the branch and close this pull request.

trautmane commented 11 months ago

I guess I'll go ahead and close this now ...