Ticket #743 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Add Axis plugin doesn't always work

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b1-initial
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

Open Organ of Corti and run Add Axis. Sometimes it doesn't add the new axis (or maybe just the slider). If it doesn't fail on first axis addition keep adding axes. Eventually it fails. Note that this was confirmed using a version of ImageJ with SwingDisplayPanel's axisSliders instance variable being a ConcurrentHashMap (like it was to fix bug #672). [Further debugging seems to imply its not just a missing slider but that the actual axis has not been added as running the plugin again gives the missing axis as one of the choices to add.]

Change History

comment:1 Changed 8 years ago by bdezonia

After adding axes until failure I noticed afterwards I could not Transform :: Rotate 90 Right. Nothing happened. It's like the Dataset is lost (or it's active status maybe) and thus IJ2 doesn't know we have a Dataset that needs to be updated with new planes or rotated or whatever.

comment:2 Changed 8 years ago by bdezonia

However I can do Math :: Add and Transform :: Flip Vertically so maybe the Rotate issue is it's own bug.

comment:3 Changed 8 years ago by bdezonia

Figured out the issue. You can only add the XYCZT axes. Any other axis is not compatible with IJ1 through the legacy layer. It's possible the IJ2 data has the new axis and yet the IJ1 copy does not. Investigate.

Anyhow we need to translate all non-IJ1 axes into extra channels in the IJ1 image. And then the legacy layer needs to map points between the IJ2 data and the IJ1 rasterized data.

If a user restructures the IJ1 data we need to be intelligent about fixing things in IJ2 land. One thing we could do is mirror IJ1's behavior (c=1, t=1, z = numPlanes). More thinking required here.

comment:4 Changed 8 years ago by bdezonia

Note rotate issue is thus:

You can rotate an image with 5 or fewer axes, even if some are not IJ1 compatible. Once you add a sixth axis you cannot rotate any longer (or at least the display data is not refreshed).

Note that these discussions of problems adding axes, etc. only apply to Datasets that have an associated IJ1 image (such as all the sample images after loading). For a pure IJ2 dataset running pure IJ2 plugins we should have no issue. Its the legacy layer mapping that causes problems.

comment:5 Changed 8 years ago by bdezonia

  • Summary changed from Add Data plugin doesn't always work to Add Axis plugin doesn't always work

comment:6 Changed 8 years ago by bdezonia

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

In 1c17b9580bff370b449b1068e93dbda3a348cbeb added code that encodes new axes as channels in IJ1. This bug is now fixed. There is a separate issue with imglib when adding axes in low memory situations which I will report as a new bug.

Note: See TracTickets for help on using tickets.