Reference 3D image to world coordinates
An imref3d
object encapsulates the relationship
between the intrinsic coordinates anchored to the columns, rows, and
planes of a 3D image and the spatial location of the same column,
row, and plane locations in a world coordinate system. The image is
sampled regularly in the planar world X, worldY,
and worldZ coordinates of the coordinate system
such that intrinsicX values align with worldX values,
intrinsicY values align with worldY values,
and intrinsicZ values align with worldZ values.
The pixel spacing in each dimension may be different.
The intrinsic coordinate values (x,y,z) of the center point of any pixel are identical to the values of the column, row, and plane subscripts for that pixel. For example, the center point of the pixel in row 5, column 3, plane 4 has intrinsic coordinates x = 3.0, y = 5.0, z = 4.0. Be aware, however, that the order of the coordinate specification (3.0,5.0,4.0) is reversed in intrinsic coordinates relative to pixel subscripts (5,3,4). Intrinsic coordinates are defined on a continuous plane while the subscript locations are discrete locations with integer values.
Code Generation support: Yes.
MATLAB Function Block support: Yes.
R = imref3d()
creates
an imref3d
object with default property settings.
R = imref3d(imageSize)
creates an imref3d
object given an image size.
This syntax constructs a spatial referencing object for the default
case in which the world coordinate system is coaligned with the intrinsic
coordinate system.
R = imref3d(imageSize,pixelExtentInWorldX,pixelExtentInWorldY,pixelExtentInWorldZ)
creates an imref3d
object given an image size and
the resolution in each dimension, specified by pixelExtentInWorldX
, pixelExtentInWorldY
,
and pixelExtentInWorldZ
.
R = imref3d(imageSize,xWorldLimits,yWorldLimits,zWorldLimits)
creates an imref3d
object given an image size and
the world limits in each dimension, specified by xWorldLimits
, yWorldLimits
and zWorldLimits
.

Size of the image associated with the object, specified as a
threeelement row vector of class 

Size of a single pixel in X dimension measured
in the world coordinate system, specified as a 

Size of a single pixel in Y dimension measured
in the world coordinate system, specified as a 

Size of a single pixel in Z dimension measured
in the world coordinate system, specified as a 

Minimum and maximum coordinate values in X dimension
in world coordinate system, specified as a twoelement numeric vector
of class 

Minimum and maximum coordinate values in Y in
world coordinate system, specified as a twoelement numeric vector
of class 

Minimum and maximum coordinate values in Z in
world coordinate system, specified as a twoelement numeric vector
of class 

Span of image in X dimension in the world
coordinate system, specified as a numeric scalar. The 

Span of image in Y dimension in the world
coordinate system, specified as a numeric scalar. The 

Span of image in Z dimension in the world
coordinate system, specified as a numeric scalar. The 

Number of elements in each spatial dimension, specified as a
threeelement vector, in the same form as that returned by the 

Size of a single pixel in X dimension measured
in the world coordinate system, specified as a 

Size of a single pixel in Y dimension measured
in the world coordinate system, specified as a 

Size of a single pixel in Z dimension measured
in the world coordinate system, specified as a 

Limits of image in world X, specified as
a twoelement row vector, 

Limits of image in world Y, specified as
a twoelement row vector, 

Limits of image in world Z, specified as
a twoelement row vector, 

Limits of image in intrinsic units in X dimension,
specified as a twoelement row vector 

Limits of image in intrinsic units in Y dimension,
specified as a twoelement row vector 

Limits of image in intrinsic units in Z dimension,
specified as a twoelement row vector 
contains  True if image contains points in world coordinate system 
intrinsicToWorld  Convert from intrinsic to world coordinates 
sizesMatch  True if object and image are sizecompatible 
worldToIntrinsic  Convert from world to intrinsic coordinates 
worldToSubscript  World coordinates to row and column subscripts 
This function supports the generation of C code using MATLAB^{®} Coder™. For more information, see Code Generation for Image Processing.
When generating code, you can only specify singular objects—arrays of objects are not supported.
You can use this function in the MATLAB Function Block in Simulink.
Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB documentation.