[vtkusers] vtkXMLImageDataWriter, writes file?
kent williams
nkwmailinglists at gmail.com
Thu May 28 14:49:53 EDT 2009
If you specify a relative path (i.e. a path not beginning with '/')
writing a file relative to the current working directory. This isn't a
VTK thing, it's pretty much universal to all operating systems.
And to specify where to write a file, you'd prepend the filename with
that directory path.
There are a number of platform-independent path functions available in
Kitware's kwsys library -- this shows up as vtksys in VTK. The
vtksys::SystemTools class has a number of path manipulation tools that
make dealing with this sort of thing a little easier.
On Tue, May 26, 2009 at 2:27 AM, Chris N <alucard006 at msn.com> wrote:
> Hi,
>
> I'm currently trying to make use of Paraview program but I need a *.vti type
> file. So I'm trying to make use of vtkXMLImageDataWriter and read through
> its library details. I noticed they had a test file which I used it's few
> lines of writing out a file. Such as...
>
> //WRITER - Save the result of the filter in a file
> vtkXMLImageDataWriter *writer = vtkXMLImageDataWriter::New();
>
> writer->SetInputConnection(vtkPolyDataMapper::skinMapper->GetOutputPort());
> writer->SetFileName("image.vti");
> writer->SetDataModeToBinary();
> writer->Write();
> writer->Delete();
>
> My problem is when I run the program I don't have an image.vti file
> anywhere. I've scanned through my computer a few times but nothing comes
> up. What are some possible problems why it doesn't run? Also where would
> it write my file to? Can I set my directory location within the argument of
> SetFileName() function? Thanks
>
> Chris
>
> ________________________________
> Hotmail® goes with you. Get it on your BlackBerry or iPhone.
> _______________________________________________
> 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