FAST
FAST copied to clipboard
MacOS Running issue
Describe the bug I installed FAST on MacOS12.2.1 (21D62) but I can’t run this https://fast.eriksmistad.no/scan_convert_iq_data_8py-example.html example
Please do not use issues for questions. Use the gitter chat for questions and discussions: https://gitter.im/smistad/FAST
To Reproduce
- install homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- install required package brew install openslide libomp
- In Anaconda pip install pyfast
- In pycharm run the code provided in this example import fast import numpy as np import matplotlib.pyplot as plt
Create some fake IQ beamspace data
iq_data = fast.Image.createFromArray(np.random.normal(size=(512,512,2)).astype(np.float32))
Add some geometric data used for scan conversion
iq_data.setFrameData('isPolar', 'true') iq_data.setFrameData('startRadius', '0') iq_data.setFrameData('stopRadius', '0.12') iq_data.setFrameData('startTheta', '-0.785398') # Start and stop angle in radians iq_data.setFrameData('stopTheta', '0.785398') iq_data.setFrameData('depthSpacing', '0.000235') iq_data.setFrameData('azimuthSpacing', '0.003074')
Create processing & visualization chain
envelope = fast.EnvelopeAndLogCompressor.create()
.connect(iq_data)
scan_convert = fast.ScanConverter.create()
.connect(envelope)
renderer = fast.ImageRenderer.create()
.connect(scan_convert)
fast.SimpleWindow2D.create()
.connect(renderer)
.run()
Visualize output of scan converter with matplotlib instead of FAST:
plt.imshow(np.asarray(scan_convert.runAndGetOutputData())[..., 0], cmap='gray') plt.show()
System:
- MacBooks Pro 2019. MacOS12.2.1 (21D62)
- Radeon Pro Vega 20 4 GB
- Intel UHD Graphics 630 1536 MB
Expected behavior fake IQ data will show up Screenshots Error message from pycharm qt.qpa.window: <QNSWindow: 0x7fac7d9f6bb0; contentView=<QNSView: 0x7fac7d9f68f0; QCocoaWindow(0x6000031a5810, window=QWidgetWindow(0x6000022ed380, name="QGLWidgetClassWindow"))>> has active key-value observers (KVO)! These will stop working now that the window is recreated, and will result in exceptions when the observers are removed. Break in QCocoaWindow::recreateWindowIfNeeded to debug.
The example runs fine on my Mac running macOS 10.15 with system python 3.10. Can you try running the example without anaconda, just using a clean python environment?
@smistad Thanks for getting to me. I gave it a try running with using anaconda. but still not working qt.qpa.window: <QNSWindow: 0x7fa2b8fdb2b0; contentView=<QNSView: 0x7fa2b8fdaca0; QCocoaWindow(0x600001eecfd0, window=QWidgetWindow(0x600000de9f20, name="QGLWidgetClassWindow"))>> has active key-value observers (KVO)! These will stop working now that the window is recreated, and will result in exceptions when the observers are removed. Break in QCocoaWindow::recreateWindowIfNeeded to debug. WARNING [0x1129a3600] Kernel binary Algorithms/Ultrasound/EnvelopeAndLogCompressor.cl is out of date. Compiling... WARNING [0x1129a3600] Kernel binary /ImageMinMax.cl is out of date. Compiling... WARNING [0x1129a3600] Kernel binary Algorithms/Ultrasound/ScanConverter.cl is out of date. Compiling...
Not able to reproduce, closing.
@smistad thanks for looking into it.