Console.scan

Contents

Console.scan#

Console.scan()[source]#

Scan a stored design on the exam’s phantom; return the reconstruction’s status.

emit receives the scan clock after each span played, as {"clock": s, "duration": s}, then the reconstruction’s images as DICOM, {"dicom": base64, "name": file name}, converting those it returns as MRD, and its texts as {"text": ...}. With sound, each clock also carries the span’s sound as sound, base64 of 16-bit little-endian stereo samples at rate Hz. At a speed, the scan is simulated ahead of its clock, and until the clock starts emit receives {"preparing": s} about twice a second, with the wall-clock time left before it does, or null before there is an estimate. The status is 1 when a text reports a refused or failed series, or when the scan is cancelled.

A scan plays on the phantom’s isochromats in the slabs its excitation pulses excite, at the spacing max_isochromats allows. Scans of an exam that excite the same slabs play on the same isochromats, each from equilibrium, which keeps the pulses the engine has computed; a scan started while another plays has isochromats of its own.

recon names the reconstruction plugin. Without it, a design of a shipped scanner sequence is reconstructed with the shipped reconstruction paired with it in pulserver._zoo.ZOO_PAIRS. A console that reconstructs nothing ignores it.

Raises:

ValueError – If the console reconstructs, recon is None and the design is not of a shipped scanner sequence, as an imported design is not.