Quicklooks are of particular importance when needing to quickly look over many products to determine outliers or anomalies.

Quicklooks should be generated quickly and with a small memory footprint.

Products can be read from a file format which cannot be written to or within an archive which makes it inconvenient to add new files.

Quicklooks should be created lazily on demand.

There could be more than one quicklook per product.

Quicklooks may be of different dimensions.

If a product comes with a quicklook, browse or preview image, the reader shall generate a quicklook from this.

Products should specify a quicklook band name.

Products with a file and reader will call first the reader to generate a quicklook on demand. If there are no file and reader or the reader does not have a quicklook, then the quicklook shall be generate based on the given quick look band name of the product.

Generated quicklooks will optionally be stored with the product if the product reader says files can be appended to the product. If the product is a compressed archive then quicklooks should not be added to the product.

If files are allowed to be appended to the product, the product reader will specify which folder quicklooks may be written to.

If quicklooks cannot be written with the product or the user prefers not to, then quicklooks will be written to a centralized database in .snap/ for fast loading in the future.


Adding Quicklooks to a Product

If a product comes with a preview image or browse image, the reader should add it to the product as follows:

product.getQuicklookGroup().add(new Quicklook(product, Quicklook.DEFAULT_QUICKLOOK_NAME, qlFile));

An RGB can be created by passing the array Bands or by creating new virtual bands as follows:

product.getQuicklookGroup().add(new Quicklook(product, "Pauli", pauliBands));