GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - emanuelhuber/vstar: An R package for fast, interactive 3D spatial visualization and volumetric processing powered by VTK and C++ R6 wrappers.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
R
R
 
 
inst
inst
 
 
man
man
 
 
src
src
 
 
tests
tests
 
 
vignettes
vignettes
 
 
.gitignore
.gitignore
 
 
DESCRIPTION
DESCRIPTION
 
 
LICENSE
LICENSE
 
 
NAMESPACE
NAMESPACE
 
 
NEWS.md
NEWS.md
 
 
README.md
README.md
 
 

Repository files navigation

vstar 0.1.2

Where Python has pyVista (Python + Vista), R gets Vista-R $\rightarrow$ vee-sta-R $\rightarrow$ v-star $\rightarrow$ vstar.

vstar provides ownership-safe R6 interfaces to selected VTK functionality. Version 0.1.2 provides visualization support for the existing ImageData and PolyData types with direct volume rendering, scalar-colored meshes, transfer functions, screenshots, and convenient image slicing.

Documentation

  • inst/vstar_0.1.2_complete_tutorial.R
  • vignettes/vstar-overview.2Rmd
  • vignettes/vstar-overview2.html

Build

The supplied Unix src/Makevars targets VTK 9.1 under /usr/include/vtk-9.1. Adapt it when your VTK installation differs.

devtools::clean_dll()
Rcpp::compileAttributes()
devtools::document()
devtools::load_all(recompile = TRUE)
devtools::test()
devtools::check()
rmarkdown::render(
  "vignettes/vstar-overview2.Rmd"
)

Smoke test

library(vstar)

volume <- imageData(
  array(runif(20^3), dim = c(20, 20, 20))
)

slice <- volume$slice_z(10)

plotter <- Plotter$new()

plotter$add_mesh(
  slice,
  scalars = TRUE,
  show_scalar_bar = TRUE
)

plotter$reset_camera()
plotter$show()
plotter$close()

plotter <- Plotter$new()
plotter$add_volume(volume, colormap = "magma")
plotter$reset_camera()
plotter$show()
plotter$close()

# ---------------
volume <- imageData(
  array(runif(20^3), dim = c(20, 20, 20))
)

vti <- tempfile(fileext = ".vti")

volume$write(vti)

file.exists(vti)
file.info(vti)$size

volume_read <- read_image_data(vti)

volume_read$dimensions()
volume_read$scalar_range()

# ------------------------
surface <- volume$contour(0.5)

vtp <- tempfile(fileext = ".vtp")

surface$write(vtp)

surface_read <- read_poly_data(vtp)

surface_read$n_points()
surface_read$n_cells()

About

An R package for fast, interactive 3D spatial visualization and volumetric processing powered by VTK and C++ R6 wrappers.

Topics

3drvisualizationvtkvtk-applications

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.