| storageDescriptor | R Documentation |
A storage descriptor says how the values of an image sit in a stream of
bytes: their type, byte order and position, any scaling applied to them, and
the order of the image's axes in the stream. It deliberately says nothing
about any particular file format. A format package parses a header into a
descriptor, and readImageData() and writeImageData() do the rest.
storageDescriptor(
type,
endian = "little",
offset = 0,
slope = NULL,
intercept = NULL,
layout = NULL,
bitOrder = "lsb"
)
type |
The stored data type, as above. |
endian |
The byte order of the stream: |
offset |
The position of the first value, in bytes from the start of the stream. |
slope, intercept |
Scaling, as |
layout |
How the image's axes map onto the order of values in the
stream, as described for |
bitOrder |
For |
Types are named by size and signedness: "int8", "uint8", "int16",
"uint16", "int32", "uint32", "int64", "float32", "float64",
"complex64" and "complex128", plus "rgb24" and "rgba32" for colour
and "bit" for one bit per value. The C-style names "char", "int",
"float" and "double" are accepted too, as "int8", "int32",
"float32" and "float64" respectively. C leaves the signedness of char
to the platform, so it is fixed as signed here; use "uint8" for unsigned
bytes.
When read, integer types of up to 32 bits become R integers unless scaled, and wider integers, floating-point types and scaled values become doubles. 64-bit integers beyond 2^53 cannot be held exactly as doubles and are refused. Colour values become integers from 0 to 255, with an extra trailing dimension of three or four channels. Bits become logical values. Scaling is not applied to complex or colour data.
An object of S7 class storageDescriptor.
storageDescriptor("int16", endian = "big", offset = 352)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.