FAST icon indicating copy to clipboard operation
FAST copied to clipboard

MacOS Running issue

Open young-oct opened this issue 2 years ago • 2 comments

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

  1. install homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. install required package brew install openslide libomp
  3. In Anaconda pip install pyfast
  4. 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.

young-oct avatar Mar 23 '22 16:03 young-oct

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 avatar Mar 25 '22 08:03 smistad

@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...

young-oct avatar Mar 28 '22 18:03 young-oct

Not able to reproduce, closing.

smistad avatar Nov 11 '23 18:11 smistad

@smistad thanks for looking into it.

young-oct avatar Nov 11 '23 23:11 young-oct