-
Notifications
You must be signed in to change notification settings - Fork 10
CLI: Multi‐resolution Decoding
SPERR supports "Multi-resolution Decoding," meaning that a hierarchy of the data with coarsened resolutions can be obtained in a decoding pass. Representations with lower resolutions of the slice/volume can be used to perform quick visualizations/examinations. To obtain lower resolutions of the decoded data, one just needs to specify the output filename using options --decomp_lowres_f
or --decomp_lowres_d
in utilities sperr3d
and sperr2d
. There's negligible performance penalty to multi-resolution decoding compared to regular (full-resolution) decoding, mostly concerning additional memory operations.
In this example, we use one of the example data fields wmag91.float in this repository. First we compress and obtain a compressed bitstream: wmag.stream
.
./bin/sperr3d -c --dims 91 91 91 --ftype 32 --bitstream wmag.stream --bpp 5.0 ./wmag91.float
We then decompress the encoded bitstream. Note that the option --decomp_f
specifies that we want the reconstruction in full resolution, and the option --decomp_lowres_f
specifies that we want the data in lower resolutions too.
./bin/sperr3d -d --decomp_f wmag.decomp --decomp_lowres_f wmag.lowres ./wmag.stream
At this point, we obtain the decompressed volume in the full resolution as well as in lower resolutions:
-
wmag.decomp
: the full-resolution version, and four low-res versions: wmag.lowres.46x46x46
wmag.lowres.23x23x23
wmag.lowres.12x12x12
-
wmag.lowres.6x6x6
.
In 3D cases, there are a few considerations to make sure that multi-resolution is available during decoding. Specifically, one needs to pick chunk dimensions carefully so that:
- The full volume dimension is perfectly divisible by the chunk dimension.
- The chunk dimension is approximately equal in X, Y, and Z directions.
In practice, one can always use the --decomp_lowres_f
(or --decomp_lowres_d
) option in sperr3d
to see if lower-resolutions are produced.
Lossy Scientific data compression with SPERR