[vtkusers] Convert a .vtk file into 'structured points data file'
amylists at gmail.com
Wed Mar 25 13:42:53 EDT 2009
Is "v16" in the code below something that produces vtkImageData or
vtkPolyData? If it's vtkImageData, then you should use the
http://www.vtk.org/doc/nightly/html/classvtkXMLImageDataWriter.html, and use
the extension ".vti". If you want to save it in the older .vtk format, use
use the extension ".vtk".
Alternatively, if you used a series of images to create your volume, you
should be able to load those images directly into VolView.
If your data really is polygonal, then you'll need to resample it onto a
volume (vtkImageData), and then save out that volume using one of the
methods described above.
On Mon, Mar 23, 2009 at 11:42 AM, <nourmestiri at yahoo.fr> wrote:
> Hi all vtk users.
> I make the 3D reconstruction of a human skull and i want to use VolView to
> create an AVi file for this volume. The problem is that i saved my volume
> like this:
> vtkXMLPolyDataWriter *vtkObject = vtkXMLPolyDataWriter::New();
> vtkObject ->SetInput(v16->GetOutput());
> vtkObject ->SetFileName("C:/Skull.vtk");
> vtkObject ->SetDataModeToAscii();
> vtkObject ->Write();
> vtkObject ->Delete();
> When i try to open "Skull.vtk" usin VolView, i have this error message "The
> VTK file specified is either invalid or not a structured points data file.Of
> the different data types that vtk files can contain, only structured points
> is suitable for volume rendering."
> So, the problem is taht my volume is not saved as a structures points data
> Can you help me and tell me how to convert the skull volume saved as
> "Skull.vtk" into structured points data file?
> Thank yous so much
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers