# TransformData

TransformData carries one or more rigid transforms expressed as 4×4 homogeneous matrices. The message is commonly emitted by
calibration utilities, the [RGBD](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/rgbd.md) node, and
host-side tools that need to pass camera-to-camera or camera-to-world extrinsics to the device. Each transform stores rotation and
translation in row-major order together with an optional label that identifies the source and target reference frames.

You can queue TransformData messages to configuration inputs (for example,
[ImageAlign](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/image_align.md) or
[PointCloud](https://docs.luxonis.com/software-v3/depthai/depthai-components/host_nodes/pointcloud.md)) to update alignment
matrices at runtime, or forward them to the host for logging and visualization.

## Reference

### dai::TransformData

Kind: class

TransformData message. Carries transform in x,y,z,qx,qy,qz,qw format.

#### Transform transform

Kind: variable

Transform .

#### TransformData()

Kind: function

Construct TransformData message.

#### TransformData(const Transform & transform)

Kind: function

#### TransformData(const std::array< std::array< double, 4 >, 4 > & data)

Kind: function

#### TransformData(double x, double y, double z, double qx, double qy, double qz, double qw)

Kind: function

#### TransformData(double x, double y, double z, double roll, double pitch, double yaw)

Kind: function

#### ~TransformData()

Kind: function

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DatatypeEnum getDatatype()

Kind: function

Get the datatype of this specific message.

return: DatatypeEnum

#### Point3d getTranslation()

Kind: function

#### Point3d getRotationEuler()

Kind: function

#### Quaterniond getQuaternion()

Kind: function

#### DEPTHAI_SERIALIZE(TransformData, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, transform)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
