ImgToMat writes the sections of a Priism data stack as separate matrices in a MATLAB workspace file. This file can be read from MATLAB using the load command. The user interface uses the typical set of controls for selecting an input file, selecting a region from that file, and stopping or starting the conversion. Besides MAT file for specifying the name of the generated work file, the controls specific to ImgToMat are Scale to 255, MATLAB 4 format, MATLAB type, and Complex values.
Each variable, of the form A# in the created workspace references the data from one section in the input (the one exception is the option to split complex data into real and imaginary parts). The numbering of the variable names is the numbering of the sections as they would appear when interleaved as z, time, and wave (i.e. the contiguous z sections for the first time point and first wave have the lowest numbers (0, ...) followed by the z sections for the second time point and first wave and so on).
ImgToMat uses the MATLAB shared libraries and those will have to present on your computer for ImgToMat to be able to convert files. For Linux and Mac OS X, ImgToMat expects the MATLAB 6 libraries; for IRIX, ImgToMat 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 ImgToMat 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.
Overview | Dialog | Scaling | MATLAB 4 | MATLAB type | Complex values | Command line
When Scale to 255 is selected, the data values in the output are linearly scaled to lie in the range of 0 to 255 inclusive. The range of input values in each wave mapped is specified by the first two scaling parameters for that wave if a window is used as input or the minimum and maximum for the wave recorded in the Priism header. Points outside the range are mapped to the endpoints.
Overview | Dialog | Scaling | MATLAB 4 | MATLAB type | Complex values | Command line
When MATLAB 4 format is selected, the workspace files generated are readable by MATLAB version 4; otherwise, the workspaces are for MATLAB 5 or 6.
Overview | Dialog | Scaling | MATLAB 4 | MATLAB type | Complex values | Command line
You can specify the encoding for values in the workspace file. By default, values will be encoded as 64-bit floating-point values. The other choices are 32-bit floating-point values, 8-bit signed integers, 16-bit signed integers, 32-bit signed integers, 8-bit unsigned integers, 16-bit unsigned integers, and 32-bit signed integers. The conversion will round to the nearest integer when converting floating-point types to integral ones. Values beyond the range of the destination type are changed to the closest value that the destination type can represent.
Overview | Dialog | Scaling | MATLAB 4 | MATLAB type | Complex values | Command line
When working with complex valued input data, you can select the "interleaved" option in the "Complex values" menu to write the sections as complex-valued matrices, or you can select the "planar" option in the "Complex values" menu to write a section of complex-valued data with one real-valued matrix for the real components and another real-valued matrix for the imaginary components. When written as complex numbers, the matrices in the output follow the naming convention described in the overview. When the components are split, I is used in place of the initial A in matrix names for the matrices holding the imaginary components.
Overview | Dialog | Scaling | MATLAB 4 | MATLAB type | Complex data output | Command line
ImgToMat accepts the command-line arguments described in Region.html. In addition, ImgToMat has the following options:
-format=fmt-matlab4-noscale-out=filename-splitAs an example, the command-line below stores all the sections from a.dat as matrices in the MATLAB workspace file, a.mat. The data values are not scaled to the range of 0 to 255.
ImgToMat a.dat -out=a.mat -noscale
Overview | Dialog | Scaling | MATLAB 4 | MATLAB type | Complex values | Command line