sharon
(sharon)
October 25, 2019, 1:43pm
1
Dear Expert,
I found the default lookup table is “Cool to Warm”, How can i change this default one into “hsv”.
And further, i want to use a user specific defined lookup table, how can i do it in programmatic way ,
to make it as as the default lookup table
Thanks and Best Regards,
Sharon
mwestphal
(Mathieu Westphal (Kitware))
October 25, 2019, 2:16pm
2
N̶o̶t̶ ̶p̶o̶s̶s̶i̶b̶l̶e̶ ̶i̶n̶ ̶P̶a̶r̶a̶V̶i̶e̶w̶,̶ ̶b̶u̶t̶ ̶a̶ ̶g̶r̶e̶a̶t̶ ̶f̶e̶a̶t̶u̶r̶e̶ ̶i̶d̶e̶a̶ ̶n̶o̶n̶e̶t̶h̶e̶l̶e̶s̶s̶.̶ ̶ ̶P̶l̶e̶a̶s̶e̶ ̶o̶p̶e̶n̶ ̶a̶n̶ ̶i̶s̶s̶u̶e̶ ̶o̶n̶ ̶o̶u̶r̶ ̶g̶i̶t̶l̶a̶b̶ ̶t̶o̶ ̶t̶r̶a̶c̶k̶ ̶i̶t̶.̶
Not true, see below.
sharon
(sharon)
October 26, 2019, 1:26am
3
Thank you Mathieu for you reply!
OK, I will put it on the gitlab.
sharon
(sharon)
October 26, 2019, 7:58am
4
Hi Mathieu,
what about if set a user defined color for a MultiBlockDataSet in the reader plugin?
How can do this?
mwestphal
(Mathieu Westphal (Kitware))
October 28, 2019, 7:50am
5
T̶h̶e̶ ̶w̶o̶u̶l̶d̶ ̶b̶e̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶ ̶m̶i̶s̶s̶i̶n̶g̶ ̶f̶e̶a̶t̶u̶r̶e̶ ̶i̶m̶o̶.̶
Not true, see below.
cory.quammen
(Cory Quammen (Kitware))
October 28, 2019, 2:48pm
6
Actually, this is possible in ParaView. You can set a custom default color map via the ParaView settings controller. Set up a std::string
with some JSON that defines the default color map:
{
"lookup_tables" :
{
"PVLookupTable" :
{
"ColorSpace" : 0,
"RGBPoints" :
[
-0.97492790222167969,
1.0,
0.0,
0.0,
-0.6499512848625183,
1.0,
0.0,
1.0,
-0.32497564243125909,
0.0,
0.0,
1.0,
0.0,
0.0,
1.0,
1.0,
0.32497271764755253,
0.0,
1.0,
0.0,
0.64994543529510507,
1.0,
1.0,
0.0,
0.97492790222167969,
1.0,
0.0,
0.0
]
}
}
}
This happens to be the “hsv” color map (which I highly recommend you avoid, but that’s a separate topic).
To load the JSON, use
#include <vtkSMSettings.h>
std::string settings = "your json here";
vtkSMSettings::GetInstance()->AddCollectionFromString(settings, VTK_DOUBLE_MAX);
mwestphal
(Mathieu Westphal (Kitware))
October 30, 2019, 11:35am
7
So the feature is indeed already in ParaView GUI, albeit a litle bit hidden.
Here is how to do it :
Open ParaView
Show your dataset
Modify the color map to your needs
Click on this button at the very bottom of the color map editor
This color map is now the default one for any newly displayed data
It is saved in the settings, so it will stay the default even if you start ParaView again
It works with categories as well
sharon
(sharon)
November 30, 2019, 9:52am
8
Hi Cory,
Thank you very much for your reply!!
sorry for coming back later…
What about if i want to load different sources and want them to use different lookup table?
In my situation, i need load 3 different sources, and first source i want to use block index color as default, the second source i want use lookup table as default, the third source i want to use another lookup table as default.
Thanks and Best Regards,
Sharon
sharon
(sharon)
November 30, 2019, 9:54am
9
Hi Mathieu,
Thank you very much for your reply!!
Just as i replied to Cory, i need different default color schema for different source…
Thanks and Best Regards,
Sharon
mwestphal
(Mathieu Westphal (Kitware))
December 2, 2019, 9:29am
10
Not supported in ParaView yet.
sharon
(sharon)
December 2, 2019, 12:15pm
11
Thank you Mathieu for your reply!
Best Regards