Ultrasound Guided Regional Anesthesia Training Simulator Using Ultrasound Guided Regional Anesthesia Training Simulator Using Microsoft Kinect Microsoft Kinect

Abstract We present a system for the interactive simulation of ultrasound guided peripheral nerve blocks using a Microsoft Kinect®. The system performs motion tracking of both the ultrasound probe and the nerve block needle. Software generates synthetic ultrasound images from previously captured ultrasound images. Details of the software elements in the system are described. Some of the current challenges and future work in this research are discussed.


Introduction
Regional anesthesia and peripheral nerve blocks are among the most important tools used by anesthesiologists in different practice settings. Ultrasound (US) guided peripheral nerve blockade has gained popularity among anesthesiologists over the past two decades [1,2]. US guidance transformed peripheral nerve blocks from blind procedures based on anatomical landmarks or indirect methods to localize different nerves to procedures where the anesthesia provider is able to visualize the target nerve and the surrounding structures, introduce the block needle towards the target, and observe the local anesthetic being injected surrounding the nerve in real time. Using US to guide performance of peripheral nerve blocks is associated with higher success rate, less patient discomfort, and less time of block performance [2,3].The learning curve for ultrasound guided peripheral nerve blocks is steeper than conventional techniques. Learning how to perform US-guided peripheral nerve blocks is a two-step process [4]. The first step is learning the two-dimensional sonoanatomy and interpretation of the US images as they relate to the three-dimensional gross anatomy. The second step is mastering handeye coordination and driving the needle towards the target nerve and keeping it in the plane of the US beam. This later step can be especially frustrating for the novice and for practicing anesthesiologists who Abstract We present a system for the interactive simulation of ultrasound guided peripheral nerve blocks using a Microsoft Kinect®. The system performs motion tracking of both the ultrasound probe and the nerve block needle. Software generates synthetic ultrasound images from previously captured ultrasound images. Details of the software elements in the system are described. Some of the current challenges and future work in this research are discussed.

Keyword
Ultrasound, Kinect, Simulation, Needle, Volumetric Slicing, OpenGL, OpenCV want to incorporate US into their regional anesthesia practice [5]. Traditionally, this skill set is acquired during anesthesia training through performance of these procedures on patients under supervision. There is a growing consensus that it is not acceptable to use patients to gain this early experience [6]. The use of phantom models to practice needle advancement under ultrasound guidance can be a reasonable alternative. Available phantom models are either solid blocks of gel or other materials, or other models that attempt to simulate the anatomy of the target region. A major pitfall of these models is that the anatomical configurations of these models are very primitive and basic, hardly representing the real US images of the area of the target nerve [7]. Therefore, simulation of peripheral nerve block procedures using real US images is an appealing and sensible alternative. In this manuscript, we present a simple and relatively inexpensive prototype for a simulator/trainer for US guided femoral nerve block. The femoral nerve is located lateral to the femoral artery below the inguinal ligament. The nerve is located outside the femoral sheath and is separated from the femoral artery by the fascia iliaca.

Materials and Methods
The simulation system consists of four components: a block needle, a mock ultrasound probe, a dummy in which the needle can be inserted ( Figure 1) and a Microsoft Kinect. Color markers are attached to the needle and probe so that they may be consistently and accurately tracked by the Kinect (Figure 2). Simulation of ultrasound guided needle placement requires generating serial real US still images displayed on a laptop screen based on the position and orientation of the probe on the dummy. This requires detection of the positions and orientations of probe and needle in 3D. We use a Microsoft Kinect ® for tracking positions and orientations of the probe and needle.
The training system consists of two software modules (1) the tracking module, for identifying the position and orientation of both the needle and the probe in three dimensions, and (2) the module for generating ultrasound images in real time. The latter module involves two steps: generating volumetric data based on previously captured serial ultrasound images and real time rendering of appropriate slices through a volumetric dataset.
The system comprises an offline pre-processing phase and an online training phase. The offline phase first converts a sequence of ultrasound images into a unified volumetric data format, which is then used throughout the simulation. Prior to starting the training session, a calibration step is carried outthat allows the Kinect to acquire the colored markers to be tracked during the simulation. This step makes use of some simple assumptions relative to the initial positions of needle and probe with respect to the Kinect. After these preprocessing steps, the training sessions may begin. Each session consists of a repeated loop of tracking and display update operations which terminates when the trainee has the needle in the correct position or else has failed to reach the desired target. Within this loop, first step is to find the spatial locations of both the needle and the probe in three dimensions as well as the orientation of probe. The second step virtually slices the volumetric data along the plane of the probe and the third step generates a synthetic ultrasound image along that slice. In addition, a virtual needle is added into the slice image if it the trainee is able to place the needle in the US plane and steer it successfully towards the image of the target, femoral nerve. This loop is repeated every frame at 30 Hz to sense the needle and probe configuration, update the observed synthetic image, and reflect their combined spatial relationship. This workflow is diagrammed in Figure 3.

