BIAC MATLAB Users,
BIAC is preparing to release a new version of the BIAC MATLAB software within the next few weeks. The most significant changes will be a complete rewrite of the readmr and writemr functions and modifications of many programs to support BXH data.
BXH enabled readmr and writemr
The readmr and writemr functions have been rewritten to include the following features:- Read and write BXH format.
- Automatically detect and read formats with headers. (BXH, DICOM, SignaXIMG, Signa5, Analyze7.5_SPM)
- New "Raw" format which can be used to read other N-dimensional data formats.
- New GUI for reading the data.
- Return variable includes additional information (voxel size, orientation, etc).
readmr now returns a structure containing additional information about the image in addition to the voxels values themselves. The data can be accessed using .data after the variable name (e.g. srs.data) and the additional information about the image can be accessed using .info after the varaible name (e.g. srs.info). If you want to perform mathematical operations on the data itself you could do the following:img = readmr('mydata.bxh')
meanImg = mean(img.data,4);The new versions of readmr and writemr support the following old syntaxes for backwards compatibility with existing scripts:[srs,name,params]=readmr(fName,xSz,ySz,zSz,cannedFormat);
[srs,name,params]=readmr(fName,xSz,ySz,zSz,hdrSz,pixelType,byteOrder,allInOne,startExt);
writemr(fName,srs);
writemr(fName,srs,cannedFormat);
The only intended backward-*in*compatible change should be the return type of readmr when called without arguments. This will not only use the new GUI, but it will also return the new mr structure. In all other respects the use of old and new calling conventions for readmr and writemr should be transparent. Please report any glitches.
readmr and writemr can now handle 4D data, so there is no need to use readtsv and writetsv anymore. These functions have been still exist for backwards compatibility, but readmr and writemr should be used instead.
Function support for BXH data
A number of functions have been updated to read and generate BXH data. Most notably, mrtest, tstatprofile2, splinealignmr, and qastats2 now support BXH. showsrs2 also will automatically determine the orientation and voxel size from the image if it has already been specified.