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

BigWarp z offset issue in 2D mode #249

Open
tischi opened this issue Feb 25, 2022 · 8 comments
Open

BigWarp z offset issue in 2D mode #249

tischi opened this issue Feb 25, 2022 · 8 comments

Comments

@tischi
Copy link
Collaborator

tischi commented Feb 25, 2022

@NicoKiaru

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?

@NicoKiaru
Copy link
Collaborator

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...

@tischi
Copy link
Collaborator Author

tischi commented Feb 25, 2022

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?

@NicoKiaru
Copy link
Collaborator

BigWarp displays those sources, but at z = 0, so, you get a black image, unless the pixel size is above the z offset ...

@tischi
Copy link
Collaborator Author

tischi commented Feb 28, 2022

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.

@bogovicj
Copy link

bogovicj commented Feb 28, 2022

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

@NicoKiaru
Copy link
Collaborator

@bogovicj

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).

@bogovicj
Copy link

@NicoKiaru @tischi

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

@NicoKiaru
Copy link
Collaborator

@bogovicj I tried your test (BigWarp 7.0.5), and we can't see the landmarks (unless they are made very big) because of the z offset.

I'll open an issue in BigWarp as well

@NicoKiaru NicoKiaru changed the title BdvPlaygroundActionCommand 2D or not BigWarp z offset issue in 2D mode Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants