knip icon indicating copy to clipboard operation
knip copied to clipboard

Offsets are multiplied by 2 when setting image dimension metadata

Open imagejan opened this issue 7 years ago • 1 comments

When using the Set Image Metadata node to set the dimension name (and nothing else), e.g. Dimension 2 to "Z" (as is required for bitmasks after the Feature Calculator (BETA) node currently - another bug?), the image offsets get multiplied by 2, as illustrated by this workflow:

image Set Metadata Offsets Bug.zip

I suspect the issue somewhere in these lines, where the min gets set correctly first, but later the image gets translated by the very same min again:

https://github.com/knime-ip/knip/blob/8aa1488e09dafcbdfca903fd9ed4ed67d24e5efd/org.knime.knip.base/src/org/knime/knip/base/nodes/metadata/setimgmetadata/SetImgMetadataNodeModel.java#L242-L248

https://github.com/knime-ip/knip/blob/8aa1488e09dafcbdfca903fd9ed4ed67d24e5efd/org.knime.knip.base/src/org/knime/knip/base/nodes/metadata/setimgmetadata/SetImgMetadataNodeModel.java#L263-L264

Not sure if my guess is correct, though... I only quickly looked at the code.

(Tested with KNIME 3.5.3 and the nightly-built KNIME Image Processing 1.6.1.201806190602)

imagejan avatar Jul 04 '18 09:07 imagejan

(as is required for bitmasks after the Feature Calculator (BETA) node currently - another bug?)

I opened an issue for this one: https://github.com/knime-ip/knip/issues/506

imagejan avatar Aug 09 '18 12:08 imagejan