What is the concept of ViewProxy?

Hello !

I refer to projects like “VolView” and I’ve seen a lot of component configurations with ViewProxy.

I’m asking you a question because it’s hard to understand the concept of VTK.js example and API document.

Could you give me a quick overview of how to configure ViewProxy?

Thank you.

The proxy architecture is an abstraction for instantiating various vtk.js pipelines. Think of them as high-level wrappers. For example, the ViewProxy instantiates the Renderer, RenderWindow, and the Interactor, while the SliceRepresentationProxy instantiates the ImageSlice + ImageMapper + ColorTransferFunction pipeline for viewing slices.

The central portion of the proxy architecture is the vtkProxyManager, along with the proxy config object. The config object defines the available Sources (producers of data objects), Representations (how to display input data), and Views (e.g. 2D or 3D views). The vtkProxyManager uses this config to construct these proxy objects whenever you request them.

There really should be some better documentation on the proxies. I can see if I have time to add some. In the meantime, check out the VtkThreeView.vue file in the VolView project. I’d suggest to start with following the usage of the viewProxy variable.

2 Likes

@Forrest
Thank you for your answer.

I clarified the concept, and as you advised, I will check the code of the project.

It’s late, but happy new year.

Thank you.

:grinning: