Commit 9bf6109
committed
VSI: surface CALIBRATION lookup table as named slope/origin/final keys
Tag 20051 (CALIBRATION) sub-volumes carry a piecewise-linear
lookup table mapping a raw axis (e.g. uint16 pixel value) to a
calibrated axis (e.g. Z position in micrometres for DSX EFI height
maps, or intensity in counts for deconvolved fluorescence). PR #4417
named the tag but the underlying value is currently surfaced (when
it makes it through the metadataIndex/VALUE filter at all) as a
single comma-separated string of every (raw, calibrated) pair, which
is unwieldy and silently dropped for some file types (e.g. Olympus
DSX-2000 collapsed-EFI height maps).
Since the LUT is linear by construction, expose the same information
as four scalar named keys instead:
Calibration Function Slope : (cal_last - cal_first)/(raw_last - raw_first)
Calibration Function Origin : cal value at raw_first
Calibration Function Final : cal value at raw_last
Calibration Function NPoints : number of (raw, cal) pairs
Origin and Final together work for both monotonic directions (DSX
EFI height maps decrease, deconvolved fluorescence increases).
Validated against ten DSX-2000 EFI height-map .vsi acquisitions and
the public CellSens samples on downloads.openmicroscopy.org/images/
CellSens/. Each file with a properly-formed CALIBRATION sub-volume
now produces the four-scalar summary; files without the tag remain
silent.
Refs: #4398, #4417
Signed-off-by: Brenden Ferland <brendenferland@gmail.com>1 parent 877c317 commit 9bf6109
1 file changed
Lines changed: 31 additions & 0 deletions
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
1865 | 1896 | | |
1866 | 1897 | | |
1867 | 1898 | | |
| |||
0 commit comments