Ticket #1393 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Legacy layer: ImagePlus::hide() does not hide image

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b4-plugins
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: G.Landini@… Blocked By:
Blocking: #1331

Description

If an ImagePlus is asked to be hidden, it does not get hidden.

For example, from a plugin I call the BinaryLabel plugin which creates a
new image called "Labelled" and I try to hide it. In IJ2 it remains open.

This works in IJ1:
IJ.run(imp2,"BinaryLabel ", "white");
IJ.selectWindow("Labelled");
imp5 = IJ.getImage();
ip5=imp5.getProcessor();
imp5.hide();

Change History

comment:1 Changed 7 years ago by bdezonia

Gabriel, are you saying it won't hide during processing or that it won't hide ever (even after plugin has completed)?

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

comment:2 Changed 7 years ago by landinig

Hi Barry, It won't hide during processing. I just realised that it is eventually hidden at the end of the plugin but not when imp5.hide() is called.
I guess that it is not desirable to keep open images that remain selected by default while they should not be available.

comment:3 Changed 7 years ago by bdezonia

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

With commit ef1b45b86586c57c7ee6d55b35b7b98949d8716d ImagePlus::hide() immediately closes the associated display. Gabriel, I think this will address your problem. Closing bug. Reopen if there are unresolved issues.

comment:4 Changed 7 years ago by landinig

Yes, this is fixed. Thank you.

Note: See TracTickets for help on using tickets.