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 #549 (closed task: wontfix)

Opened 2011-05-31T14:36:23-05:00

Last modified 2014-05-02T21:22:13-05:00

Improve legacy support of bit typed data

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej-2.0.0
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1011, #1170


IJ1 treats bit masks as unsigned byte images with two values (0 & 255). If a plugin returns an ImagePlus backed by these types of images we should catch it and create BitType Imgs in IJ2.

Simple implementation: call ImageProcessor::isBinary(). This method would be simple. It would be slow but only for images that actually are binary. In those cases a full scan of the pixel data is made. I guess to be safe we'd need to call it for all slices in the stack while is true.

To improve performance hook some IJ1 methods via the CodeHacker to see when this kind of data is getting produced and check returned ImagePluses or ImageStacks to see if they were marked as binary. Then avoid the isBinary() call.

Change History

comment:1 Changed 2011-07-29T13:14:14-05:00 by bdezonia

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-alpha5

comment:2 Changed 2011-08-10T13:24:03-05:00 by bdezonia

  • Milestone changed from imagej-2.0-alpha5 to imagej-2.0-beta1

In b3ed4c9b17721f854f18fb272bcd7845a8718b25 added the check for isBinary() in LegacyUtils::makeGrayDataset() so that binary ImagePlus go to 1-bit Datasets.

Pushing the rest of this ticket to one of the beta releases.

comment:3 Changed 2011-11-09T11:45:57-06:00 by bdezonia

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

comment:4 Changed 2012-02-26T20:53:19-06:00 by curtis

  • Blocking 1011 added

comment:5 Changed 2012-05-04T14:50:42-05:00 by bdezonia

More recent changes improved the ability of the legacy layer to create 1-bit data. However no changes made in regards to avoiding isBinary() tests via CodeHacker.

comment:6 Changed 2012-05-14T09:54:44-05:00 by bdezonia

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

comment:7 Changed 2012-05-14T10:33:40-05:00 by bdezonia

  • Blocking 1170 added

comment:8 Changed 2012-08-14T12:17:14-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0

comment:9 Changed 2013-05-17T15:06:47-05:00 by bdezonia

We've recently decided that we will not automatically create binary data from users. This simplifies and speeds up the legacy layer harmonization code. It also avoids some annoying degenerate case bugs and avoids very slow harmonization of large virtual datasets. Thsi ticket can close when the scifio-cells branch has been merged to master.

comment:10 Changed 2014-05-02T21:22:13-05:00 by curtis

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