[vtkusers] Stream line problem

Mohammad Nazrul Islam int64380 at stud.uni-stuttgart.de
Fri Feb 8 04:30:47 EST 2008


Hi all,
I have position vector file in text format and I have the following code to generate a streamline but I am not getting any output.

Could anybody tell help me please to find the problem.

vector=vtk.vtkFloatArray()
vector.SetNumberOfComponents(3)
vector.SetNumberOfTuples(lines)

slineGrid=vtk.vtkUnstructuredGrid()
slineGrid.SetPoints(points)
slineGrid.GetPointData().SetVectors(vector)

delny = vtk.vtkDelaunay3D()
delny.SetInput(slineGrid)
delny.SetTolerance(0.1)
delny.SetAlpha(0.5)
delny.BoundingTriangulationOff()

line=vtk.vtkLineSource()
line.SetResolution(25)

integ=vtk.vtkRungeKutta4()
streamline=vtk.vtkStreamTracer()
streamline.SetInputConnection(delny.GetOutputPort())
streamline.SetSource(line.GetOutput())
streamline.SetMaximumPropagation(500)
streamline.SetMaximumPropagationUnitToTimeUnit()
streamline.SetInitialIntegrationStep(0.5)
streamline.SetInitialIntegrationStepUnitToCellLengthUnit()
streamline.SetIntegrationDirectionToBoth()
streamline.SetIntegrator(integ)


and then mapper, actor and rendering stuff. 

Thanks and br,
Nazrul




More information about the vtkusers mailing list