Volumetric Data
Volumetric Rendering is a popular means of visualization in medical studies [8,9]. It can be used for projecting 3D data into a 2D image. This technique has some variants, one of which is Volumetric Slicing; details of this process are discussed below. Volumetric data is a three-dimensional discretized grid structure in which space is partitioned into equal-sized volume elements (voxels). The voxels are typically cubes or parallelepiped structures. Each voxel has some data associated with it. Here each voxel need only contain a single value (which may be considered as density values).

Generation of Volumetric Data
The ultrasound dataset we used was provided by staff physicians at Penn Presbyterian Medical Center, University of Pennsylvania. It contained a set of ultrasound images of the femoral nerve. The images were taken along short axis of the femoral nerve serially at 5 mm spacing. The basic mechanism of generating volumetric data from images is simple. The width and height of the grid is same as the width and height of the given images. The depth of the grid ( Figure 4) is equal to length of the femoral nerve scanned, which can be calculated by:

depth = (number of images -1)*(distance between images)
Given this grid size, we can still choose the number of voxels to be fitted into this grid along each direction. For maximum visual accuracy, the number of voxels along each direction was set equal Now that the grid size and number of voxels have been decided, the next step is to identify or compute the densities present in each voxel. It is easy to determine the density contained in those voxels where image data is directly available. Since the input images are in gray scale, densities can be found by scaling the gray scale value of each pixel to the range 0 to 1. The density of voxels in between two images is calculated by simple linear interpolation of the voxels in the corresponding position in the two neighboring planes. Practically storing the entire grid is infeasible because it is too big to fit into cache memory and will slow down the entire system. So, only the voxels which are present in one of the image planes are stored. If voxels between images are needed, then the inexpensive linear interpolation is performed instantaneously.
The Microsoft Kinect produces two important information streams: a color image and a depth image. The color image stream is used to help identify the markers, which are then used for finding the positions of probe, needle and dummy. The OpenCV library has been used for image processing. OpenCV (Open Source Computer Vision Library) is a library of programming functions mainly aimed at real-time computer vision.Using OpenCV's implementation of the CamShift algorithm, the marker positions are found in 2D image space coordinates. The depth image is then queried based on the 2D coordinates to find the third dimension.

Depth And Color Images Calibration
Unfortunately, there is no one-to-one correspondence between the color image and the depth image streams.Through experimentation, however, an empirical formula that works well in the research setup was found. The procedure used for this is illustrated in figures 5, 6 and 7. The depth and color image for the same scene were collected, the depth map was made transparent and overlaid on top of the color image, then it was moved and zoomed to match some key points like corners of objects in the color image.

Marker Design
The probe has three markers attached to it for finding both its position and orientation. The needle has only two markers attached to it, as the rotation of the needle along its own axis is irrelevant. The needle parameters include its axis orientation and the tip position. Both of these can be found using the two markers. The only parameter of interest about the dummy is its distance from the Kinect, as the other parameters of the dummy remain fixed. This parameter allows us to compute the positions of needle and probe with respect to the dummy. Only one marker is needed for getting this information.
For CamShift Algorithm to work accurately and to produce precise locations of the different markers, it is important to use highly contrasting colors for the markers. Since all of the markers are affixed to their respective objects, the distance between the markers on each object are also fixed. We follow the convention of representing the distance between any two points P1 and P2 as L (P1, P2). We get the coordinates of the probe's bottom surface center point as:   The basic mechanism of this algorithm is to march across the entire slice plane and project all the points that are encountered during this process onto an output image. We can calculate the upper left corner of the slice plane using the formula: At every point of the slice plane we must read the density value stored at the voxel in which we are currently located and project it onto the output image.
The projection algorithm converts a 3D world position into a 2D image position. The basic mechanism is to find the positions of all points in the slice plane with respect to any one point in the same plane. For convenience we can choose the "real center" of the slice plane (referred to as r) as the reference point. The point r maps to the center of the output image. The Up vector maps to the vertical direction in image space and the horizontal vector maps to the positive X direction in image space.
Thus for any point p in the slice plane (Figure 11), we can find its co-ordinates with respect to r as: ( ). In addition to slicing of volumetric data and visualization, we provide needle visualization too. This has been achieved by checking for the needle's presence during data slicing. To determine whether the needle is present in a particular 3D location, say x, we must perform certain tests. First, the projection of x on the needle axis should lie within the needle's length. Let us define a vector y as: The tests are: dotProduct (y, needleAxis) ≥ 0

dotProduct (y, needleAxis) < needleLength
Secondly, we must check if the distance of x from the needle's axis is less than the radius of the needle. Let us define a vector w as:

