[vtkusers] Convert a .vtk file into 'structured points data file'
Amy Squillacote
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
vtkXMLImageDataWriter:
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
the vtkStructuredPointsWriter:
http://www.vtk.org/doc/nightly/html/classvtkStructuredPointsWriter.html, and
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.
- Amy
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
> file.
>
> 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
> 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/20090325/d449aa9c/attachment.htm>
More information about the vtkusers
mailing list