Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8753943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:31:38+00:00 2026-06-13T13:31:38+00:00

I have visualized some arrows from a vtk file, and now I am trying

  • 0

I have visualized some arrows from a vtk file, and now I am trying to visualize the stream lines in python by using the VTK package. I can get arrows but not the streamLines. The code;

# File:        wind.py
from vtk import *

reader = vtkStructuredPointsReader()
reader.SetFileName("wind.vtk")
reader.Update()

cubeOutline = vtkOutlineFilter()
cubeOutline.SetInputConnection(reader.GetOutputPort())
cubeMapper = vtkPolyDataMapper()
cubeMapper.SetInputConnection(cubeOutline.GetOutputPort())

cubeActor = vtkActor()
cubeActor.SetMapper(cubeMapper)
cubeActor.GetProperty().SetColor(1.0,1.0,1.0)

arrow = vtkArrowSource()
arrow.SetTipRadius(0.2)
arrow.SetShaftRadius(0.075)

arrowGlyph = vtkGlyph3D()
arrowGlyph.SetInputConnection(reader.GetOutputPort())
arrowGlyph.SetSource(arrow.GetOutput())
arrowGlyph.SetScaleFactor(0.05)

arrowMapper = vtkPolyDataMapper()
arrowMapper.SetInputConnection(arrowGlyph.GetOutputPort())

arrowActor = vtkActor()
arrowActor.SetMapper(arrowMapper)

points = vtkPointSource()
points.SetRadius(3.0)
points.SetNumberOfPoints(20)

streamers = vtkStreamLine()
streamers.SetInputConnection(reader.GetOutputPort())
streamers.SetSource(points.GetOutput())
streamers.SpeedScalarsOn()
streamers.SetMaximumPropagationTime(100)
streamers.SetIntegrationStepLength(0.2)
streamers.SetTerminalSpeed(0.1)

streamMapper = vtkPolyDataMapper()
streamMapper.SetInputConnection(streamers.GetOutputPort())
streamMapper.SetScalarRange(reader.GetOutput().GetScalarRange())

streamActor = vtkActor()
streamActor.SetMapper(streamMapper)

ren = vtkRenderer()
ren.SetBackground(.2, .2, .2)

renWin = vtkRenderWindow()
renWin.SetSize(800, 600)
renWin.AddRenderer( ren )

iren = vtkRenderWindowInteractor()
iren.SetRenderWindow( renWin )

ren.AddActor(cubeActor)
ren.AddActor(arrowActor)
ren.AddActor(streamActor)

renWin.Render()
iren.Initialize()
iren.Start()

I cannot see what I am missing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:31:38+00:00Added an answer on June 13, 2026 at 1:31 pm

    I have little experience visualizing streamlines and the experience I do have is with vtkteem (vtkSeedTracts).

    I assume that the points you are specifying are used as seeds for the streamlines to form from. If that is the case, shouldn’t you also specify a location for these points? I don’t know what your data is like, but I have a feeling that the streamlines aren’t visible because the seed points aren’t specified correctly.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using mayavi in python to visualize some data. I have a surface in
I'm trying to visualize some data I have stored on a regular grid using
I have a PyQt program used to visualize some python objects. I would like
I have been using gnuplot for some time now and set terminal pdfcairo set
I have been working on JUNG2 for a while now, trying to visualize a
I have some data that I would like to visualize. Each byte of the
I have some data about a day's events that I'm trying to visualise as
I have a very large possible data set that I am trying to visualize
I have a large tree. I want to be able to visualize it using
I want to visualize some data in my Windows Phone app. So I'm using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.