NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1091 (closed defect: fixed)

Opened 2012-04-09T08:02:48-05:00

Last modified 2012-12-05T15:32:38-06:00

Invert plugin only inverts 2 out of 3 channels for color image

Reported by: leek Owned by: bdezonia
Priority: major Milestone: imagej2-b2-bugfixes
Component: Other Version: 2.0.0-beta1
Severity: serious Keywords: ij-plugins-data
Cc: Blocked By:
Blocking: #1016

Description

The invert plugin and, I believe, any other that uses imagej.core.plugins.assign.InplaceUnaryTransform, will only update the first two planes of a color image. To reproduce:

File / Open Samples / Clown

Edit / Invert [IJ2]

Image / Color / Split Channels.

Two of the channels are clearly inverted and the third is not. The problem is in InplaceUnaryTransform.setOriginAndSpan which records the position of the last pixel in each dimension, rather than the length of the dimension (span[i] = dims[i] - 1). net.imglib.ops.image.ImageAssignment.buildRegion then creates offsets pOffsets[i] = spn[i] - 1. The resulting region will be shortened by 1 in every dimension, most notably the channel dimension.

Change History

comment:1 Changed 2012-04-09T13:39:48-05:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 2f3d71f1c75da1a47f2f242d7054d0da05b11f97

comment:2 Changed 2012-05-18T12:23:02-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta2

comment:3 Changed 2012-12-05T15:32:38-06:00 by bdezonia

  • Blocking 1016 added