go2scope / MM-storage-api

MMCore API proposal
0 stars 0 forks source link

Random access or append only? #3

Open go2scope opened 7 months ago

go2scope commented 7 months ago

Here is another topic. The API I proposed allows us to insert images in any order regardless of the specified order of dimensions. This would be a "random access insert" paradigm. It was trivial to implement in the old micro-manager format because each image was a separate tiff. The acquisition order was irrelevant to the writer.

Some of (or all) of today's popular formats would have trouble with random access image inserts. To allow random coordinate inserts, the StorageDevice might be required to cache all data in memory. Or, to make the implementation more straightforward, the adapter would have to raise an exception if the image is not inserted in the correct order.

Do we need to create an "append only" API? In that case, we can only append images, and the order is implied, as the declared order of dimensions is at the opening of the dataset. This would be probably too limiting, but not sure...