[vtkusers] RE: convert vtkRectilinearGrid to vtkStructuredGrid

Adam D. Burry aburry at igotechnologies.com
Fri May 11 14:56:28 EDT 2001


Hi:

Answering my own question. In fact, the answer came by way of e-mail
from another VTK user.

The problem is that vtkRectilinearGrid naturally describes my data.
However, it appears that vtkRectilinearGrid has been misplaced in the
VTK class hierarchy and there is not much support for doing stuff with
it. Therefore, I need to use another data structure.

The key fact that I was missing is that vtkRectilinearGrid is
conceptually a sub-class of vtkStructuredGrid. It is just not
implemented that way (why???).

The conversion from the specialized type (vtkRectilinearGrid) to the
more general type (vtkStructuredGrid) is straight forward (although not
as straight forward as it would be if the hierarchy was done right). The
trick is to somehow get the data out of the vtkRectilinearGrid in the
form of vtkPoints so that you can call vtkStructuredGrid::SetPoints().

I'm still looking for pseudo-code for that process.

Adam

--
Adam Burry
aburry at igotechnologies.com




More information about the vtkusers mailing list