materials: Extract or set the materials for an object

View source: R/im3d.R

materialsR Documentation

Extract or set the materials for an object

Description

materials.character will read the materials from an im3d compatible image file on disk.

materials.hxsurf will extract the materials from an hxsurf object

Usage

materials(x, ...)

## Default S3 method:
materials(x, ...)

## S3 method for class 'character'
materials(x, ...)

## S3 method for class 'hxsurf'
materials(x, ...)

Arguments

x

An object in memory or, for materials.character, an image on disk.

...

additional parameters passed to methods (presently ignored)

Details

Note that the id column will be the 1-indexed order that the material appears in the surf$Region list for hxsurf objects and the 0-indexed mask values for an image.

Presently only AmiraMesh images are supported since they have a standardised way of encoding labels, whereas NRRDs would have to use key-value pairs according to some ad hoc convention.

Value

A data.frame with columns name, id, col

See Also

Other hxsurf: as.hxsurf(), as.mesh3d(), plot3d.hxsurf(), read.hxsurf(), subset.hxsurf(), write.hxsurf()


jefferis/nat documentation built on Feb. 22, 2024, 12:45 p.m.