[Insight-users] Convert vector field from vtkUnstructuredGrid to itk::Image with interpolation
Dirk Boye
body at nabla.org
Thu Dec 10 05:47:57 EST 2009
Dear list,
Let's say I have a list of vectors in an vtkUnstructuredGrid like
this:
# vtk DataFile Version 3.0
vtk output
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 5 float
-2 2 0 2 2 0 0 0 0
-2 -2 0 2 -2 0
CELL_TYPES 0
POINT_DATA 5
VECTORS vectors float
1 -1 0 1 1 0 1 0 0
1 1 0 1 -1 0
I'd like to create a continuous vector field 'image' of dimensions
4x4x1 with a spacing of 1.
How can I read the vectors into a itk::Image and do an interpolation
(BSpline for example) on the vectors?
Usually one resamples an image and interpolates the new pixels... but
with only some vectors given like above and given image dims/spacing
I have no clue.
Attached image is a sketch of what I'd like to do :)
Are there any nice classes to do that?
Thanks,
Dirk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.jpeg
Type: image/jpeg
Size: 6753 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091210/4a8a31ab/attachment.jpeg>
More information about the Insight-users
mailing list