x3p_scale_unit: Scale x3p object by given unit

View source: R/convert.R

x3p_scale_unitR Documentation

Scale x3p object by given unit

Description

x3p objects can be presented in different units. ISO standard 5436_2 asks for specification of values in meters. For topographic surfaces collected by microscopes values in microns are more readable. This functions allows to convert between different units.

Usage

x3p_scale_unit(x3p, scale_by)

Arguments

x3p

object in x3p format, 3d topographic surface.

scale_by

numeric value. Value the surface to be scaled by. While not enforced, values of scale_by make most sense as multiples of 10 (for a metric system).

Value

x3p with header information in microns

Examples

logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
logo # measurements in meters
x3p_scale_unit(logo, scale_by=10^6) # measurements in microns

x3ptools documentation built on May 29, 2024, 10:33 a.m.