Skip to main content

Function: compareVoxelQuality()

compareVoxelQuality(record, requirement): VoxelQualityVerdict

Compares one record against the requirement of one reader, and gives the verdict.

The function is pure, and the verdict belongs to the pair of the data and the reader. Two viewports over one volume hold one record and a different verdict at one moment, and both verdicts are correct. A caller can cache a record, and a caller must not cache a verdict.

A view is lossless when each of these holds:

  • the spacing of the data carries one display pixel of the reader, or the reader states no display spacing;
  • the reduction that produced the data does not alias;
  • no more of the region is missing than the reader accepts;
  • the comparable summary reaches the floor that the reader states.

A viewport that shows reduced data at a magnification where the reduction is not visible reports the view as lossless. The user does not get a warning that is not necessary.

Parameters​

• record: VoxelQualityRecord

the absolute record of a region

• requirement: VoxelQualityRequirement = {}

what this reader needs of the data

Returns​

VoxelQualityVerdict

the verdict of this reader

Defined in​

packages/core/src/utilities/voxelGrid/voxelQuality.ts:227