BigWarp z offset issue in 2D mode
Opened this issue ยท 8 comments
How do you in practice figure out whether you would like to launch BigWarpLauncherCommand
in 2D?
I have a feeling right now it is never launched in 2D?
Would it make sense to add a user parameter boolean register2D
?
In fact, what happens then if the sources actually are in 3D?
That's BigWarp dealing with it: if the source has a thickness of 1 slice, it is started as 2D, otherwise 3D.
Usually that's good enough.
But there is a force2D
field in BigWarpLauncher (https://github.com/bigdataviewer/bigdataviewer-playground/blob/94c947c2b908d8def28281c3706e0b5bca459a53/src/main/java/sc/fiji/bdvpg/sourceandconverter/register/BigWarpLauncher.java), which forces 2D even if the sources are 3D. I did not find it very useful thus it's not implemented in the command.
The most annoying part when dealing with 2d is if your sources have a z-offset, but you already know this...
Ok, I did not know that BigWarp does that automatically.
The most annoying part when dealing with 2d is if your sources have a z-offset, but you already know this...
will BigWarp still display such sources?
BigWarp displays those sources, but at z = 0, so, you get a black image, unless the pixel size is above the z offset ...
OK, that's an issue, I think (ping @bogovicj).
Use case: alignment of TEM sections, which sit physically on top of each other (and may have thus a corresponding sourceTransform
that shifts them in z) and one would like to align them in 2D.
Thanks @tischi and @NicoKiaru
Just to make sure I understand correctly, Bigwarp currently:
- automatically detects whether a source is 2D
- and this is correct(?)
- it displays all 2d sources at z=0
- this is incorrect
Yes, that's exactly it. And note that in the worst case scenario, the z offset may be different between the moving and the fixed source.
If you go for some modification, I'd still like to be able to keep the default behaviour if possible: In ABBA, I'm shifting the source in Z to select the part I want the user to see (before starting BigWarp).
I made some changes
saalfeldlab/bigwarp@7fdfcca
Bigwarp seemed to show the 2d sources correctly on start up, but it was possible to mess it up with the Q
and W
hotkeys. I fixed those, but I'm probably missing some things.
Specifically, @NicoKiaru
BigWarp displays those sources, but at z = 0, so, you get a black image,
are you getting this on startup? if so, how?
This is the demo I used to test things today:
https://github.com/saalfeldlab/bigwarp/blob/master/src/test/java/bigwarp/Sources2Dtests.java