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.
ome.scifio.Readers reset CoreMetadata

When setting the Metadata for an ome.scifio.Reader, the AbstarctReader
will now re-initialize the CoreMetadata, instead of continuously adding
to 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.
Created ome.xml.meta.MetadataTools

Copied existing scifio MetadataTools class to ome.xml.meta.

This class will contain all MetadataStore/MetadataRetrieve methods,
facilitating the removal of these classes from SCIFIO, and allowing
delegation from loci.formats/Bio-Formats classes.
Trimmed MetadataTools classes

ome.xml.meta.MetadataTools now contains all methods pertinent to working
with MetadataStores and MetadataRetrieves. Equivalent methods for
working with ome.scifio.CoreMetadata objects remain in
ome.scifio.util.MetadataTools.

loci.formats.MetadataTools has had all functional code removed
(transferred to ome.xml.meta.MetadataTools) and now properly, fully
delegates.
Renamed ome.scifio.util.MetadataTools

Renamed to SCIFIOMetadataTools to explicitly classify its scope.

Updated references.
Renamed ome.xml.meta.MetadataTools

Renamed to OMEXMLMetadataTools to explicitly specify scope.

Updated references.
Fixed ome.scifio.util.FormatTools getZCTCoords

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.
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.