[vtkusers] How can I transform a vtkRectilinearGrid to a vtkImageData

David Doria daviddoria at gmail.com
Thu Jun 16 15:45:39 EDT 2011


On Thu, Jun 16, 2011 at 8:05 AM, David E DeMarle
<dave.demarle at kitware.com>wrote:

> You can make a new image data with the same extent and then shallow copy
> the cell/point arrays into into it. However, since imagedata is
> geometrically regular and the rectilinear grid usually isn't, you will loose
> spacial variation. If that matters in this case, try converting to an
> unstructured grid (one quick way is to threshold and include the entire
> array range) and volume render that. Memory usage will increase
> substantially since the unstructured grid needs to store the topology and
> geometry now, but at least you won't be changing the problem domain.
>
>
>
Kevin,

Once you get this to work, could I suggest you add an example to the
Examples Wiki? We really should have all of the possible vtkXYZDataStructure
to vtkABCDataStructure conversions covered.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110616/e5a2ced0/attachment.htm>


More information about the vtkusers mailing list