Hi Francesco,
welcome to the mailing list! Sorry you have experienced the "jet lag"
at your first post, but I usually get there within a week...
Anyway, you probably should need to import vmtksurfacedistance. If
I were you, I'd just use the Python-wrapped C++ classes directly, i.e.
from vmtk import vtkvmtk
normalsFilter = vtk.vtkPolyDataNormals()
normalsFilter.SetInput(referenceSurface)
normalsFilter.AutoOrientNormalsOn()
normalsFilter.SetFlipNormals(0)
normalsFilter.Update()
referenceSurface.GetPointData().SetNormals(normalsFilter.GetOutput().GetPointData().GetNormals())
surfaceDistance = vtkvmtk.vtkvmtkSurfaceDistance()
surfaceDistance.SetInput(surface)
surfaceDistance.SetReferenceSurface(referenceSurface)
surfaceDistance.SetDistanceArrayName("Distance")
surfaceDistance.SetDistanceVectorsArrayName("DistanceVectors")
surfaceDistance.SetSignedDistanceArrayName("SignedDistance")
surfaceDistance.Update()
distanceSurface = surfaceDistance.GetOutput()
Hope this helps
Luca
On Apr 5, 2012, at 4:29 PM, Francesco Iannaccone wrote:
> Hi all
>
> I am new to this mailing list. I was playing with vmtk and
> vmtksurfacedistance that seem to work very nicely. I am using very
> large data to check the distances between 2 surfaces and I need to
> call this function many times.
> I have to import the result in pyformex ( a python based scripting
> program ) but as the data are huge and called many times I lose a lot
> of time in reading them.
> so I was thinking of importing vmtk into pyformex and using it directly.
> I am able to import vmtk, call the vmtksurfacedistance function , set
> all the input surfaces (read from the vtp files) and the array names
> but then the GetOutput() of the function always return an empty
> vtkPolyData object. How can I access this information from python
> without using the pype?
>
> Thanks in advance
>
> Francesco Iannaccone
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> vmtk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/vmtk-users
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
vmtk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vmtk-users