Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stitching SPIM artifacts #134

Open
matham opened this issue Dec 19, 2023 · 1 comment
Open

Stitching SPIM artifacts #134

matham opened this issue Dec 19, 2023 · 1 comment

Comments

@matham
Copy link

matham commented Dec 19, 2023

We have LaVision light sheet data, where when stitched the overlapping areas have very visible artifacts.

The data set is 3 rows, 2 columns = 6 3D tiles (60GB). Below are examples of how the stitched images looks with various options. They all have the same issue.

After aligning with BigSticher I then fed the tiles coordinates to terastitcher and fused it there and it doesn't have any of these artifacts. And it doesn't seem to take much extra computations time. Alignment doesn't work great there so I'd prefer to be able to just use BigStitcher.

BigSticher

  • With only smooth blending

    with_blend

  • With no smooth blending

    no_blend

  • With content based blending. It is super slow - just this one slice (out of 1,500) took 12 hours

    with_blend_with_content_based_blending

  • Next I tried using the intensity adjustment option. This is the adjustment preview

    intensity_adjustment

  • Here's how it looks with intensity adjustment, 16bit, with smooth blending

    16_blend_adjust

  • Here's how it looks with intensity adjustment, 32bit, with smooth blending

    32_blend_adjust

  • Here's how it looks with intensity adjustment, 32bit, no smooth blending

    32_no_blend_adjust

TeraSticher

Here's how it looks with terastitcher with default options - no artifacts

tera_stitcher_no_spim_removal

The terasticher command was terastitcher.exe --merge --projin="locations.xml" --volout="..." --volout_plugin="TiledXY|3Dseries" --imout_format="tif" --algorithm=SINBLEND.

Any ideas what I can try to not have these artifacts?

@matham
Copy link
Author

matham commented Jan 4, 2024

I think I see the cause of the issue. BigStitcher uses FusionTools.defaultBlendingRange to decide "how many pixels to compute the blending function on". The default (max?) value is 40, which is not enough when there is a lot of overlap and there's no way to set it from the GUI.

I changed that value to 950 (the precomputed cos array is upto 1000 so didn't want to get too close in case) and recompiled multiview-reconstruction-3.2.5.jar and substituted it in the plugins folder of fiji and it seems to have fixed the issue!

Here's how it looks in BigStitcher with `defaultBlendingRange` set to `950` - no artifacts

increased_blend_area

Here's the jar in case someone else needs it:
multiview-reconstruction-3.2.5.zip

Would it be possible to increase the defaultBlendingRange to like 2000 or more in the next release? There doesn't seem to a downside I think as it's just the max AFAICS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant