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

David E DeMarle dave.demarle at kitware.com
Thu Jun 16 08:05:42 EDT 2011


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.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Thu, Jun 16, 2011 at 3:33 AM, Kevin Lin <cqqlin at gmail.com> wrote:

> Greetings, everyone.
>
> Currently I've got a vtkRectilinearGrid with scalars to represent
> temperature data of a room,
>
> And now I wish to use Volume Rendering to show the data, But it seems I can
> only use ImageData or StructuredPoints to Volume Render,
>
> Can I use some filters to transform the vtkRectilinearGrid to vtkImageData?
>
> Many Thanks in advance:)
>
> -------------
> Sincerely
>
> Kevin Lin
>
> 2011-06-16
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110616/4daaac35/attachment.htm>


More information about the vtkusers mailing list