mapImage.mapImage edit page

an image that knows where on the specimen it sits

A raster of values - a forescatter or backscatter image, a band contrast map, any per pixel quantity - together with the geometry that says which part of the specimen each pixel covers. That is what makes an image and an EBSD map comparable objects rather than an array plus a pixel size and a convention held in someone's head.

The grid is REGULAR: an origin and two perpendicular step vectors, with pos derived rather than stored. This is the difference from EBSDgrid, which stores pos per pixel so that a measured grid may be rotated, sheared or smoothly distorted. An image is none of those - a distortion is applied by resampling onto a new regular grid, never by moving grid points - so the general contract would only mean permitting states that cannot arise.

An EBSD map joins a sequence of images as one of them, carrying the map along with whichever channel is to be registered on:

mapImage(ebsd.bc,ebsd)

so a whole sequence is one mapImage array rather than a list of two different things.

An image pre-processed for registration - gamma compressed, filtered - is an entry of its own, with spatialTransformId as the transform between it and the image it was derived from. Nothing here declares what to register on: that is a fact about a comparison, so it belongs to the job.

Syntax

mg = mapImage(img)                        % unit step, its own frame
mg = mapImage(img,'dxy',0.05)             % square pixels
mg = mapImage(img,'dxy',[dx dy])
mg = mapImage(ebsd.bc,ebsd)               % a channel of a gridded map
mg = mapImage(img,ebsd)                   % an image already on the map's grid
mg = mapImage(img,'dxy',0.05,'name','bse')

Input

img r × c × k numeric, integer types scaled to [0,1]
ebsd EBSD, gridded and square

Output

mg mapImage

Options

dxy pixel size, scalar or [dx dy]
name a valid MATLAB identifier, the field an aligned image is written under
origin vector3d position of pixel (1,1)
scanUnit unit of the positions, default 'um' or the map's own

Class Properties

img r × c × k values
name what this image is called
ebsd EBSD on the same grid, empty if there is none
origin vector3d, the position of pixel (1,1)
d1, d2 vector3d, the step from row to row and column to column
frame referenceFrame the geometry is expressed in
scanUnit unit of the positions, taken from the map. Default 'um'
pos r × c vector3d, derived from origin, d1 and d2
layout gridLayout the array is stored in, derived from d1 and d2

See also

EBSD EBSDsquare gridLayout mapImage.interp mapImage.edgeMap