Cross Sections: Difference between revisions

From OKOS Wiki
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
No edit summary
Line 1: Line 1:
[[File:CrossSectionExample.PNG|thumb|right|Image with cross section display turned on]]
[[File:CrossSectionExample.PNG|thumb|right|Image with cross section display turned on]]
The user can show a cross section profile of an image by pressing the cross-section button at the top right of the image area.
The user can show a cross section profile of an image by pressing the cross-section button at the top right of the image area.
<br clear="all"/>


==Saving Cross Section Data==
==Saving Cross Section Data==

Revision as of 14:18, 10 June 2026

Image with cross section display turned on

The user can show a cross section profile of an image by pressing the cross-section button at the top right of the image area.


Saving Cross Section Data

By right-clicking on the cross cross section region, the cross section data can be saved to a file in the following formats:

  • XML
  • CSV
  • Binary (See below)
  • JSON


Binary Format

The Cross Section binary format is as follows. All numeric values are little-endian format.

  • A header consisting of:
    • 1-byte version #
    • 4-byte String ID in ASCII ("OKOS")
  • Horizontal Cross-section data:
    • 1-byte id for the Horizontal cross section data (ASCII "H")
    • 4-byte (int32) # of horizontal cross sections. As of this writing it should only be 1.
    • 4-byte (int32) Minimum cross section raw value (e.g., 0)
    • 4-byte (int32) Maximum cross section raw value (e.g. 128 for 8-bit data)
    • 8-byte (double) Minimum cross section value in units (e.g. 0 )
    • 8-byte (double) Range of cross section values in units (e.g. 100)
    • 4-byte (int32) length of the units string (below)
    • n-byte ASCII representation of the cross section value units (e.g. "%FSH")
    • 8-byte (double) of the resolution between samples
    • 4-byte (int32) length of the sample units string (below)
    • n-byte ASCII representation of the sample units string (e.g. "mm")
    • 4-byte (int32) number of cross section samples
    • n-byte (int32) cross section samples. each sample is a 4-byte integer.
  • Vertical cross section data:
    • 1-byte id for the Vertical cross section data (ASCII "V")
    • All other entries are identical to the Horizontal cross-section data description above.