You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to incorporate fsbrain into our R-shiny application called RAVE (https://rave.wiki). However, I found that rgl::renderRglwidget cannot render the interactive brain. Instead, fsbrain visualizes the results to xQuartz instead of to the web widget. Would you mind instructing on how I could show them in R-shiny instead of xQuartz?
Hm, interesting question. I wanted to try to render a brain to R shiny anyways, so I kind of have this on my internal to-do list.
I just started a new position though, so I currently can't do it at work. I'll have a look as soon as I find the time.
I can tell you through that because fsbrain uses the rgl renderer internally, the solution most likely will involve getting rgl to display stuff in a shiny window. I may have to do something in the fsbrain code to do that, but I'm not sure. I just found this but cannot test at work.
Congratulations on the new position! I was talking with my PI about your great work yesterday.
Yes, basically rgl started to support WebGL rendering around 3 years ago so you can visualize 3D content with web browsers. However, it might be tricky to render mesh with massive vertices. This is because in xQuartz, you can use C to directly access data via shared memory, but depending on HtmlWidgets requires serializing the R object to JSON, which is a little slow. The way I handle this issue is to cache everything into JSON first. Loading the mesh is just fast in browsers (from 1min to 5sec).
Haven't actually tried rgl to render brain though, but I think it's worthwhile. (Maybe they have faster serialization, or people can just wait)
Wow, amazing package!
I was trying to incorporate
fsbrain
into our R-shiny application calledRAVE
(https://rave.wiki). However, I found thatrgl::renderRglwidget
cannot render the interactive brain. Instead, fsbrain visualizes the results to xQuartz instead of to the web widget. Would you mind instructing on how I could show them in R-shiny instead of xQuartz?Thanks : )
The text was updated successfully, but these errors were encountered: