Prd
linc_convert.utils.io.prd ¶
Load Kinetix .prd image stacks from local disk.
A .prd file is:
[ header ][ frame 0 ][ gap ][ frame 1 ][ gap ] ... [ frame N-1 ][ padding ]
Each frame is width * height little-endian uint16 pixels stored row-major.
There is a gap of padding bytes between frames but not after the last one.
The geometry parameters are read from a kinetixMetadata.txt file sitting
next to the .prd file(s):
16 # data type, uint16
1000 # width
400 # height
8272 # header bytes
2661 # expected frames per full file
6912 # gap bytes (between frames, not after last frame)
PrdSetInterpreter ¶
PrdSetInterpreter(prd_set_path)
Assemble prd files into a single 3D volume with a Dask array.
read_kinetix_metadata
staticmethod
¶
read_kinetix_metadata(path)
Parse a kinetixMetadata.txt file into its geometry parameters.
path may be the metadata file itself or a directory containing it.
get_prd_files
staticmethod
¶
get_prd_files(path)
Return the .prd files for prd_set_path, in acquisition order.
assemble ¶
assemble()
Assemble all prd files into a single 3D volume with a lazy Dask array.
Returns:
| Type | Description |
|---|---|
A Dask array of shape (frames_total, height, width), where
|
|
frames_total is the sum of the frame counts across all `.prd` files.
|
|