-
Notifications
You must be signed in to change notification settings - Fork 11
volume box boundary and half pixel multires shift #24
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
base: master
Are you sure you want to change the base?
Conversation
I just noticed a weird disappearing behavior for the thinest one: ThinVolumes2.mp4But it's really really great, I need to test this with ABBA: 2D planes on a 3D volume, all lazy loaded and multiresolutions. |
In my opinion, this issue is related to the volume's sampling step size along the view ray. In the current implementation, the step is flexible and fast, But this flexible sampling does not always hit the volume's front and back boundaries properly. Another example: you can make an "empty" zero-intensity cube volume with Here is an example (from some time ago): bvv_error2-2024-06-28_10.36.57.mp4Maybe we should provide an option for "detailed" render, This is how it is done in napari and ClearVolume, From my experience fiddling with this parameter, I can submit another PR to illustrate this issue, Cheers, |
Understood. FYI here's how it looks on ABBA: Sections2D.mp4(there's a weird super bright edge - I'm not sure what's the source of it) I also hit the shader size limit you mentioned before when there are too many volumes. So I have to select a subset of slices. I was wondering: in your example, if you disable the interpolation in the sampling (you showed this on bsky AFAIR), do you get the same artifact ? |
This pull request has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/fiji-friends-weekly-dev-update-thread/103718/93 |
Hello @NicoKiaru, Yes, with disabled interpolation, this artifact is the same. Now I see your problem. It stems from the fact, that right now So if your single plane is "at the back", i.e. close to Interesting, interesting. This means that if we have a volume with large The solution in this case is the same as with exploding number of uniforms/textures: I will try to work on it in the coming time and submit a draft PR. Cheers, |
This request is made to illustrate that:
The rendering volume box needs to be expanded to the interval from (-0.5 * pixel size) till (Npixels+0.5*pixel size).
At the moment it is rendered from
sourcemin
tillsourcemax
, i.e. for a two pixels wide volume, from 0 to 1. While it should be from -0.5 till 1.5.This should be corrected in all three
sample_volume_...
shaders.Correcting this issue will allow to display volumes with a single plane (2D XY image).
There is a half-pixel shift (+crop) in rendering for multi-resolution datasets (compared to
SimpleStack
, which is rendered correctly).The example code to reproduce the issue is src/test/java/bvv/debug/DebugHalfPixel.java
Right now it is fixed by introducing "fake" interpolation
at the boundaries of the volume (where coordinates are negative).