Hi
I mounted the Multi-User setup following this guide ParaViewWeb
In the client-side, first thing i do is open the file
_this.pvwClient.ProxyManager.open(_this.pathFileToOpen)
.then(function (response) {
if (response.success) {
_this.viewId = response.id; // save view id
_this.setState({
valid: true
});
} else {
//TODO: show error message
}
})
And then, I have in another button to change in a hardcoded way the pallet color with
this.pvwClient.ColorManager.listColorMapNames()
.then((response) => {
this.pvwClient.ColorManager.selectColorMap(this.viewId, response[0])
.then((response) => {
var foo= response;
})
.catch((response) => {
debugger;
var bar = response;
});
})
.catch(() => {
debugger;
var pepe = response;
});
But it always goes for the catch of the selectColorMap, it says the following
RunTime error : ‘vtkPVServerManagerCorePython.vtkSMSourceProxy’ object has no attribute ‘LookupTable’
Then I checked the code on the server side and found this
I got that from the documentation
https://kitware.github.io/paraview-docs/latest/python/_modules/paraview/web/protocols.html#ParaViewWebColorManager.selectColorMap
In ParaView is in the following path
lib/python2.7/site-package/paraview/web/protocols.py
I tried different things to get some result
- Modify the SelectColorMap API
repProxy = self.mapIdToProxy(representation)
rep = simple.GetRepresentation(repProxy)
lutProxy = rep.GetProperty(‘LookupTable’).GetData()
But the flows goes through
“return { ‘result’: ‘Representation proxy ’ + representation + ’ is missing lookup table’ }”
-
Modify the alwaysIncludedProperties
in the init of ProxyManager, the alwaysIncludePropertie by default is self.alwaysIncludeProperties = [ ‘CubeAxesVisibility’]
I modified it to put the LookUpTable to this self.alwaysIncludeProperties = [ ‘CubeAxesVisibility’,‘LookupTable’ ], but nothing happend, im getting the same error. -
View the properties of the rep through the log
First, I set the debug mode on true, and then I put this lines
repProxy = self.mapIdToProxy(representation)
rep = simple.GetRepresentation(repProxy)
lutProxy = rep.GetProperty(‘LookupTable’).GetData()
for attr, value in rep.__ dict__.iteritems():
print "Attribute: " + str(attr or “”)
print "Value: " + str(value or “”)
and I get this long log file ceb332c0-c139-11e8-90a0-080027000935.txt (273.1 KB)
It has a property ““LookupTable””, but when I am getting it, I got the error
“return { ‘result’: ‘Representation proxy ’ + representation + ’ is missing lookup table’ }”
So my question is,
How do I set the LookupTable for the representation?
Which method I do have to use previously?
I don’t know what else can I do.
Im trying to set the color hardcoded and then do the same dynamically.
Thanks!