Ticket #1831 (assigned defect)

Opened 7 years ago

Last modified 6 years ago

Drag and Drop: handle .roi files

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b10-compatibility
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1342

Description

In IJ1 dropping a .roi file on an image causes the .roi file to be opened as a region of interest and applied to the active image (or a dummy image if none exists). We need to replicate this behavior.

Change History

comment:1 Changed 6 years ago by bdezonia

  • Blocking 1342 added

comment:2 Changed 6 years ago by curtis

  • Owner changed from curtis to bdezonia
  • Status changed from new to assigned

The I/O and DnD services are now fully formed, so adding this feature should be very doable now. Pattern it after DatasetService#open and DatasetIOPlugin, LUTService#loadLUT (which should be renamed to open at some point) and LUTIOPlugin, and TextService#open and TextIOPlugin.

Supporting .roi files would use the exact same pattern: we just need to add an open(String) and/or open(File) method to the OverlayService, then implement a corresponding OverlayIOPlugin so that File > Open can open .roi files. Dragging and dropping them should then "just work" thanks to the FileDragAndDropHandler.

Note: See TracTickets for help on using tickets.