Skip to content

Conversation

@takashi310
Copy link

Fixed an issue in SparkAffineFusion where OverlappingViews.findOverlappingViews failed to find views when preserveAnisotropy was enabled and a non-1 anisotropyFactor was provided.

@cgoina
Copy link
Collaborator

cgoina commented Aug 21, 2025

@StephanPreibisch I think this may take care of the problem that I was also expperiencing when I created the ome-zarr container with '--preserveAnisotropy' and the fused result was all black. We need this fix too.

@takashi310
Copy link
Author

I have merged my changes into the current code. This fixes the issue where using --preserveAnisotropy with an anisotropyFactor not equal to 1 caused the output to turn completely black.

@StephanPreibisch
Copy link
Contributor

StephanPreibisch commented Sep 25, 2025

Thanks @takashi310 , I'll check it out Saturday morning!

@takashi310
Copy link
Author

Thank you, Stephan.
I realized the fixed version wrongly duplicates the last channel. I am still investigating this issue.

StephanPreibisch added a commit that referenced this pull request Sep 27, 2025
@StephanPreibisch
Copy link
Contributor

StephanPreibisch commented Sep 27, 2025

@takashi310 thanks for trying to solve this. You found the cause for the issue correctly, but the solution unfortunately went in the wrong direction. The key was to change

final OverlappingBlocks overlappingBlocks = OverlappingBlocks.find( dataLocal, overlappingViews, fusedBlock );
to
final OverlappingBlocks overlappingBlocks = OverlappingBlocks.find( dataLocal, registrations, overlappingViews, fusedBlock );

Just commenting this block actually fixed the problem - because it wrongly reported that nothing was to do because it used the transformations stored in the SpimData2 object, and not the ones updated with the anisotropyFactor. So what I did was to extend that method to support the updated registrations. And I used that opportunity to remove all convenience methods that do not explicitly take a HashMap< ViewId, AffineTransform3D >.

Thanks so much for looking into this @takashi310!

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

Successfully merging this pull request may close these issues.

3 participants