-
Notifications
You must be signed in to change notification settings - Fork 103
Install FAST for Python
To install FAST for Python (3.6 or newer), first make sure you have all the necessary requirements installed.
Then you may simply install FAST using pip:
pip install pyfast
Alternatively, you can also download a Python wheel (pyFAST-X.X.X-cp36-abi3-X.whl) from the release page, and install it by:
pip install pyFAST-X.X.X-cp36-abi3-X.whl
To test that your installation works you can do the following:
# Start python
python
Then write the following python code, which will download a test dataset and display an ultrasound image on your screen:
import fast
fast.downloadTestDataIfNotExists() # This will download the test data (~2GB) needed to run the example
importer = fast.ImageFileImporter.New()
importer.setFilename(fast.Config.getTestDataPath() + 'US/Heart/ApicalFourChamber/US-2D_0.mhd')
renderer = fast.ImageRenderer.New()
renderer.setInputConnection(importer.getOutputPort())
window = fast.SimpleWindow.New()
window.set2DMode()
window.addRenderer(renderer)
window.start()
For more examples, see this page.
If you get an error saying something like "ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'" or "ImportError: numpy.core.multiarray failed to import". Try to completely remove numpy and reinstall:
Run the following command multiple times, until it says "Cannot uninstall numpy..":
pip uninstall numpy
Then reinstall numpy:
pip install numpy
pip uninstall pyfast
To delete the downloaded test data, and any cached data, simply delete the folders C:/ProgramData/FAST/ on windows, and /home/'your username'/FAST/ on Linux.
If this wiki page lacks some information or is incorrect please let us know! You can edit this wiki page yourself, send an email to ersmistad@gmail.com or