12.30. Convert Quaternion Order

Group (Subgroup)

Processing (Conversion)

Description

Internally DREAM3D-NX assumes that a quaternion is laid out in the order such that < x, y, z >, w or Vector-Scalar ordering. Codes and algorithms external to DREAM3D-NX may store quaternions in the opposite or Scalar-Vector order (w < x,y,z >). This filter will allow the user to easily convert imported Quaternions into the representation that DREAM3D-NX expects.

For Example if the user has imported quaternion data in the form of Scalar-Vector then they would run this filter using a conversion type of ToVectorScalar and using the generated quaternions in subsequent filters. If the user wanted to then write out the Quaternions in the Scalar-Vector form then could add this filter again to the end of the pipeline (but before writing out data) to convert the Vector-Scalar quaternions array (assuming something modified the array).

Conversion Type

The Conversion Type parameter selects the target quaternion component ordering:

  • To Scalar Vector ( w, [x, y, z] ) [0]: Converts quaternions to scalar-vector ordering where the scalar component (w) comes first, followed by the vector components (x, y, z).

  • To Vector Scalar ( [x, y, z], w ) [1]: Converts quaternions to vector-scalar ordering where the vector components (x, y, z) come first, followed by the scalar component (w). This is the internal ordering expected by DREAM3D-NX.

Input Parameter(s)

Parameter Name

Parameter Type

Parameter Notes

Description

Delete Original Data

Bool

Should the original quaternions array be deleted from the DataStructure

Conversion Type

Choices

The conversion type: To Scalar-Vector=0, To Vector-Scalar=1.

DREAM3D prefers Vector-Scalar

Input Data

Parameter Name

Parameter Type

Parameter Notes

Description

Input Quaternions

Array Selection

Allowed Types: float32, float64 Comp. Shape: 4

Specifies the quaternions to convert

Output Data

Parameter Name

Parameter Type

Parameter Notes

Description

Output Quaternions

DataObjectName

The DataPath to the converted quaternions

Example Pipelines

DREAM3D-NX Help

If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.