w=y-dotProduct (y,needleAxis) ✳ needleAxis
The test is: If both these tests pass, then needle is present at location x. The needle visualization can be achieved by increasing the brightness of the portions of images where needle is present in proportion to the distance of the location from the needle's axis.

User interface
We designed a graphical user interface for the prototype testing version to allow the trainee to use the system easily. The interface contains four components: Scene Video, Marker initializer, Control Panel, and Dashboard. Figure 12 shows the four components of the interface: A. Scene Video. This part displays the video that Kinect sensor captures. Once a marker is identified and tracked, a red circle will show up around it. If the marker is correctly tracked, its mass center will overlap with the circle's mass center.
B. Marker Initializer. This part contains three tabs: Probe, Needle and Dummy. For each tab, a model is shown to help illustrate the markers. The user simply needs to click on the "reset" button for the marker to trigger its tracker. Then the marker in the model image would be surrounded with a red boundary. Then the user could easily initialize the marker tracker by clicking on the real marker in the scene video. If the marker is persistently tracked, the user should just click "confirm" and the red boundary of the model marker would turn green to disable the tracker.
C. Control Panel. After configuring all the six markers for the probe, needle and dummy, the user could click the "run" button to start sending the 3D spatial information of them to the renderer and generate the ultrasound image accordingly. If the user could reinitialize the markers at any time by clicking on the "reset" button. The "start" button is the switch for start the video scene.
D. Dashboard. The dashboard is designed to display the 3D spatial information of the markers is captured by the Kinect sensor in real time to make sure the data is collected properly.

Results
A working prototype of the concept has been built which is capable of producing synthetic ultrasound images based on real ultrasound images ( Figure 13). The upper left corner window gives the color image captured by the Kinect along with the positions of the markers displayed. The lower left window displays the probe's center and needle's center positions. The lower right window shows the Kinect depth image. The top right corner window shows the visual simulation. This window shows ultrasound images generated based on the position of the probe on the dummy along with the virtual needle visualization. Images are generated in real time and changes in the position or orientation of probe or needle are immediately reflected in the updated images ( Figure 14).

Discussion
The femoral nerve has been chosen as the prototype for this simulator for two reasons. The first reason is theconsistent location of the femoral nerve lateral to the artery which makes tracing the nerve through serial cuts below the inguinal ligaments relatively easy. The second reason is the frequency by which the femoral nerve block is performed as part of the US guided regional anesthesia practice. Femoral nerve block has been considered to be the gold standard of analgesia after total knee arthroplasty in some institutions [10]. Simulation of US guided peripheral nerve blocks improves the performance of the anesthesia trainees. Niazi et al found higher success rate of US guided nerve blocks among trainee who used simulation when compared to those who did not [11]. Another recent study concluded that implementing a real-time feedback-based training has significantly improved UGRA-related cognitive and technical skills and proficiency of pediatric anesthesia trainees [12].
The most important characters in an interactive system are fidelity and latency. The virtual image stream generated by the system should closely match images generated by a functional ultrasound machine. The latency (delay in time) between a change in probe or needle position (or orientation) and the display should be minimal. The information obtained from the tracking module is used for generating synthetic ultrasound images.
The images generated by the simulation system closely match the real US images generated during scanning of the femoral nerve thus fulfilling the fidelity criteria. The images that are generated faithfully reflect changes in the position or orientation of needle or probe almost instantly, thus also meeting the latency criteria. We observed that the reproduced images in response to probe motion are very accurate. However, the needle visualization requires more refinement. It is quite challenging to get the needle in view, which could be beneficial for training purposes. It is our expectation that the needle visualization could be improved by adjusting the mechanical components of the system, such as stabilizing the markers on the block needle. Other stabilization algorithms such as the Kalman Filter [13] can be used to improve the needle visualization. When the position of the needle is controlled using a keyboard (during testing), very stable images like the one shown in Figure 13 are generated.
This prototype system has demonstrated that it is possible to use the Kinect for generating ultrasound images based on the position of the probe on the dummy. The probe itself does not need to be connected to an ultrasound sensor, as we have used real human ultrasound images as a surrogate. This significantly lowered the cost of our simulation system. We have also demonstrated the feasibility of using the Kinect for needle position tracking. Previous studies has shown that US guided simulation can improve performance of the inexperience anesthesia residents and improve the trajectory of their learning curve of US guided nerve blocks [4,14]. In conclusion, our preliminary work showed that a low-cost nerve block training system based on Microsoft Kinect environment for anesthesiologists is feasible and worthwhile of further investigation.

Future Directions
We plan to refine this prototype to include more stable and smaller markers applied to the components of the trainer. The same concept can be applied to reproduce US images for different types of nerve blocks (Popliteal nerve block, brachial plexus blocks,..etc.). In addition, we propose to test the effectiveness of our system in evaluating regional anesthesia skills of each trainee.