| Customize Help

Color and display settings for 3D data



When you select a 3D-displayable point cloud container or fully-corrected depth map image buffer to a 3D display (using M3ddispSelect(), M3ddispSelectWindow(), or M3dgraAdd()), a linked point cloud 3D graphic with the graphic type M_GRAPHIC_TYPE_POINT_CLOUD is added to the 3D graphics list.

Fully-corrected depth map image buffers are internally converted to 3D-displayable point cloud containers when they are selected to a 3D display. The word points in this section can therefore also refer to the pixels of a fully-corrected depth map image buffer.

Unlike other types of 3D graphics, a point cloud 3D graphic is continually updated to reflect changes in the linked 3D-displayable point cloud container or depth map image buffer. You can change how a point cloud 3D graphic is shown in the display using M3dgraControl() with the label of the point cloud 3D graphic. If a single 3D-displayable container or fully-corrected depth map image buffer is shown in multiple 3D displays (or multiple times in the same 3D display), you can change these settings independently for each point cloud 3D graphic.

You can specify the displayed size and opacity of each point, and how the color of each point is determined (optionally by applying a LUT). If you select a point cloud container to a 3D display and it has a valid mesh component, you can also specify how the mesh is shown in the 3D display.

Point size

Points are represented as squares in a 3D display. You can specify the displayed size of the points (in number of pixels) using M3dgraControl() with M_THICKNESS. Points are always shown with sides of this length, regardless of how close they are in the view.

Opacity

You can specify the opacity of the points using M3dgraControl() with M_OPACITY. An opacity of 100 means that the point cloud 3D graphic is completely opaque, while an opacity of 0 means that the point cloud 3D graphic is completely transparent.

Coloring points

If you select a point cloud container to a 3D display, its points are displayed with the color of their corresponding intensity or reflectance component value. You can specify to color the points based on a different component of the container using M3dgraControl() with M_COLOR_COMPONENT, or to use only a single band of a component using M_COLOR_COMPONENT_BAND. For example, if you specify to use the third band (Z-coordinates) of the range component, points that have higher Z-coordinates will be shown brighter. This can be useful for emphasizing height differences.

Points converted from a depth map image buffer are colored based on their height.

You can display points with a single solid color using M_COLOR_COMPONENT to M_NULL. All points will then have the color specified by M_COLOR.

Dynamic range

In some cases, the data that you use to color your points might not use all of the available dynamic range. For example, the intensity component might only have values between 20 and 30, even if it is an 8-bit buffer than can hold 256 possible values. The difference between these grayscale values would be difficult to discern when shown in the 3D display. You can improve visibility of this difference by specifying the dynamic range of the point color values using M3dgraControl() with M_COLOR_LIMITS. The source color values of each point will be normalized to this scale when determining what color to show (for example, if the maximum value is set to 30 then any intensity component value of 30 or higher will be shown as pure white).

The default value for M_COLOR_LIMITS is M_BUFFER_LIMITS, which uses the full available dynamic range of the component. You can specify that MIL will automatically determine the dynamic range from the extremes of the data by setting M_COLOR_LIMITS to M_DATA_EXTREMES_GLOBAL or M_DATA_EXTREMES_PER_BAND. If you change M_COLOR_LIMITS to M_USER_DEFINED, you can use M_COLOR_LIMITS_MIN and M_COLOR_LIMITS_MAX to specify values manually.

You cannot manually specify a different minimum/maximum per band. To use different values for each band, you must specify M_DATA_EXTREMES_PER_BAND.

Applying LUTs

You can specify a LUT to apply to the colors of the points, using M3dgraControl() with M_COLOR_USE_LUT. The LUT is applied to the values of the component specified using M_COLOR_COMPONENT.

The LUT will only be applied if M_COLOR_COMPONENT is set to a 1-band component or to a single band of a 3-band component.

By default, if you enable LUTs for a point cloud 3D graphic, the M_COLORMAP_TURBO LUT is used. You can change the LUT used for a point cloud 3D graphic using M3dgraCopy() with the label of the point cloud graphic and M_COLOR_LUT. You can specify to use either a predefined LUT, or a LUT buffer (previously allocated using the MbufAlloc1d() or MbufAllocColor() with M_LUT).

Meshed point cloud containers

You can display a 3D-displayable meshed point cloud container as a full 3D model, as well as a normal point cloud. By default, triangles in the mesh are shown as filled polygons in the 3D display. If there are points that are not part of the mesh, those points are still shown as squares.

You can change how mesh data in the point cloud container is shown using M3dgraControl() with M_APPEARANCE:

  • You can specify that triangles in the mesh are shown as filled polygons in the 3D display, using M_SOLID.

    If a color component is set for the 3D graphic (using M3dgraControl() with M_COLOR_COMPONENT) the triangles of the mesh are colored by interpolating between the colors of their vertices. Otherwise, the color of all of the triangles is set using M3dgraControl() with M_FILL_COLOR.

  • You can specify that edges of the mesh are shown as lines in the 3D display, using M_WIREFRAME.

    If a color component is set for the 3D graphic (using M3dgraControl() with M_COLOR_COMPONENT) the lines of the wireframe are colored by interpolating between the colors of their vertices. Otherwise, the color of all of the lines is set using M3dgraControl() with M_COLOR. The lines are always shown with the thickness (in pixels) indicated by M_THICKNESS, regardless of how close they are in the view.

  • You can specify that triangles and edges of the mesh are shown as filled polygons and wireframes simultaneously in the 3D display, using M_SOLID_WITH_WIREFRAME.

    The filled polygons are shown with the visible edges of the wireframe on top. The color and thickness settings used with M_SOLID and M_WIREFRAME are also used with this mode.

  • You can specify that the mesh is ignored, using M_POINTS. The point cloud is shown as though it has no associated mesh information.