[vtkusers] Mixing CopyData() and InterpolatePoint() for vtkDataSetAttributes?

Biddiscombe, John A. biddisco at cscs.ch
Tue Oct 18 07:19:16 EDT 2011


Gunther

I often mix calls to copydata and interpolate. If you look at the CopyAllocate and interpolateAllocate, all they do is setup the field arrays for their respective operations, but in actual fact they are identical.

As long as the field arrays are in the same order and type, (ie you are using the same source/dest arrays for both calls), then you can interchange them freely. If you do anything wrong, you'll soon find out because there'll be a segfault and you'll easily solve it

JB



-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Gunther H.Weber
Sent: 18 October 2011 03:40
To: vtkusers at vtk.org
Subject: [vtkusers] Mixing CopyData() and InterpolatePoint() for vtkDataSetAttributes?

Hi,

is there way to mix CopyData() and InterpolatePoint() calls to fill vtkDataSetAttributes? I have a situation, where I mainly want to copy attribute values from one set of vtkDataSetAttributes to another one. However, in some, relatively rare cases I may need to add attribute values that are interpolated. Looking at the documentation, mixing the calls seems not possible since CopyData() requires calling CopyAllocate() and InterpolatePoint() requires InterpolateAllocate(). Or am I overlooking something? I guess I could just copy data by "interpolating" from a single attribute value with a weight of one. However, this approach seems rather inefficient, particularly since I expect that in many cases all values are copied. (Only a rare boundary case requires interpolation.)

Best regards,

Gunther
_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list