Customise PV Glance

Hi,

I’m interested in customising PV Glance so there is no landing page and just the visualisation side of the app. I understand there is a way to automatically load a visualisation into Glance from this topic:

However, when I load data in this way, it still shows the loading bar with the default landing page in the background as shown in the attached screenshot, and then opens the app page after loading the data.

I’m interested in still following this method of automatically loading data into Glance, however i was just keen for the loading bar to appear infront of the app page rather than the landing page and remove the need for the landing page. Would this be a relatively easy task to achieve or would it require changing a lot of the underlying structure of Glance?

I’m relatively new to Vue.js, Webpack and vtk.js

Cheers,
Iain

If you call glanceInstance.showApp() before loading the dataset, you will have the behavior you are looking for.

I’m talking in the index.html, no need to edit any code except that file

Basically replace

    <script type="text/javascript">
      const container = document.querySelector('#root-container');
      const glanceInstance = Glance.createViewer(container);
      glanceInstance.processURLArgs();
    </script>

by

    <script type="text/javascript">
      const container = document.querySelector('#root-container');
      const glanceInstance = Glance.createViewer(container);
      glanceInstance.showApp();
      glanceInstance.processURLArgs();
    </script>

Hi Sebastien, thanks for sharing that, worked perfectly and was exactly what I was after!

1 Like