[ome-devel] Discrepancies between IFormatReader and IFormatWriter

Roger Leigh r.leigh at dundee.ac.uk
Sat Sep 6 11:21:18 BST 2014


Hi,

While converting IFormatWriter for the C++ implementation, I ran into a
few minor oddities which I hope can be clarified, primarily lack of
symmetry with IFormatReader:

1. The writer saveBytes method has variants which use Region objects to
specify a 2D tile region.  The equivalent methods are not in the reader
openBytes methods.  Is there a reason for this?

    For C++ we can probably use Boost.MultiArray nD index ranges for
this.  Should this be fixed on the Java side?

2. The reader uses getBitsPerPixel while the writer uses
getValidBitsPerPixel.  Is there are reason for this?  Which is the more
correct form?

3. The writer has a setCodecOptions method, but no getCodecOptions.  Is
there a reason for that?

4. The writer has not been updated to use the coreIndex/subresolution
API.  It's still using get/setSeries only.  While that's probably fine
for writing, should this not be updated to use get/setCoreIndex?

5. The writer has get/setInterleaved methods.  But there are no
corresponding methods for DimensionOrder or use of CoreMetadata.  Why is
there just the one property when the other dimensions are also required?
  How are the main dimensions specified?

6. The writer uses ColorModel, but this is Java AWT-only so won't be
useful for C++ unless I reimplement it directly.  However, I notice the
reader is using get*LookupTable rather than the ColorModel classes.  Why
isn't the writer also using set*LookupTable?  Exactly which features of
the ColorModel classes are required?  If it's only for LUTs, can't we
just use set*LookupTable methods directly and avoid the AWT classes?


Thanks,
Roger

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list