Raw files - custom interpretation of image files

Bsoft offers a "raw" format to be able to load image files where the format is either not supported, or there is a problem with the header information in the file. Any input file name appended with a series of tag-value pairs as described below, invokes an attempt to read the file based on the command-line information given by the user, and to ignore any information in the file header itself. The image file name must be following by a string using the sharp character, "#", as delimiter between tag-value pairs. E.g., to interpret the file "input.file" according to particular data type and size parameters:

bimg -verbose 7 input.file#d=f#x=120,120,55#h=1024 output.map This line will interpret the file as containing a 3D image in floating point format, with the data starting at byte 1024. Typically, the minimum necessary to interpret a file is the data type, the size, and the header bytes to skip

Table 5.3. Tag-value descriptions for custom interpretation of image files

TagValueDescription
hbytesHeader size = initial number of bytes to skip
ddatatype_letterData type character (b, c, u, s, i, f, S, I, F,P)
xsize_x,size_y,size_zImage size in voxels
ppage_x,page_y,page_zPage size in voxels
abytesNumber of bytes to pad between pages
ssampling_x,sampling_y,sampling_zSampling/voxel size in angstrom/voxel
cnumber_channelsNumber of channels (gray scale = 1, RGB = 3)
nnumber_imagesNumber of images in the file
iselected_imageSelect one image to read
ftransform_typen=NoTransform, s=Standard, c=Centered, h=Hermitian, q=CentHerm
b0/1Byte swapping flag
v0/1VAX floating point flag