Using multiple proxyManagers to load multiple images?

I’m working with MIQA and it uses a proxyManager to load a medical scan and it can show multiple views of the same scan.

Now I’m trying to do something slightly different - I want to load three separate medical scans side-by-side. So I created three proxyManagers and each proxyManager loads a separate scan.

It works fine for the default proxyManager but the other two proxyManagers aren’t working correctly (which I’ve creatively named proxyManager2 and proxyManager3).

The problem seems to be when I attempt to use getRepresentation() at which time I get the following error:

TypeError: ‘caller’, ‘callee’, and ‘arguments’ properties may not be accessed on strict mode functions or the arguments objects for calls to them

My questions are:

  1. Am I using proxyManager appropriately, if not, how is a better practice?
  2. If I am using it appropriately, any thoughts on why this error is occurring?

Full Error:

TypeError: ‘caller’, ‘callee’, and ‘arguments’ properties may not be accessed on strict mode functions or the arguments objects for calls to them
at Function.invokeGetter (:3:28)
at VueComponent.representation (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/VtkViewer.vue?vue&type=script&lang=ts&:42:38)
at Watcher.get (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4489:25)
at Watcher.evaluate (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4591:21)
at VueComponent.computedGetter [as representation] (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4843:17)
at VueComponent.sliceDomain (webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/VtkViewer.vue?vue&type=script&lang=ts&:51:17)
at Watcher.get (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4489:25)
at Watcher.evaluate (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4591:21)
at VueComponent.computedGetter [as sliceDomain] (webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:4843:17)
at processComputed (chrome-extension://nhdogjmejiglipccpnnnanhbledajbpd/build/backend.js:4226:24)

I guess my first question would be why do you need 3 ProxyManager? Can’t you use the one you already have? What is the intent on having a ProxyManager per scan?

Not sure about the error. Did you initialized those proxy manager with the same definitions?

I thought one might be able to use a single ProxyManager, but wasn’t sure. Is there an example I can look at to understand how loading multiple scans with a single ProxyManager would work?

I’ll hold off on looking further into that error if I can do it with a single ProxyManager, that would be simpler/easier/better.

A proxy manager aim to manage proxies. So use it for creating proxies. 1, 2 or 10 scans/datasets, should not matter. If you need a new source, new representation and new view. Just ask for them and fill them up with your data.

I’m not sure what I’m saying is helping or not but I don’t know either what you are asking.

Thanks @Sebastien_Jourdain. I found this post which appears to be essentially the same as my question. It looks helpful, but I was hoping maybe a full example had become available in the past year.

I could only find a full example for an AnimationProxyManager on the VTK.js site though.

In all of those links I don’t see a use of multiple proxymanager. Or maybe I missed it. And they are good reference indeed. Thanks for linking them here.

Haha, it all made sense inside my head. :joy: For anyone who might use this in the future, here is the followup discussion on loading multiple scans with a single proxyManager.