[ome-devel] [ome-files-cpp] Cannot Write Multiple ROIs to Image Plane Using SaveBytes

Roger Leigh rleigh at codelibre.net
Thu Jun 21 14:30:13 BST 2018


On 21/06/18 09:08, Roger Leigh wrote:
> On 20/06/2018 18:05, Dennis Ai wrote:
>> Roger,
>>
>> Thanks for the explanation.  Unfortunately, I am still running into 
>> the same problem.

> At the moment the behaviour is fixed.  However, please see 
> https://github.com/ome/ome-files-cpp/issues/97 which I just created.  It 
> looks like it should be a relatively simple tweak to this method:
> 
> 
> https://github.com/ome/ome-files-cpp/blob/master/lib/ome/files/tiff/IFD.cpp#L345 
> 
> 
> to alter the behaviour.  Right now it finishes as soon as it encounters 
> an incomplete or missing tile.  Given the freedom to flush tiles as soon 
> as they are fully covered we could simply change those break statements 
> into continue statements.  However, this would be inefficient for images 
> with thousands of tiles.  It would make more sense to mark completed 
> tiles and then iterate over and flush these specifically.  This could be 
> done by either adding a covered flag to the TileCache value_type, or by 
> maintaining a separate list of covered tiles.

Dear Dennis,

If you would like to have a look at

   https://github.com/ome/ome-files-cpp/pull/99

this updates the cache flushing to opportunistically flush every tile if 
it's fully covered.  This should make it possible to write out the tiles 
by column (rather than by row) without resulting in a huge tile cache 
and a sudden burst of disc I/O at the very end.  Hopefully this resolves 
the above concern.  If you would like to test it, I would be very 
interested in your results.


Regards,
Roger


More information about the ome-devel mailing list