Hi Berk, <div>Thanks for the heads up, I noticed that I was renaming the input as well, but in some ways that's exactly what I want. </div><div>So if that's the only "problem" then I think I'll live with it until this other layer appears !</div>
<div><br></div><div>Thanks ! </div><div>Jacques<br><div><br><div class="gmail_quote">2009/3/12 Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Unfortunately, this is not the correct way of doing it. You are<br>
changing the name of the output array which happens to also be the<br>
input array (thanks to CopyAttributes). Changing your input in a<br>
filter is a no no in VTK. You have to deep copy the attributes if you<br>
want to do this. In the future, I think we will create another level<br>
of indirection such that it will be possible to shallow copy the<br>
contents of arrays (i.e. the pointer) for the purpose of renaming (and<br>
else).<br>
<font color="#888888"><br>
-berk<br>
</font><div><div></div><div class="h5"><br>
On Sun, Mar 8, 2009 at 7:50 AM, Jacques Papper <<a href="mailto:jpapper@ara.co.uk">jpapper@ara.co.uk</a>> wrote:<br>
> Hi all, I made a quick modification to the vtkProbeFilter.cxx to pass the<br>
> input data as well as the interpolated data to the output. This is so I can<br>
> calculate deltas between two configurations without having to use a python<br>
> programmable filter. Could you tell me if you think this modification is the<br>
> right way of doing what I want? (It seems to work, but I'm not absolutely<br>
> sure this is a correct way of doing things.)<br>
><br>
><br>
><br>
><br>
> // First, copy the input to the output as a starting point<br>
> output->CopyStructure(input);<br>
> output->CopyAttributes(input); //<JP - copies input data as well<br>
><br>
> vtkPointData* outPD;<br>
><br>
> outPD = output->GetPointData();<br>
><br>
> // Change name of input data<br>
> int numArrays = outPD->GetNumberOfArrays();<br>
> for(int i = 0 ; i < numArrays; ++i){<br>
> vtkAbstractArray * absar = outPD->GetAbstractArray(i);<br>
> absar->SetName(strcat(absar->GetName(),"_original"));<br>
> }<br>
><br>
> Jacques PAPPER<br>
> Applied CFD Team Leader<br>
> Tel: +44 (0) 1234 324677<br>
><br>
><br>
> ---------------------------<br>
> This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br>
> Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons.<br>
> Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245<br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br></div></div>