Ticket #1886 (closed defect: wontfix)

Opened 4 years ago

Last modified 3 years ago

Virtual stack approach insufficient

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b8-analysis
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1914


On the scifio-cells branch CellImg backed data is represented across the legacy layer with Imglib2 virtual stacks. These stacks have one processor and a single plane of refreshable data.

There is a class of commands in IJ1 that is not well served by this approach. Any plugin that gathers a list of processors from an ImageStack (and then computes using those multiple processors) will not be able to compute correct results.

An example of one of these plugins is the legacy command Z Project. Even with virtual stacks this command hatches multiple planes of data that it works with. So big virtual stacks can still cause memory problems. But small enough ones work correctly.

The IJ2 approach has multiple instances of the same processor and same plane of pixels. And thus the median calculation code for Z Project can't succeed.

We should think how to handle such a case across the legacy layer.

Change History

comment:1 Changed 4 years ago by bdezonia

Another problem case: Stack to Images. This command pulls apart and ImagePlus into multiple ImagePluses by reusing the ImageProcessors from its ImageStack. In our Imglib virtual stacks there is only ever one ImageProcessor and thus you have multiple new ImagePluses pointing to the same plane of pixels. Thus all Images are exactly the same rather than a different plane of data each.

comment:2 Changed 4 years ago by bdezonia

And Stack Reducer Tool is broken. This one also relies on multiple ImageProcessors. All slices in output match the last slice of the stack of input.

Last edited 4 years ago by bdezonia (previous) (diff)

comment:3 Changed 4 years ago by bdezonia

Image Adjust Size of a 3 slice cellimg stack creates the correct sized image. However all the planes have the same values (== the 1st plane in the stack).

comment:4 Changed 4 years ago by bdezonia

Plot Profile: works differently for cellimg data vs. planarimg data. A 3 channel 8-bit image with a selection. Using a planar img the plot looks like IJ1. Using a cell img no profile is drawn.

comment:5 Changed 4 years ago by bdezonia

Ignore the Plot Profile comment. It is a side effect of scifio not defaulting calibration to 1.0 9but rather NaN) for spatial dims. There is another ticket for this and it is to be handled before beta 7 release.

comment:6 Changed 4 years ago by bdezonia

Note that scifio cells was merged to master recently.

comment:7 Changed 4 years ago by bdezonia

  • Blocking 1914 added; 1661 removed
  • Milestone changed from imagej2-b7-ndim-data to imagej2-b8-analysis

comment:8 Changed 4 years ago by bdezonia

Arrange Channels also seems to repeat one plane over and over in output result. Yet it works in IJ1. Again for big images perhaps IJ1 will run out of memory.

Last edited 4 years ago by bdezonia (previous) (diff)

comment:9 Changed 3 years ago by curtis

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

There is very little we can do about ImageJ1 commands that assume full access to the image pixels. The best we can do it evolve things toward new ImageJ2 commands toward better algorithmic approaches that understand new virtual stack data structures, etc. We should file issues for such commands as needed on a case by case basis.

Note: See TracTickets for help on using tickets.