-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
'slic' crash with spacing #1693
Comments
@Borda, the error message is obscure, I'll grant, =), but the docstring does specify that spacing must be length 3! We don't currently support spacing in 2D images because it's rare to have different voxel spacing in just 2D images. (I have never come across this.) Do you have a use-case for 2D spacing? If so, I can add support for that. If not, I'll add a Thanks for the report! |
Well, I need segment 3D image but I wanted to start with simpler case (2D) a and give a try to the parameters I will need for 3D such as spacing... btw, what is the explanation of these numbers, 1 mean that distance between neighboring positions is 1? Thanks |
@Borda the spacing is meant to be relative. (5, 1, 1) means that the distance between adjacent voxels in the leading dimension (e.g. planes) is 5 times greater than the distance between voxels in the row / column dimensions. |
I'd argue that we should be as general as possible when we can be. 2D anisotropic is a strange use case, but I think it's entirely possible to relax the length-3 requirement in favor of an iterable of length |
I can provide even code for 3D with interactive visualization in iPython if you like:
|
@JDWarner I agree, but it's a bit finicky to deal with all the possible cases (multichannel = True/False, sigma being a scalar or an array-like). A quick glance at the code didn't suggest an immediate solution. PRs welcome, as always! ;) Happy to keep this open as a reminder to do that? |
A case for 2-D anisotropic images is the case of spatio-temporal diagrams (used for example in chaos and non-linear systems). |
any update here? :) |
Stand by my earlier comment that we should generalize I won't be able to dive into the code this week as I am on 12 hour overnight call. |
i gave the code a quick scan, i think the real challenge is coming up with tests. PRs would help :D. |
@jni not sure what you meant by "tackle this"? 😃 |
We need to start a deprecation cycle if we want to Change this behavior as it will introduce breaking changes. |
sigma division does not seems correct since sigma is a number and spacing is array_like
to Reproduce:
The text was updated successfully, but these errors were encountered: