Transform - Numeric Vectors: Copy

The Copy template appears in the template list when a numeric vector field has been picked in the Transform pane.  The template extracts non-vector (scalar) numbers from the components of a numeric vector.

 

Numeric vector fields are fields with ordered sets of multiple numbers, of x2 type float32x2, float64x2, int8x2, int16x2, int32x2, int64x2uint8x2, uint16x2, uint32x2, uint6x2, of x3 type float32x3, float64x3, int8x3, int16x3, int32x3, int64x3uint8x3, uint16x3, uint32x3, uint6x3, or of x4 type float32x4, float64x4, int8x4, int16x4, int32x4, int64x4uint8x4, uint16x4, uint32x4, uint6x4.   

 

For operations on single numbers, see the Transform - Numbers topic.

 

Copy

Copy into the specified Result destination the values in the source field.  Provides a quick way to extract a desired component from a numeric vector into a single, non-vector (scalar) number.

 

  • value 0 - Copy the first component of a numeric vector into the specified Result destination using the specified numeric type.
  • value 1 - Appears with x2, x3, and x4 numeric vector types.  Copy the second component of the vector into the specified Result destination using the specified numeric type.
  • value 2 - Appears with x3 and x4 numeric vector types.  Copy the third component of the vector into the specified Result destination using the specified numeric type.
  • value 3 - Appears with x4 numeric vector types.  Copy the fourth component of the vector into the specified Result destination using the specified numeric type.
  • vector -  Copy into the Result destination the vector value in the source field.  Destination will be the same x2, x3, or x4 vector type.

 

Launch the template by choosing a numeric vector field and then double-clicking the Copy template.  When the template launches we can specify options.

 

 

Copy : value 0

Copy the first component of a numeric vector into the specified Result destination using the specified numeric type.

 

We start with an example table containing field called x3 vector of uint8x3 numeric vector data type.  A uint8x3 numeric vector data type has three numbers in the vector, each number of which is an unsigned, eight-bit integer.  The three numbers are called components.  

 

The parts of a three-component vector numeric value are counted starting with zero.  Value 0, is the first component, Value 1 is the second component, and Value 2 is the third component.

 

 

With the focus on the table, in the Transform pane we choose the x3 vector field, and then we double-click the Copy template to launch it.

 

 

In the Copy template we choose value 0 as the Use option.

 

In the Result box we enter the name for the new field that will be created in the table into which the results will be saved.  We can use whatever name we want, but it is wise to use a name that reminds us what that field contains. We will use First as the name for the result field, since we care copying the first component of each numeric vector into the result.

 

The default Result type is float64.   We change that to uint8 to match the numeric data type used in the numeric vector.

 

Press Transform.

 

 

The template creates a new uint8 field called First in the table, and populates it with the first component for each numeric vector in the x3 vector field.

 

Copy : value 1

Appears with x2, x3, and x4 numeric vector types.  Copy the second component of the vector into the specified Result destination using the specified numeric type.

 

We start with an example table containing field called x3 vector of uint8x3 numeric vector data type.  A uint8x3 numeric vector data type has three numbers in the vector, each number of which is an unsigned, eight-bit integer.  The three numbers are called components.  

 

The parts of a three-component vector numeric value are counted starting with zero.  Value 0, is the first component, Value 1 is the second component, and Value 2 is the third component.

 

 

With the focus on the table, in the Transform pane we choose the x3 vector field, and then we double-click the Copy template to launch it.

 

 

In the Copy template we choose value 1 as the Use option.

 

In the Result box we enter the name for the new field that will be created in the table into which the results will be saved.  We can use whatever name we want, but it is wise to use a name that reminds us what that field contains. We will use Second as the name for the result field, since we care copying the second component of each numeric vector into the result.

 

The default Result type is float64.   We change that to uint8 to match the numeric data type used in the numeric vector.

 

Press Transform.

 

 

The template creates a new uint8 field called Second in the table, and populates it with the second component for each numeric vector in the x3 vector field.

 

Copy : value 2

Appears with x3 and x4 numeric vector types.  Copy the third component of the vector into the specified Result destination using the specified numeric type.

 

We start with an example table containing field called x3 vector of uint8x3 numeric vector data type.  A uint8x3 numeric vector data type has three numbers in the vector, each number of which is an unsigned, eight-bit integer.  The three numbers are called components.  

 

The parts of a three-component vector numeric value are counted starting with zero.  Value 0, is the first component, Value 1 is the second component, and Value 2 is the third component.

 

 

With the focus on the table, in the Transform pane we choose the x3 vector field, and then we double-click the Copy template to launch it.

 

 

In the Copy template we choose value 2 as the Use option.

 

In the Result box we enter the name for the new field that will be created in the table into which the results will be saved.  We can use whatever name we want, but it is wise to use a name that reminds us what that field contains. We will use Third as the name for the result field, since we care copying the third component of each numeric vector into the result.

 

The default Result type is float64.   We change that to uint8 to match the numeric data type used in the numeric vector.

 

Press Transform.

 

 

The template creates a new uint8 field called Third in the table, and populates it with the third component for each numeric vector in the x3 vector field.

 

Copy : value 3

Appears with x4 numeric vector types.  Copy the fourth component of the vector into the specified Result destination using the specified numeric type.   See examples for Copy : value 0, Copy : value 1, and Copy : value 2 operations.

 

Copy : vector

Copy into the Result destination the vector value in the source field.  Destination will be the same x2, x3, or x4 vector type.

 

We start with an example table containing field called x3 vector of uint8x3 numeric vector data type.  A uint8x3 numeric vector data type has three numbers in the vector, each number of which is an unsigned, eight-bit integer.  

 

 

With the focus on the table, in the Transform pane we choose the x3 vector field, and then we double-click the Copy template to launch it.

 

 

In the Copy template we choose vector as the Use option.

 

In the Result box we enter the name for the new field that will be created in the table into which the results will be saved.  We can use whatever name we want, but it is wise to use a name that reminds us what that field contains. We will use x3 vector copy.

 

The Result type is automatically set to an x3 vector type, but using the default numeric float64x3 data type.   We change that to uint8x3 to match the numeric data type used in the original numeric vector.

 

Press Transform.

 

 

The template creates a new uint8x3 numeric vector field called x3 vector copy in the table, and populates it with copies of the numeric vector values in the x3 vector field.

 

 

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Numbers

 

Transform - Numeric Vectors

 

Transform - Numeric Vectors: Compose

 

Transform - Numeric Vectors: Expression