[Paraview] Resample with dataset.

Jacques Papper jacques.papper at gmail.com
Fri Mar 13 15:05:30 EDT 2009


Hi Berk, 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.
So if that's the only "problem" then I think I'll live with it until this
other layer appears !

Thanks !
Jacques

2009/3/12 Berk Geveci <berk.geveci at kitware.com>

> Unfortunately, this is not the correct way of doing it. You are
> changing the name of the output array which happens to also be the
> input array (thanks to CopyAttributes). Changing your input in a
> filter is a no no in VTK. You have to deep copy the attributes if you
> want to do this. In the future, I think we will create another level
> of indirection such that it will be possible to shallow copy the
> contents of arrays (i.e. the pointer) for the purpose of renaming (and
> else).
>
> -berk
>
> On Sun, Mar 8, 2009 at 7:50 AM, Jacques Papper <jpapper at ara.co.uk> wrote:
> >  Hi all, I made a quick modification to the vtkProbeFilter.cxx to pass
> the
> > input data as well as the interpolated data to the output. This is so I
> can
> > calculate deltas between two configurations without having to use a
> python
> > programmable filter. Could you tell me if you think this modification is
> the
> > right way of doing what I want? (It seems to work, but I'm not absolutely
> > sure this is a correct way of doing things.)
> >
> >
> >
> >
> >  // First, copy the input to the output as a starting point
> >  output->CopyStructure(input);
> >  output->CopyAttributes(input); //<JP - copies input data as well
> >
> >  vtkPointData* outPD;
> >
> >  outPD = output->GetPointData();
> >
> >  // Change name of input data
> >  int numArrays  = outPD->GetNumberOfArrays();
> >  for(int i = 0 ; i < numArrays; ++i){
> >    vtkAbstractArray * absar = outPD->GetAbstractArray(i);
> >    absar->SetName(strcat(absar->GetName(),"_original"));
> >  }
> >
> > Jacques PAPPER
> > Applied CFD Team Leader
> > Tel: +44 (0) 1234 324677
> >
> >
> > ---------------------------
> > 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.
> > Note: All email sent to or from this address may be accessed by someone
> other than the recipient, for system management and security reasons.
> > Aircraft Research Association Ltd.  Registered in England, Registration
> No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
> 196351245
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090313/f406afd8/attachment.htm>


More information about the ParaView mailing list