ImgToMat

Overview

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, and Output type.

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). Data values in the generated matrices are represented with double-precision floating-point numbers.

The Priism 3.3 version of ImgToMat requires the MATLAB 5 shared libraries (these are stored in a subdirectory of extern/lib in the MATLAB distribution). These files must be accessible from the computer on which MatToImg is run and the location of the libraries should be included in the LD_LIBRARY_PATH environment variable (or some equivalent method so the dynamic loader, rld, can load the libraries when MatToImg is run). The Priism 3 version is a stand-alone program that does not require anything beyond what is needed for other Priism applications.

Topics

Overview | Dialog | Scaling | MATLAB 4 | Complex data output

Related Priism Topics

MatToImg | Priism | Categories | Applications


Scaling

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.

Topics

Overview | Dialog | Scaling | MATLAB 4 | Complex data output


MATLAB 4

When MATLAB 4 format is selected, the workspace files generated are readable by MATLAB version 4.*; otherwise, the workspaces are for MATLAB 5.*. This option is only available in the Priism 3.3 version of ImgToMat since the Priism 3 version always writes workspaces compatible with MATLAB version 4.*.

Topics

Overview | Dialog | Scaling | MATLAB 4 | Complex data output


Complex data output

When working with complex valued input data, you have the option to write the sections as complex-valued matrices or as separate real-valued matrices for the real and 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 imaginary components.

Topics

Overview | Dialog | Scaling | MATLAB 4 | Complex data output