主要内容

affine3d

(不推荐)使用后乘约定的三维仿射几何变换

不建议使用 affine3d。请改用 affinetform3d 对象。有关详细信息,请参阅版本历史记录

说明

affine3d 对象存储有关三维仿射几何变换的信息,并支持正向变换和逆变换。

创建对象

描述

tform = affine3d 创建一个 affine3d 对象,其默认属性设置对应于恒等变换。

tform = affine3d(t) 将属性 T 设置为指定的三维仿射变换矩阵 t

示例

属性

全部展开

正向三维仿射变换,指定为非奇异矩阵 4×4 数值矩阵。

矩阵 T 使用如下约定:

[x y z 1] = [u v w 1] * T

其中,T 采用以下形式:

 [a b c 0;
  d e f 0;
  g h i 0;
  j k l 1];

T 的默认值为恒等变换。

数据类型: double | single

描述输入点和输出点的几何变换维度,指定为值 3

对象函数

invertInvert geometric transformation
isRigidDetermine if geometric transformation is rigid transformation
isSimilarityDetermine if geometric transformation is similarity transformation
isTranslationDetermine if geometric transformation is pure translation
outputLimitsFind output spatial limits given input spatial limits
transformPointsForwardApply forward geometric transformation
transformPointsInverseApply inverse geometric transformation

示例

全部折叠

创建一个 affine3d 对象,该对象在每个维度上按不同因子缩放三维图像。

Sx = 1.2;
Sy = 1.6;
Sz = 2.4;
T = [Sx 0 0 0; 0 Sy 0 0; 0 0 Sz 0; 0 0 0 1];
tform = affine3d(T)
tform = 
  affine3d with properties:

                 T: [4×4 double]
    Dimensionality: 3

检查 T 属性的值。

tform.T
ans = 4×4

    1.2000         0         0         0
         0    1.6000         0         0
         0         0    2.4000         0
         0         0         0    1.0000

扩展功能

全部展开

版本历史记录

在 R2013a 中推出

全部展开