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

Dominik Szczerba dominik at itis.ethz.ch
Thu Jun 16 16:41:37 EDT 2011


The way we use is to interpolate one dataset onto the other. I do not
think copying will work for anything but simplest constant spacing
rectilinear grids.

Dominik

On Thu, Jun 16, 2011 at 9:45 PM, David Doria <daviddoria at gmail.com> wrote:
>
>
> 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
>
> _______________________________________________
> 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