-
Notifications
You must be signed in to change notification settings - Fork 42
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
Clean up NativeType creators #139
Comments
Hi @hinerm,
Thanks. I will fix that
I see the problem. But I'm not sure how we can fix that. We can add a check if the provided factory has the same type as output type, but how would we resolve this issue if the types are different? Throw an exception?
I'm not sure if I understand. A parametrized implementation would expect a |
see: 7dba713 |
@ctrueden and I talked about this a bit and decided it is really a limitation of the ImgLib2 library putting the generic parameter of
Correct. A generic parameter implies that I think what we want is to patch ImgLib2 to add constructors to |
agreed to all points 👍 |
should we leave this issue open until |
Sure.
Fortunately, |
@dietzc I didn't do a great job reviewing the img-creators branch. After it broke Jenkins I fixed DefaultCreateNativeType to hard-code the
DoubleType
return, which made it compatible with J6 again.However, upon looking closer there are now some questions about this implementation:
DefaultCreateNativeType
to only returnDoubleTypes
, or did you want a generic parameterized implementation?DefaultCreateImg
implementsCreateNativeImg
but if not given an output type, callsCreateType
- should it callCreateNativeType
?DefaultCreateImg
you can not assume that callingCreateType
with no args will give you back aT
. I started a branch with a unit test demonstrating this where you get back aDoubleType
image after providing aShortType
factory, which I think is counter-intuitive.When you get a chance could you address these topics on the branch I started, and file a PR?
The text was updated successfully, but these errors were encountered: