dipterix / threeBrain

3D Visualization of Brain MRI
https://dipterix.org/threeBrain/
42 stars 10 forks source link

Unable to render after shiny validate #20

Closed dipterix closed 1 year ago

dipterix commented 2 years ago

When used in shiny, there is a chance that the viewer does not render correctly:

image

This happens in when following the following steps

  1. In renderBrain function, use shiny validate to raise errors when 3D model is missing
  2. then load a RAVE subject with no 3D model
  3. load another subject with 3D model
dipterix commented 2 years ago

The issue was caused by widget dimension become 0px x 0px after resizing in R-shiny app, which is not the issue of threeBrain.

However, what threeBrain can do is to delay resizing when detecting canvas size being too small, and only resize when canvas size is large enough (> 10px on each side)