writerawblock

Syntax: writerawblock(input image, filename, position, file dimensions, source position, source block size)

Write an image to a specified position in a .raw file. Optionally can write only a block of the source image. Dimensions of the .raw file do not need to be specified if the file name is in format name_WxHxD.raw, where [W, H, D] are the dimensions of the image. The system tries to guess the pixel data type, too, based on the file size and dimensions of the image as follows. If pixel size in bytes is 1, the system sets the pixel type to uint8. If pixel size in bytes is 2, the system sets the pixel type to uint16. If pixel size in bytes is 4, float32 pixel data is assumed (instead of e.g. int32 or uint32). If pixel size in bytes is 8, pixels are assumed to be of type uint64 (instead of e.g. int64 or complex32). If the guess is wrong, the pixel data type must be explicitly specified using the corresponding argument. Even in this case the dimensions can be read from the name of the file if the file name contains the dimensions.

This command cannot be used in the distributed processing mode. If you need it, please contact the authors.

Arguments

input image [input]

Data type: uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image, complex32 image

Image to save.

filename [input]

Data type: string

Name (and path) of file to write.

position [input]

Data type: 3-component integer vector

Position of the image in the target file.

file dimensions [input]

Data type: 3-component integer vector

Default value: “[0, 0, 0]”

Dimensions of the output file. Specify zero to parse dimensions from the file name.

source position [input]

Data type: 3-component integer vector

Default value: “[0, 0, 0]”

Position of the block of the source image to write.

source block size [input]

Data type: 3-component integer vector

Default value: “[0, 0, 0]”

Size of the block to write. Specify zero to write the whole source image.