MatToImg takes a MATLAB workspace file and converts it to Priism's native format for image stacks. MATLAB workspace files typically have a .mat extension and are created with MATLAB's save command. The conversion takes only two parameters: MAT file is the name of the MATLAB workspace file to read and IVE file is the name of the Priism file to generate.
If MatToImg is invoked with something other than two arguments, it will display a graphical user interface for entering the MAT file name and IVE file name. If it is invoked with two arguments, no user interface will be displayed: the first argument is used as name of the MAT file to read and the second is used as the name of the IVE file to generate.
MatToImg uses the MATLAB shared libraries and those will have to present on your computer for MatToImg to be able to convert files. For Linux and Mac OS X, MatToImg expects the MATLAB 6 libraries; for IRIX, MatToImg expects the MATLAB 5 libraries (a patch is available that will allow it to work with the MATLAB 6 libraries). The easiest way to configure MatToImg so that it finds the shared libraries is to rerun the post-installation script for Priism; that script will ask you the location of the directory that contains MATLAB.
The output file is a three-dimensional data stack where each two-dimensional z section represents a two-dimensional matrix stored in the workspace file or a slice (where the first two dimensions vary) through a three- or higher dimensional matrix. The sections in the output are filled by taking (and slicing as necessary) the matrices in the order in which they appear in the workspace file. The slices from higher dimensional matrices appear in adjacent z-sections. The matrices must all have the same first two dimensions and must all be real-valued represented as double-precision floating-point or must all be complex-valued represented as double-precision floating-point. If these conditions are not met, MatToImg will issue a warning about not being able to read the workspace file.
The inverse of MatToImg, ImgToMat, generates workspace files which can be used as input to MatToImg.