preview
preview renders a PNG or JPEG picture of the data: an image plane, a channel composite or a maximum projection; a trace; a mass spectrum; or a plate heat map.
openreadout preview [OPTIONS] <FILE>The kind of picture follows the file: images first, then traces, spectra and plate tables. The trace, spectrum and plate flags pick another. The same request on the same file always gives the same bytes.
Flags
Output
-o,--output FILE:.pngor.jpg;-writes the image to stdout. Default:<input stem>.preview.pngnext to the input.--format png|jpeg: default from the output extension, else PNG.--quality N: JPEG quality, 1–100. Default 90.--max-size N: longest side of the picture in pixels (16–8192), rulers included. Default 1024.--overwrite: replace an existing output file.--json: print the report as JSON.
Images
--image N: image index. Default 0.--select SEL: planes, such asc=1,z=4orc=0,1,z=2. Repeatable. Default: channel 0, the middle z, t 0. Several channels imply--composite.--mip z|t: maximum-intensity projection over z or t, limited to the selected range.--composite: blend all (or the selected) channels in their colours.--level N: pyramid level. Default: the level nearest--max-size.--region X,Y,W,H: only this rectangle, in full-resolution pixels (or in the pixels of--levelwhen one is given).--contrast auto|min-max|percentile:LO,HI|raw:autostretches the 0.1–99.9 percentiles. Defaultauto.--lut gray|channel-color: default gray for one channel, channel colours for composites.--plain: no rulers, scale bar or frame.--grid: faint grid lines at the ruler ticks.
Traces, spectra and plates
--trace N,--sweep N,--channel N: the trace, sweep and channels to draw (--channelis repeatable; default the first 8).--run N,--spectrum N,--scan N: the mass spectrum to draw, by zero-based index or instrument scan number.--centroid: draw the instrument’s centroid list instead of the profile.--table N,--column NAME: the plate table, and the value column of a long layout.
NMR
--process: draw FIDs as spectra processed by OpenReadout.--process-phase MODE,--process-lb HZ,--process-size N,--process-baseline MODE: processing settings. Seeanalyze nmr-peaks.
Examples
$ openreadout preview doctor.tif -o doctor.pngwrote doctor.png (47x49 png, 203 bytes, verified=true): image 0 level 0 c=[0] z=[1] t=[0] contrast percentile:0.1,99.9view it: open (or Read) doctor.png; zoom with --region X,Y,W,H in full-res px read off the rulers (now showing 0,0,16,8)openreadout preview cells.czi --select c=0,1,2 --mip z -o cells.pngopenreadout preview run.raw --scan 1200 -o scan1200.pngZooming into large images
Image previews have rulers along the top and left edges in full-resolution pixel coordinates, whatever level was drawn. Read coordinates off the picture and pass them back as --region X,Y,W,H to zoom in. preview then reads the coarsest pyramid level that still shows the region at --max-size, so zooming into any part of a whole-slide image reads only a few tiles. The JSON report maps picture pixels back to source pixels (image.plot_area, source_origin, source_per_pixel).
JSON
Run openreadout preview --help for the full help of your installed version.