[vtkusers] error in using vtkCellLocator::IntersectWithLine
Mathieu Malaterre
mathieu.malaterre at kitware.com
Mon Apr 5 11:38:16 EDT 2004
xujf wrote:
> Hi,vtkusers:
> I get an isosurface using vtkImageMarchingCubes,and I get a line using vtklinesource.
> I want to get the point of intersection of the isosurface and the line.In order to get
> the point of intersection,I use vtkCellLocator::IntersectWithLine.But error is found:
> AttributeError:IntersectWithLine.
>
> this is my programe:(written in python)
>
> import sys,os
> from paths import *
> from vtkMINCReader import *
>
> reader=vtkMINCReader()
> reader.SetFileName("E:/picture/brain.mnc")
>
> filter=vtkImageMarchingCubes()
> filter.SetInput(reader.GetOutput())
> filter.SetValue(0,1200)
>
> tolerance=100.0
xujf,
Just after tolerance add:
filter.Update()
print filter.GetOutput().GetNumberOfCells()
If it is equal to zero you won't be able to go any furhter.
Mathieu
More information about the vtkusers
mailing list