read.hxsurf: Read Amira surface (aka HxSurface or HyperSurface) files into...

Description Usage Arguments Details Value See Also Examples

View source: R/hxsurf.R

Description

Read Amira surface (aka HxSurface or HyperSurface) files into hxsurf object

Usage

1
2
3
4
5
6
7
read.hxsurf(
  filename,
  RegionNames = NULL,
  RegionChoice = "both",
  FallbackRegionCol = "grey",
  Verbose = FALSE
)

Arguments

filename

Character vector defining path to file

RegionNames

Character vector specifying which regions should be read from file. Default value of NULL => all regions.

RegionChoice

Whether the Inner or Outer material, or both (default), should define the material of the patch. See details.

FallbackRegionCol

Colour to set regions when no colour is defined

Verbose

Print status messages during parsing when TRUE

Details

Note that when RegionChoice="both" or RegionChoice=c("Inner", "Outer") both polygons in inner and outer regions will be added to named regions. To understand the significance of this, consider two adjacent regions, A and B, with a shared surface. For the polygons in both A and B, Amira will have a patch with (say) InnerRegion A and OuterRegion B. This avoids duplication in the file. However, it might be convenient to add these polygons to both regions when we read them into R, so that regions A and B in our R object are both closed surfaces. To achieve this when RegionChoice="both", read.hxsurf adds these polygons to region B (as well as region A) but swaps the order of the vertices defining the polygon to ensure that the surface directionality is correct.

As a rule of thumb, stick with RegionChoice="both". If you get more regions than you wanted, then try switching to RegionChoice="Inner" or RegionChoice="Outer".

Value

A list with S3 class hxsurf with elements

See Also

plot3d.hxsurf, rgb

Other amira: amiratype(), is.amiramesh(), read.amiramesh(), write.hxsurf()

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

Examples

1
2
3
4
## Not run: 
read.hxsurf("my.surf", RegionChoice="both")

## End(Not run)

nat documentation built on Sept. 6, 2021, 5:09 p.m.