saalfeldlab / render

Render transformed image tiles
GNU General Public License v2.0
33 stars 32 forks source link

Change order of sanity check and downsample removal #190

Closed minnerbe closed 4 months ago

minnerbe commented 4 months ago

This is to fix an issue with the append mode of the N5 client: if one of the sanity checks in setupAppendExportN5 fails, the whole process is aborted. However, the downsampled data was already removed at this point, rendering the existing N5 invalid.

By changing the order, the sanity checks should abort before touching the N5.

There is one thing I'm not sure about: setupAppendExportN5 updates some metadata of the N5. Is it ok to do this before removing the data, or is the metadata used in the removal process?