[vtkusers] ImageData to Unstructured grid

Will Schroeder will.schroeder at kitware.com
Thu Mar 20 08:35:29 EST 2003


Hi Sepp-

>I have a vtkImageData object and I want to convert this into an unstructured
>grid to use the unstructured grid writer object. Unfortunately I don't have
>any clue how to do this. If anybody can should me a way or give me a hint I'd
>really appreciate it. On the other hand if there is there's the possibility
>to write the vtkImageData directly it would be sufficient too.

I recommend that you use vtkXMLImageDataWriter. As a matter of fact, I 
recommend that everybody starts using the VTK XML file formats (there many 
supporting the spectrum of VTK data objects---you need the VTK4.2 release). 
Brad King did a great job implementing this functionality: the files can be 
written in pieces for parallel IO, support portable compression, provide 
random access, etc. There is a document extracted from the VTK User's Guide 
found at http://www.vtk.org/pdf/file-formats.pdf that describes them in 
detail and gives some examples of how to use them.

Will







More information about the vtkusers mailing list