[ome-devel] Discrepancies between IFormatReader and IFormatWriter

Roger Leigh rleigh at dundee.ac.uk
Mon Sep 8 14:36:28 BST 2014


On 06/09/14 11:21, Roger Leigh wrote:
> 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?

7. Are get/setFramesPerSecond used and/or useful?  Looking at the code,
they aren't used by the Java writer in any meaningful way?  Can these be
omitted from the C++ code?

8. Unlike IFormatReader, there's no getUnderlyingWriters to get hold of
wrapped writers.  Is that intentional, or could this be added?


Thanks,
Roger

--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364

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


More information about the ome-devel mailing list