[vtkusers] [Newbie] How to open a .vtk file?

Arturo Caissut arturo_caissut at tiscali.it
Tue Feb 10 06:54:03 EST 2009


Sorry, I forgot something:
if you don't want to write any program and you prefer to use something 
already existing instead, let us know which kind of manipulation you 
need to do on your PolyData files.
There are lots of programs, suites, tools, pieces of code already 
prepared by someone else and freely available on the Internet, so if you 
just need to handle some data maybe it's possible to find something for you.


Regards,
Arturo



Arturo Caissut ha scritto:
> Hi Irene,
>
> I suppose you're talking about writing a vtk based program.
> In order to read a PolyData file you should begin whit a 
> vtkPolyDataReader object
>
> If you're working with C++ (i.e.) you should write something like
>
>
> #include <vtkPolyDataReader.h>
>
> int main (){
>
> vtkPolyDataReader *p_reader = vtkPolyDataReader::New();
> p_reader->SetFileName("PATH_TO_YOUR_FILE/yourfile.vtk");
> p_reader->Update();
>
> /*SOMETHING ELSE*/
>
> p_reader->Delete();
>
> }
>
> Now you can set your filter to redirect its output to a vtkPolyData 
> object or to any other appropriated "step".
> If you read class references here 
> http://www.vtk.org/doc/nightly/html/classvtkPolyDataReader-members.html 
> you'll easily figure out how to do many interesting things, but of 
> course for any request I'll (better say "we'll", I'm sure) be glad to 
> help you.
>
>
> Have a good day,
> Arturo
>
>
>
>
>
>
> Irene Kostopoulou ha scritto:
>> Hello all,
>>
>> I have a polygon data .vtk file, as a result of model making 
>> (marching cubes) of 3d slicer joint apllied to a segmentation of 
>> blood vessels of mra images. As I'm not familiar with the vtk program 
>> nor the vtk file format, I need some suggestions.
>> How can I open this vtk file and take the polygon points? I'm not 
>> interested only in visualization of the vtk file, but I also need to 
>> process the data in it, but unfortunately I don't even know how to 
>> open it. I have the binary 5.2 version of vtk installed in my pc.
>>
>>
>> Thanks and sorry for my newbie questions.
>>
>> I appreciate any help,
>> Irene
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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