[vtkusers] interpolation by vtk
David Gobbi
david.gobbi at gmail.com
Thu Sep 13 12:19:37 EDT 2007
Hi Yaya,
The VERTEX cell type cannot be interpolated. In order to
use vtkProbeFilter on a collection of scattered data points,
you need a space-filling cell type like VTK_TETRA or
VTK_HEXAHEDRON.
Before applying vtkProbeFilter, try to triangulate the data
with vtkDelaunay3D and see if that provides useful results.
- David
On 9/13/07, yaya <yaya_aisi at hotmail.com> wrote:
>
>
>
>
> Hi all,
>
> I have a question about interpolation by vtk.
>
> Now there are some points: (x, y, z, a). For example:
>
> 3.4 5.6 2.3 1.0
>
> 6.5 7.1 13.3 2.0
>
> 3.3 123.9 101.1 9.0
>
> 12.2 98.1 1.9 12.0
>
> …
>
> 99.0 23.0 12.8 3.7
>
>
>
> The first three value of each point means the coordinate value "x, y, z" of
> the point, and the fourth value "a" means the attribute value of the point
> (maybe means the color of the point or something like that).
>
>
>
> Now I want to interpolate these points onto regular grid points, can I use
> vtk to realize it?
>
>
>
> By the way, I know that vtkProbeFilter can do the interpolation work. I've
> tried it:
>
>
>
> vtkImageData *image=vtkImageData::New();
>
> image->SetDimensions(60,60,60);
>
> image->SetSpacing(0.3,0.3,0.3);
>
> image->SetOrigin(0,0,0);
>
>
>
> vtkDataSetReader *reader =vtkDataSetReader::New();
>
> reader->SetFileName("test.vtk");
>
>
>
> vtkProbeFilter *probe=vtkProbeFilter ::New();
>
> probe->SetInput(image);
>
> probe->SetSource(reader->GetOutput());
>
>
>
>
>
> But I found that when test.vtk is unstructured_grid and the cell types are
> all equal to 1, that is, the data file consist of scattered points, the
> output has nothing we can see, and the output file is structured_points, and
> the attribute value of each structured point is equal to 0. So I guess that
> when we use the vtkProbeFilter, the cell type of the input file can not be
> 1.
>
>
>
> Then, how to interpolate these points onto regular grid points by vtk? Who
> can help me? Thanks a lot!
> ________________________________
> 不登录就能管理多个邮件帐户,试试 Windows Live Mail。 立即尝试!
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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