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

Out of bounds exception #31

Open
NicoKiaru opened this issue May 27, 2024 · 7 comments
Open

Out of bounds exception #31

NicoKiaru opened this issue May 27, 2024 · 7 comments

Comments

@NicoKiaru
Copy link
Contributor

Hello!

I'm getting out of bounds exception:

Deconvolve cell SingleCellArrayImg [(512, 256, 256) -- (767, 449, 319) = 256x194x64]
min/max source 0.0 1025.0
min/max cell 512 767
min/max source 0.0 449.0
min/max cell 256 449
min/max source 0.0 600.0
min/max cell 256 319
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 461700

It looks like in y the cell goes to 449, and maybe it should stop at 448 ?

I can solve this by adding a Views.extendZero, but that should be avoidable.

@NicoKiaru
Copy link
Contributor Author

Sorry for being not so informative, I'm being a bit in a rush

@bnorthan
Copy link
Collaborator

Hi @NicoKiaru

I'll have to sleuth more this week. So this is a 1025 by 449 by 600 image? I can make a phantom on my side of that size and try it.

I hope I'm not forgetting something I did, but I think the cell dimensions are calculated in the CellCachedImg.

Clij2RichardsonLucyImgLib2Cache implements an accept function which receives the cell dimensions. I had thought the cell dimensions were guaranteed to be in bounds, but maybe I need to add a check. (I do check if the cell is at the boundary, and if so don't add overlap).

@NicoKiaru
Copy link
Contributor Author

Well yeah, this is weird, maybe the issue is on my side.

The overlap is [10 10 10], the block is [256 256 64],

PSF: 45x68x128

image

Image: 1026450601

image

@NicoKiaru
Copy link
Contributor Author

(And no rush: I have a fix with Views.extendZero for the moment)

@bnorthan
Copy link
Collaborator

bnorthan commented Jun 7, 2024

Hi @NicoKiaru

I tried to create a test image of the same size to replicate the error. You can find the test image and psf here

I setup the interactive test with the new image set. See here

It seemed to run OK, but I am sure I am just missing something as to how to replicate the error. Let me know if you have any suggestions.

As an aside I recently had to change the call to Lazy.generate slightly to be compatible with the latest version of Fiji and imglib2cache. See here. Let me know if you see any issues with that.

@bnorthan
Copy link
Collaborator

bnorthan commented Jun 7, 2024

Also python notebook to create test image of the right size can be found here.

You would need to pip install tnia-python to run it.

@NicoKiaru
Copy link
Contributor Author

Thanks!

FYI I've uploaded the dataset in here: https://zenodo.org/records/11396388

There's an example czi file and the file psf-200nm.tif can be used to deconvolve it directly in the skewed space (psf and dataset are skewed). I'll try to see if I can replicate - maybe in a few weeks... it could really be that the issue is on my side, with a specific reader I use

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

2 participants