Fixed ome.scifio.util.FormatTools getZCDCoords

getZCTCoords was using the number of images instead of the number of
planes in the ome.scifio.util.FormatTools implementation.

Fixed this and renamed variables to make it a bit clearer. Updated
references/uses with appropriate signature.
Implement SCIFIO ICSWriter

Added a first pass implementation of ICSFormat.Writer.

The existing loci.formats.out.ICSWriter was converted to a delegator.
Moved loci.formats ICSWriter to BFLegacy

As the loci.formats.out.ICSWriter is now a delegator to SCIFIO with no
dependencies, it belongs in the bio-formats-legacy component.
Updated ICSOMETranslator

ICSOMETranslator was updated based on the most recent OME-XML population
code from develop:loci.formats.ICSReader
Added filtered flag to Metadata

The ome.scifio.Metadata class now tracks whether or not it was filtered
during Parsing.

Added a getter method in the Metadata interface, an implementation in
the abstract layer, and setting the flag in the AbstractParser.
Cleaned up APNGOMETranslator imports

Removed unused import
Converted FormatReader methods to static tools

All methods in loci.formats.FormatReader that were necessary for ICS
OME-XML generation were moved to OMEXMLMetadataTools.

These methods seemingly had no dependency on the state or particular
instance of FormatReader, thus the transfer to a static utility class.

All FormatReader methods that were converted were set up to delegate to
their new location.
ome.scifio.Metadata tracks MetadataOptions

The ome.scifio.Metadata classes will now remember what MetadataOptions
were used to generate them.

The getMetadataOptions method was added to the Metadata interface, with
an implementation in the AbstractMetadata layer.

To facilitate this tracking, Parsers will now set the MetadataOptions of
their parsed Metadata - handled automatically in the AbstractParser
layer.
Removed OMEXMLMetadataTools IFormatReader refs

To remove all references of loci.formats from ome.scifio and ome.xml
classes, OMEXMLMetadataTools was refactored to use
ome.scifio.CoreMetadata objects to populate pixels instead of
IFormatReaders.

The corresponding calls in loci.formats.MetadataTools were thus updated
to construct an ome.scifio.CoreMetadata object using the IFormatReader,
and then delegate to OEMXMLMetadataTools.
Implemented ICSOMETranslator

First implementation of the ICSOMETranslator, which generates
OMEXMLMetadata from ICSMetadata.
Bug fix: version 1 ics writing

Because ICS writing depends on flags in the ICSFormat.Metadata class,
and these values were being directly copied from the Reader Metadata
(if reading and writing ICS) or not populated at all (if translating
to ICS), these flags were never correctly seti, causing the .ics file
not to be generated when writing version 1 ICS.

To fix this, the string-based setDest methods will now set the
Metadata's idsId appropriately. This will cause the accompanying .ics
file to be properly generated when writing version 1 ICS files.

Additionally an unnecessary null check was removed, as the object
(pixels) could only be null at that point.

Note that this solution puts an implicit requirement on calling the
String-based setters. This solution should either be migrated to the
RAOS-based signature, or the unsafe signatures should be marked
upsupported.

Further note that this solution is functional when provided a .ids dest,
but needs to be extrapolated for the .ics dest case.
Added helper methods seting ICSWriter ics/ids id

Extracted the logic to generate equivalent ics/ids ids to their own
helper methods, and applied these methods to the setDest(String...)
signatures to populate both the ics and ids id.

This allows the user to specify either a .ics or .ids output file path
and have both files generated appropriately when writing version 1 ICS
files.
Corrected loci.formats.in.APNG reader construction

The delegating APNGReader was mistakenly creating an
ome.scifio.ICSReader for delegation.

It now creates an ome.scifio.APNGReader as intended.
Removed unnecessary setSource calls to delegates

The ICSReader and APNGReader in loci.formats.in were unnecessarily
calling setSource after setId was invoked on the parent reader.

The setId shell in the SCIFIOFormatReader already calls setSource.
Corrected CoreMetadata generation in SCIFIOReaders

The SCIFIOFormatReader now initializes the ome.scifio.CoreMetadata array
before trying to access it, and builds a number of
loci.formats.CoreMetadata equal to the series count.
Parsers now set the context of their Metadata

As it cannot be guaranteed that a parsed metadata will have its context
set (e.g. if created by Format.createMetadata), if the context is null
the Parser will set it.
Restricted axes list to Bio-Formats compatible

When determining the axis order for SCIFIO axes, only the standard
bio-formats dimensions will be considered for the time being, to
preserve backwards compatibility.

This should eventually be modified to detect if the order request comes
from loci.formats or ome.scifio classes and respond appropriately.
Scifio translators preserve implicit Metadata

The small amount of state that is tracked by Metadata (regarding how it
was created - i.e., filtered, metadataoptions, and source) are now
maintained through translation, as these properties are common to all
Metadata implementations.

Added protected setters in the AbstractMetadata layer to facilitate the
preservation of the data, and the AbstractTranslator now automatically
carries out the transfer.

These changes also required that all AbstractTranslator extenders make a
super.translate call.
ICSOMETranslator uses source.isFiltered

To check if the metadata is filtered, the ICS - OME translator now uses
the appropriate metadata method, instead of hard-coding.
fix: returned legacy apng/ics reader/writers to loci.formats