# SetHeightColorRange

The SetHeightColorRange function allows you to set the height color range used in the 3D view. It returns a HeightColor3D structure containing the minimum and maximum height (dimension Z) of the color range.

If you are not using a SetHeightColorRange function, height color range is automatically computed based on the acquired detection zone for each point cloud. For old point clouds where this information was not stored, the full field of view is used instead.

Note: This function is designed to work with boxes that are aligned with the point cloud coordinate system, and always computes color gradient on the Z-axis of the point cloud, regardless of the box orientation. Dimensions X and Y have no effect on the result.

To use the SetHeightColorRange function:

1. Drag and drop the SetHeightColorRange function to the Spreadsheet.

2. In the property sheet that pops up, double-click the Box3D parameter to open the interactive display. Adjust the ROI shape on the acquisition display. Alternatively, you can expand the Box3D settings and define the parameters manually.

   Note: You can use boxes produced by other 3D tools, such as ExtractBlob3D, to automatically adjust the color based on the computed box from one acquisition to the next.

   The lowest Z value in the Box3D represents the minimum value for height range. The highest Z value is the maximum value.

3. Click OK to finalize the settings.

Input

Parameter | Description
--- | ---
PointCloud | Reference to a cell containing a point cloud. The default value is $A$0.
Fixture3D | Specifies the point cloud coordinate system in which the 3D fixture is defined. It is offset from the PointCloud origin in the following format with the following arguments: {X, Y, Z, Rotation, Tilt, TiltDirection}
X | Offset on the X-axis from the PointCloud origin.
Y | Offset on the Y-axis from the PointCloud origin.
Z | Offset on the Z-axis from the PointCloud origin.
Rotation | Specifies the in-plane rotation in degrees around the PointCloud Z-axis. The value range is -180 to 180. The tool normalizes external references with values outside the allowed range to the allowed range.
Tilt | Specifies the tilt angle in degrees from the PointCloud Z-axis after rotation. The value range is 0-180. External references with values outside the allowed range result in an error.
Tilt Direction | Specifies the direction of tilt in degrees from the rotated PointCloud X-axis of the tool, around the PointCloud Z-axis of the tool. The value range is -180 to 180. The tool normalizes external references with values outside the allowed range to the allowed range.
Note: The Fixture3D parameter is only available if you set External Fixture to 0.
External Fixture | Specifies a reference to a Fixture3D structure defined in another cell. The function uses the referenced cell as the fixture of the function. Set to 0 (OFF) to use the internal fixture of the function instead.
Box3D | Specifies the dimensions, offset and angle for the 3D rectangle of the function. It is offset from the PointCloud origin in the following format with the following arguments: {SizeX, SizeY, X, Y, Z, Rotation, Tilt, TiltDirection}
SizeX | The size of the box along the X-axis of PointCloud. The value range is 0.001 to inf., and the default value is 100.
SizeY | The size of the box along the Y-axis of PointCloud. The value range is 0.001 to inf., and the default value is 100.
SizeZ | The size of the box along the Z-axis of PointCloud. The value range is 0.001 to inf., and the default value is 100.
X | Offset on the X-axis from the PointCloud origin. The value range is -inf. to inf., and the default value is 0.
Y | Offset on the Y-axis from the PointCloud origin. The value range is -inf. to inf., and the default value is 0.
Z | Offset on the Z-axis from the PointCloud origin. The value range is -inf. to inf., and the default value is 0.
Rotation | Specifies the in-plane rotation of the box (in degrees) about the PointCloud Z-axis of the tool. The value range is -360 to 360. External references with values outside the allowed range will be normalized to the allowed range.
Tilt | Specifies the tilt angle of the box (in degrees) from the PointCloud Z-axis of the tool. The value range is 0 - 180. External references with values outside the allowed range will result in an error.
Tilt Direction | Specifies the tilt direction of the box (in degrees) from the rotated PointCloud X-axis of the tool, about the PointCloud Z-axis of the tool. The value range is -360 to 360. External references with values outside the allowed range will be normalized to the allowed range.
Note: This parameter is available only if External Box is set to 0.
External Box | Specifies a reference to a Box3D structure defined in another cell of the spreadsheet to be used for plotting. Set to 0 (OFF) to use the function's internal Box3D structure.
Show | Selects the display mode.
0 (Unchecked) = Off | The structure will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 (Checked) = On (default) | The structure will be displayed at all times.

Output

Returns | A HeightColor3D structure containing the minimum and maximum height (dimension Z) of the color range.
Results | When inserted into a cell, the following functions are automatically inserted into the spreadsheet.
| MinZ | MaxZ
HeightColor3D | GetMinZ(HeightColor3D) | GetMaxZ(HeightColor3D)