Read Amira surface (aka HxSurface or HyperSurface) files into hxsurf object
1 2 3 4 5 6 7
Character vector defining path to file
Character vector specifying which regions should be read
from file. Default value of
Whether the Inner or Outer material, or both (default), should define the material of the patch. See details.
Colour to set regions when no colour is defined
Print status messages during parsing when
Note that when
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
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
A list with S3 class hxsurf with elements
Vertices A data.frame with columns
X, Y, Z, PointNo
Regions A list with 3 column data.frames specifying triplets of
vertices for each region (with reference to
PointNo column in
RegionList Character vector of region names (should match names of
RegionColourList Character vector specifying default colour to plot
each region in R's
1 2 3 4
## Not run: read.hxsurf("my.surf", RegionChoice="both") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.