Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Legacy layer has limitations in regard to plugins that change data types #84
Open Bridge sample. Change type to 12-bit. Find Edges. File Revert. Data is restored but type is still 12-bit.
This weakness seems only to be that IJ2 can't always detect a type change from a LegacyPlugin for those types in IJ2 that are not directly representable. So also think of a signed 8 bit Dataset that gets represented as a 32 bit float ImagePlus. Then if you run a Legacy plugin that expects to return a float32 ImagePlus the legacy layer will not see that the type has changed and it will copy back to signed 8-bit values clamping.
So any type that is not directly representable (signed integral types, non byte boundary types, 64 bit types, 32 bit unsigned) cannot detect changes an IJ1 plugin could make that would try to change the type of the output data to something that matches the currently mapped IJ1 type.
Note: 1-bit is now unaffected by this problem. During harmonization isBinary() is checked and handled.