Skip to content

Example: Python

Erik Smistad edited this page Mar 9, 2017 · 3 revisions

The semantics of the python bindings are very similar to C++. Below is an example of how to import an image and display it in a window.

import fast
importer = fast.ImageFileImporter.New()
importer.setFilename(fast.Config.getTestDataPath() + 'US/US-2D.jpg')

renderer = fast.ImageRenderer.New()
renderer.setInputConnection(importer.getOutputPort())

window = fast.SimpleWindow.New()
window.set2DMode()
window.addRenderer(renderer)
window.start()
Clone this wiki locally