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.
Examples
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
logo # measurements in meters
#> x3p object
#> Instrument: N/A
#> Model: N/A
#> Date: 2018-01-30T08:30:24
#> size (width x height): 741 x 419 in pixel
#> resolution: 6.4500e-07 x 6.4500e-07
#> Creator: Heike Hofmann, CSAFE
#> Comment: image rendered from the CSAFE logo
x3p_scale_unit(logo, scale_by=10^6) # measurements in microns
#> x3p object
#> Instrument: N/A
#> Model: N/A
#> Date: 2018-01-30T08:30:24
#> size (width x height): 741 x 419 in pixel
#> resolution: 6.4500e-01 x 6.4500e-01
#> Creator: Heike Hofmann, CSAFE
#> Comment: image rendered from the CSAFE logo