Hello all,
I have extended vtk’s xdmf reader (vtkXdmfReader) to read some custom information from a xdmf file. The information read corresponds to some (double) values that the plugin’s user can modify by PV’s GUI. To that end, I have defined a repeatable DoubleVectorProperty to the SM xml that gets its data feed by the reader and thus the GUI correspond to the default list widget:
<DoubleVectorProperty
name="ValuesInfo"
information_only="1"
command="GetValues"
>
<DoubleArrayInformationHelper/>
</DoubleVectorProperty>
<DoubleVectorProperty
name="Values"
command="SetValues"
label="Values"
information_property="ValuesInfo"
use_index="1"
animateable="1"
number_of_elements_per_command="1"
repeat_command="1"
panel_visibility="default"
>
</DoubleVectorProperty>
So far so good. However, after performing some modifications through the list widget and then saving the state, I’m having problems loading it back.
The “extra” reading is performed at RequestInformation and the interfaces of the get/set reader methods defined by the xml are the following:
//----------------------------------------------------------------------------
void vtkXdmf2Reader::SetValues(int id , double value){
Values->SetValue(id,value);
this->Modified();
};
//----------------------------------------------------------------------------
vtkDoubleArray* vtkXdmf2Reader::GetValues(){
return Values;
};
I’m also including the reader’s sources.
Plugins.zip (5.8 KB)
Any help would be appreciated