[Paraview-developers] Get data from server to client (helper?)
Biddiscombe, John A.
biddisco at cscs.ch
Tue Sep 24 11:14:25 EDT 2013
A filter generates some data and makes it available via
GetHistogramData() - it could be a vtkInt/DoubleArray or even a vtkImageData depending on use.
<ProxyProperty name="Histgram"
command="GetHistogramData"
informationonly=1>
</ProxyProperty>
How can I access this in the client?
Trying this ...
vtkSMProperty *histoarray = repr->getProxy()->GetProperty("Histogram");
if ( histoarray != 0) {
vtkSMProxyProperty *temp = vtkSMProxyProperty::SafeDownCast(histoarray);
temp->GetProxy(0)->UpdatePropertyInformation();
vtkIntArray *histogramvalues = vtkIntArray::SafeDownCast(temp->GetProxy(0)->GetClientSideObject());
std::cout << "Here" << std::endl;
}
results in a segfault at the GetClientSideObject. I was hoping that I could get the data transferred across using a vtkDataObject and then access it, but it doesn't work as I had hoped.
I'm aware that I could use an vtkIntVectorProperty and then an simpleIntVectorPopertyHelper, but this was much too slow when I tried before, so I hoped to be able to use a dataset or data array directly. There doesn't seem to be a helper for a vtkDataSet (imagedata would be lovely as I want to transfer some 2D arrays as well).
Is there an example in the source that does this?
ta
JB
--
John Biddiscombe, email:biddisco @.at.@ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07
Via Trevano 131, 6900 Lugano, Switzerland | Fax: +41 (91) 610.82.82
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130924/164b0058/attachment.htm>
More information about the Paraview-developers
mailing list