Ticket #649 (closed task: fixed)

Opened 8 years ago

Last modified 6 years ago

Implement File Save and File Save As

Reported by: bdezonia Owned by: hinerm
Priority: major Milestone: imagej2-b1-initial
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By: #1013, #1045
Blocking: #9, #1171, #1912

Description

IJ2 does not yet allow the saving of data. Implement save functionality.

Change History

comment:1 Changed 8 years ago by bdezonia

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

comment:2 Changed 8 years ago by curtis

  • Blocking 9, 1019 added

comment:3 Changed 8 years ago by bdezonia

  • Blocked By 1013 added

comment:3 Changed 8 years ago by curtis

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

This ticket is about a SaveImage plugin for IJ2. It will use the ImgSaver (ticket #1013).

comment:4 Changed 8 years ago by curtis

  • Blocked By 1045 added

comment:5 Changed 8 years ago by bdezonia

Make sure that Save and Save As updates the saved Imgplus' source string (via imgPlus.setSource()). This code has recently been added.

comment:6 Changed 8 years ago by hinerm

Changes are currently on this branch of ImageJ:
 https://github.com/imagej/imagej/tree/save-image

Implementation is complete and just needs to be reviewed and merged into master.

Last edited 8 years ago by curtis (previous) (diff)

comment:7 Changed 8 years ago by curtis

I made some changes to the branch, merged with master, and did some additional work on it. See 89ecc3fdc25139b5e525273d4d3d7d3384f067ae, 5ff6a4960f50e5495c4d71d23d485f4297edce5e, 4f4cf232031d1e050e428948044480dbdb2bdd33, 708c8fd2440cd0ecf7d607f2674b9922c6edde8f and 63df0f9b660524b02338536aa70352bcd85ac0ba.

There are still some problems:

  1. No progress is shown during the save. StatusEvents should be issued, similar to OpenImage.
  2. No dialog box is popped upon error. Both OpenImage and SaveImage should do this.
  3. Saving multi-channel data throws an exception (e.g., try with Clown).
  4. In general, more manual testing is needed across various image types.
  5. There is no facility to attach filters to file chooser widgets. It would be nice to show the supported exportable file types in the chooser's dropdown.

Items 1 through 4 must be solved before this ticket can be closed.

Item 5 has been filed separately as ticket #1080.

comment:8 Changed 8 years ago by hinerm

comment:10 Changed 8 years ago by hinerm

The ImgSaver class and ImageJ SaveAsImage plug-in have now been tested and fixed on the following branches, respectively:

 https://github.com/ctrueden/bioformats/tree/fix-imgsaver
 https://github.com/imagej/imagej/tree/fix-imageio-plugins

The multi-channel exception was due to passing compositeChannelCount instead of a samples per pixel of 1 (as each channel is separated out to its own plane in ImgLib, which is what's desired by Bio-Formats).

Additional errors were found due to the unsupported pixel types possible in IJ2:
1-bit, 12-bit and signed 64-bit.

If an unsupported pixel type is detected, an exception is now thrown at the ImgSaver level.

Additionally, the axis compression logic was updated to only compress to the Channel axis. ImgSaver can now test and warn when an ImgPlus may require compression (which necessitates a change in the ImgPlus axes)

This ticket is now complete pending the merging of these branches.

comment:11 Changed 8 years ago by curtis

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

The imagej fix-imageio-plugins branch has been merged (see 01844d903371f88df4963fe0e06e8562523c87c2 through 3fb6892817b1d37bf4fc5f90fa4032b283e78c73). The fix-imgsaver branch of Bio-Formats has a  pull request submitted. But in the meantime, we are staging the ImageJ 2.0.0-beta1 release on  a special branch.

So the work necessary for the beta1 milestone is complete.

comment:12 Changed 7 years ago by bdezonia

  • Blocking 1171 added; 1019 removed

comment:13 Changed 6 years ago by bdezonia

  • Blocking 1912 added; 9 removed

comment:14 Changed 6 years ago by curtis

  • Blocking 9 added

(In #9) This ticket is really about improving the infrastructure if I/O for ImageJ2. With SCIFIO, we have now done that. The 2.0.0-beta-7 release is using SCIFIO 0.1.0—File Open and File Save are now extensible—so this ticket is complete.

Remaining tickets about improving the existing I/O mechanism have been migrated to ticket #1920.

Note: See TracTickets for help on using tickets.