Visualization - Data-Acquisition-and-Processing-Lab/ECTsim GitHub Wiki

drawElectricField

Draws a selected component or modulus of the electric field.

Usage: [] = drawElectricField(model, mode, part, comp, electrode, method);

  • model - Numerical model structure.
  • mode - Display mode ('px' for pixels, 'mm' for millimeters).
  • part - Part of the field to display ('real', 'imag').
  • comp - Component of the field to display ('Ex', 'Ey', 'Em' for modulus).
  • electrode - 0 to map potential for every electrode, or a specific electrode number to map only that electrode.
  • method (optional) - Method of presentation for 3D ('mpr' or 'slice').

drawInterpreter

Interprets parameters selected by the user, used by drawMap and drawInvpMap.

Usage: [sets] = drawInterpreter(varargin);

Varargin values can be in any order:

  • sets.mode - 'mm' or 'px'.
  • sets.part - 'real' or 'imag', applicable to potential, electric field, and sensitivity matrix.
  • sets.electrode - Number of electrode or pair of electrodes.
  • sets.method - 'mpr', 'surf', or 'slice' (only for 3D).
  • sets.ix - Indices of mesh elements to present; 0 indicates the whole matrix will be presented.

drawInvpMap

Draws maps of selected parameters for the inverse problem.

Usage: [] = drawInvpMap(model, parameter, varargin);

  • model - Structure with numerical model description.
  • parameter - Parameter to be presented:
    • 'permittivity' - Permittivity distribution.
    • 'conductivity' - Conductivity distribution.

Varargin values are interpreted by drawInterpreter and can be provided in any order.

drawMap

Draws maps based on selected parameters.

Usage: [] = drawMap(model, parameter, varargin);

  • model - Structure with numerical model description.
  • parameter - Parameter to be presented:
    • 'V' - Electric potential distribution.
    • 'Em', 'Ex', 'Ey', 'Ez' - Electric field distribution components.
    • 'S' - Sensitivity matrix.
    • 'pattern' - List of elements in the model.
    • 'permittivity', 'epsilon' - Permittivity distribution.
    • 'conductivity', 'sigma' - Conductivity distribution.

Varargin values are interpreted by drawInterpreter and can be provided in any order.

drawPatternImage

Draws a pattern image representing the distribution of objects in the model.

Usage: [] = drawPatternImage(model, mode, method);

  • model - Numerical model structure.
  • mode - 'px' for pixels, 'mm' for millimeters.
  • method (optional) - Presentation method for 3D ('surf', 'mpr', or 'slice').

drawPotential

Draws potential maps for selected excitations.

Usage: [] = drawPotential(model, mode, part, electrode, method);

  • model - Numerical model structure.
  • mode - 'px' for pixels, 'mm' for millimeters.
  • part - 'real' or 'imag'.
  • electrode - 0 for potential maps of every electrode, >0 for only the selected electrode.
  • method (optional) - Presentation method for 3D ('mpr' or 'slice').

drawSensitivityMap

Draws sensitivity maps for specified electrodes.

Usage: [] = drawSensitivityMap(model, mode, part, draw, method);

  • model - Numerical model structure.
  • mode - 'px' for pixels, 'mm' for millimeters.
  • part - 'real' or 'imag'.
  • draw - Application electrode number or a pair of electrodes [e1, e2], e.g., [2, 13].
  • method (optional) - Presentation method for 3D ('mpr' or 'slice').

MPR

Multiplanar reconstruction (MPR) is a method for 3D data presentation that displays three cross-sections (xy, xz, yz) in separate images. Users can change the displayed image by clicking in the desired location with the left mouse button, where crosshairs indicate the current position. Dragging the right mouse button adjusts the 'w' and 'c' parameters of windowing. This method can be used by drawMap and drawInvpMap for 3D data.

Usage: [] = mpr(data, varargin);

  • data - 3D matrix with values to be presented.
  • If varargin:
    • mesh - Structure with X, Y, and optionally Z meshgrid lists of pixel coordinates.

oneSliceView

This function presents a single slice from a dataset, primarily used for 2D data presentation. Dragging the right mouse button adjusts the 'w' and 'c' parameters of windowing. This method is used by drawMap and drawInvpMap for 2D data.

Usage: [] = oneSliceView(data, varargin);

  • data - 2D matrix with values to be presented.
  • If varargin:
    • mesh - Structure with X and Y meshgrid lists of pixel coordinates.

plotMeasurement

Plots mutual measurements of electrodes, with a maximum of 8 plots at a time.

Usage: [] = plotMeasurements(mode, part, index, modelList, nameList);

  • mode - Display mode ('linear', 'log').
  • part - Type of measurement ('C' for capacitance, 'G' for conductance).
  • index - Range of displayed pairs of electrodes (e.g., [1:31]).
  • modelList - List of models (e.g., {modelMin, modelMax}).
  • nameList (optional) - Names for capacitance vectors used in legends (e.g., {'min', 'max'}); defaults to model1, model2, etc., if not provided.

plotNorm

Plots norms calculated during the reconstruction process.

Usage: [] = plotNorm(parameter, model, name, part);

  • parameter - Norm to plot ('residue' or 'error').
  • model - Structure with a numerical model description of the inverse problem.
  • name - List of model names (e.g., {'LBP', 'PINV'}).
  • part (optional) - Specifies whether to plot the real or imaginary part of the norm.

shadedSurfaceDisplay

Presents 3D data using Phong shading, primarily used for displaying permittivity and conductivity distributions by drawInvpMap and drawMap.

Usage: [] = shadedSurfaceDisplay(patternImage, varargin);

  • patternImage - 3D matrix with parameter values to be presented.
  • If varargin:
    • mesh - Structure with X, Y, and Z meshgrid lists of pixel coordinates.

shadedSurfaceDisplayPattern

A specific version of shadedSurfaceDisplay used for presenting lists of model elements, typically used by drawPatternImage with the 'surf' method.

Usage: [] = shadedSurfaceDisplayPattern(patternImage, varargin);

  • patternImage - 3D matrix with numbers indicating the numbering of elements in the model.
  • If varargin:
    • mesh - Structure with X, Y, and Z meshgrid lists of pixel coordinates.

sliceView

Presents a single image slice from 3D data (a slice across the Z-axis). Users can view different cross-sections by clicking and dragging the left mouse button from left to right or bottom to top. Dragging the right mouse button adjusts the 'w' and 'c' parameters of windowing. This method is used by drawMap and drawInvpMap for 3D data.

Usage: [] = sliceView(data, varargin);

  • data - 3D matrix with values to be presented.
  • If varargin:
    • mesh - Structure with X, Y, and Z meshgrid lists of pixel coordinates.