Tired of copying data manually? Skope’s new data managing application called skope-dm connects to the Camera Acquisition System and the scanner to collect trajectory and MR data in real-time. The application processes the two streams on-the-fly and either stores the data in a combined ISMRMRD file or forwards it on to another ISMRMRD-compatible application.
- Manually exporting scanner and camera data is time-consuming
- The scanner is blocked for other experiments while the data is being written to file
- Combined MR and trajectory data is not available during the scanning session
The aim of skope-dm is to improve the workflow for field-monitoring by automatizing data transfer and data combination. The MR data can be converted to the open-source ISMRMRD format and combined with the camera data while the scan is still running. This reduces the processing time as well as the size of the stored data.
It is all connected!
skope-dm is a TCP server/client application that runs on a separate computer. It receives raw field probe data from the Camera Acquisition System and MR coil data from the scanner via two wired connections. The scanner data must be provided as an ISMRMRD data stream. The output of skope-dm is another ISMRMRD stream or a ISMRMRD (hdf5) file that contains merged camera and scanner data. The combined data stream can be forwarded to another ISMRMRD-compatible application to perform further processing steps such as image reconstruction.
Camera and scanner data streaming
Conversion of MR coil data to the ISMRMRD format must be performed by the scanner. The scanner data and field-probe signal, which is streamed by the Camera Acquisition System, is processed in real-time by skope-dm. skope-dm estimates the delay between the scanner and camera data based on the synchronization pre-scans performed on both systems. Once the delay is known, the transmitted field-probe data is filtered and resampled to match the timing of the scanner acquisitions. Skipped camera acquisitions can be interpolated in case of 2D imaging (label interpolation). The combined data stream is written to an ISMRMRD (hdf5) file or send onward to another streaming client.
skope-dm uses the ISMRMRD format to receive scanner data and to forward combined camera and scanner data on to other applications. The ISMRMRD protocol relies on a stream of messages that are sent asynchronously via a TCP/IP interface. Each message is preceded by an ID that allows the receiver to correctly interpret the subsequent data package. In the past, Skope software tools were relying on a slightly modified ISMRMRD format but in the spirit of open and reproducible research skope-dm is and will be adhering to the official format as specified on the ISMRMRD community’s GitHub webpage.
The information stored in the flexible MRD header must be transmitted by the scanner at the start of the measurement. The length of the null-terminated XML header is transmitted after sending the message ID (= 3). The schema for the XML header can be found on GitHub.
Coil and trajectory data is transmitted as outlined below. The fixed data header transmitted after the message ID (= 1008) contains the information required to calculate the size of the appended trajectory and coil data. If the trajectory dimension is zero, no trajectory data was transmitted.
Write your own processing node
The user can customize the processing pipeline by adding additional nodes written in Python. The example node below creates a new ISMRMRD file, collects the individual acquisitions and finally saves the data to disk. The new external Python node is added to the processing pipeline by modifying the XML configuration file that is provided to skope-dm at startup.
Field monitoring and image reconstruction
skope-dm has the same requirements on the used sequences as the previous offline merging tools of skopeTM-i. The scanner can start a measurement on the Skope Camera Acquisition System by sending a TTL trigger event before the image encoding gradients are played out. Data synchronization between the scanner and the camera is achieved via synchronization prescans that are played out before the actual imaging sequence.
The user can choose to modify existing sequences or use one of the Pulseq sequences that are provided on Skope’s GitHub page as a starting point.
Some scanners (e.g. Siemens, GE) modify dynamically the demodulation frequency of the spectrometer to compensate for B0 eddy currents (EC). This correction is done based on the nominal gradient input and a scanner-specific EC model. The correction only affects the phase of the raw data and cannot be turned off. The Field Camera measures the actual fluctuations, which have a much higher accuracy than the model-based EC corrections. The measured EC phase can only be applied to the data once the scanner corrections have been undone. skope-dm contains a work-in-progress (WIP) processing node that allows to undo the scanner EC compensation. If the simulation files are not available, the user can choose to leave the scanner data untouched and remove the zeroth order field basis term (k0) from the camera data. Knowing the nominal gradient input, the phase modulation applied by the scanner can be calculated. For Pulseq sequences, the nominal gradient waveforms and receiver event timings can be extracted from the sequence file. Native Siemens sequences need to be simulated to extract the required information.
Field measurement automation
The Field Explorer, skopeTM-fx, is the application running on the Camera Acquisition System. The user can set the required acquisition parameters for field monitoring on the graphical interface of the application. Manual setting of the parameters for each scan protocol can be tedious and error-prone. A natural and recommended partner of skope-dm is the field measurement automation option of skope-fx. The module allows the Camera Acquisition System to be controlled remotely by another device, i.e. the scanner.
The TCP server of skope-fx awaits connection requests from external clients and can handle the following commands:
|Check if AQ System is ready for action||Check if a scan is running||Get data storage folder||Set data storage folder|
|Get parameters from user interface||Set parameters on user interface||Reset default parameters||Run offresonance and position calibration|
|Close TCP/IP connection|
The code for the TCP client must be added to the scanner software by the user. Example code is available on request for C++, MATLAB, Python and LabView. Please contact your local Skope sales representative for more information about this feature.