[vtkusers] Some things cannot be saved as VTP?
Bryn Lloyd
blloyd at vision.ee.ethz.ch
Wed Feb 4 11:11:56 EST 2009
You could write your own tool in C++ or python. The main part (in
python) is:
#!/usr/bin/env python
import os,sys,string
from libvtkCommonPython import *
from libvtkRenderingPython import *
from libvtkGraphicsPython import *
from libvtkIOPython import *
from libvtkFilteringPython import *
from libvtkWidgetsPython import *
from libvtkImagingPython import *
reader = vtkPolyDataReader()
reader.SetFileName(fname)
fillholes = vtkFillHolesFilter()
fillholes.SetInputConnection(reader.GetOutputPort())
fillholes.SetHoleSize(1.e6)
writer = vtkPolyDataWriter()
writer.SetInputConnection(fillholes.GetOutputPort())
writer.SetFileName(output )
writer.Update()
You could, however, use the Python Programmable filter in Paraview.
Copy the vtkFillHolesFilter section (python code above) into the text
field ...
--Bryn
daviddoria wrote:
> Is that available in paraview? Or I'd have to setup a framework to load the
> file and run vtkFillHolesFilter in c++?
>
>
> Bryn Lloyd-2 wrote:
>> Try vtkFillHolesFilter ...
>>
>>
>> --Bryn
>>
>>
>>
>>
>> daviddoria wrote:
>>> Excellent - we're getting close!
>>>
>>> http://rpi.edu/~doriad/car_holes.jpg
>>>
>>> With alpha=.1, the side view mirrors looks much better. However, as you
>>> can
>>> see there are still big holes where the windows are (there were few to no
>>> points on the windows, so of course this is the case). Now is there
>>> anyway
>>> to fill the window holes and keep the mirrors at the same time (remember
>>> the
>>> windows are covered in this: http://rpi.edu/~doriad/car.jpg). Also,
>>> there
>>> is no bottom to the car (as again there are no points). I suppose this
>>> would
>>> close the same way the windows will (if we can do that at all?)
>>>
>>> Thanks for all the help.
>>>
>>> Dave
>>
>> --
>> -------------------------------------------------
>> Bryn Lloyd
>> Computer Vision Laboratory
>> ETH Zürich, Sternwartstrasse 7
>> CH - 8092 Zürich, Switzerland
>> Tel: +41 44 63 26668
>> Fax: +41 44 63 21199
>> -------------------------------------------------
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
--
-------------------------------------------------
Bryn Lloyd
Computer Vision Laboratory
ETH Zürich, Sternwartstrasse 7
CH - 8092 Zürich, Switzerland
Tel: +41 44 63 26668
Fax: +41 44 63 21199
-------------------------------------------------
More information about the vtkusers
mailing list