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

GroupBy - Merge Image: Pixel type BitType not supported for merging. #514

Open
imagejan opened this issue Nov 8, 2018 · 0 comments
Open

Comments

@imagejan
Copy link

imagejan commented Nov 8, 2018

WTF? Why can't BitType images not be merged with the GroupBy node, but get merged just fine using the Merger node? This limitation seems unnecessary, and the special casing going on here is not very imglibby:

if (m_type instanceof ByteType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new ByteTypeHandler();
} else if (m_type instanceof UnsignedByteType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new UnsignedByteTypeHandler();
} else if (m_type instanceof UnsignedShortType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new UnsignedShortTypeHandler();
} else if (m_type instanceof ShortType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new ShortTypeHandler();
} else if (m_type instanceof IntType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new IntTypeHandler();
} else if (m_type instanceof LongType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new LongTypeHandler();
} else if (m_type instanceof FloatType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new FloatTypeHandler();
} else if (m_type instanceof DoubleType) {
m_typeHandler = (RealTypeHandler<T, A, ADA>)new DoubleTypeHandler();
} else {
throw new IllegalArgumentException(
"Pixel type " + m_type.getClass().getSimpleName() + " not supported for merging.");
}


Example workflow to reproduce the issue:

image

BitType Merging.zip

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

1 participant