Ticket #549 (closed task: wontfix)

Opened 8 years ago

Last modified 5 years ago

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

Description

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 8 years ago by bdezonia

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

comment:2 Changed 8 years ago 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 8 years ago by bdezonia

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

comment:4 Changed 7 years ago by curtis

  • Blocking 1011 added

comment:5 Changed 7 years ago 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 7 years ago by bdezonia

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

comment:7 Changed 7 years ago by bdezonia

  • Blocking 1170 added

comment:8 Changed 7 years ago by bdezonia

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

comment:9 Changed 6 years ago 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 5 years ago by curtis

  • Status changed from new to closed
  • Resolution set to wontfix
Note: See TracTickets for help on using tickets.