Presentation is loading. Please wait.

Presentation is loading. Please wait.

I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications MAY 09-10 Advisor / Client: Dr. Namrata Vaswani Team: Aaron Logan (EE) Dylan.

Similar presentations


Presentation on theme: "I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications MAY 09-10 Advisor / Client: Dr. Namrata Vaswani Team: Aaron Logan (EE) Dylan."— Presentation transcript:

1 I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications MAY 09-10 Advisor / Client: Dr. Namrata Vaswani Team: Aaron Logan (EE) Dylan Reid (EE) Website: seniord.ece.iastate.edu/may0910 William Lim (EE) Kyungchul Song (EE) Abstract: Magnetic resonance imaging (MRI) is a medical imaging technique that has few harmful effects on patients and provides excellent image quality [1]. It is a good candidate for image-assisted surgery, which would require real-time image acquisition. However, MRI acquisition is currently very slow because it requires long scan times to capture all necessary data. In its raw form, this data is a sampling of the frequency domain (k- space), and must be reconstructed (transformed) into images that medical personnel can use. Reconstruction is also a slow process because it is data-intensive, and must be performed offline. Our client’s research looks at using compressed sensing, a promising new field of signal processing, to solve both of these problems. Compressed sensing would allow for exact reconstruction of MR images using fewer measurements, which would reduce both the MRI acquisition scan time and the image reconstruction time, driving toward the ultimate goal of real-time imaging. [1] seniord.ece.iastate.edu/may0910/Documents/Kalman-Filtered Compressive Sensing for MRI.pdf Client Needs: Reconstruction algorithm runtime improvements. Our client provided us with a MATLAB-based simulation that tests several image reconstruction techniques, including Kalman-filtered compressed sensing (KFCS). The task is to port the reconstruction algorithms to C or C++ in order to demonstrate significant run- time improvements while maintaining accuracy. Develop a sequential segmentation algorithm. An important task in medical imaging is to automate the process of image segmentation, or the outlining of regions of interest (ROI’s, such as tumors) in a set of images. The task is to develop a segmentation algorithm that utilizes prior knowledge about shape change dynamics to segment a sequence of noisy and/or low-contrast images.Introduction Functional Requirements: The ported reconstruction algorithm must run at least 3 times faster than the MATLAB prototype. The ported reconstruction algorithm must produce identical output, within reasonable error bounds. The segmentation algorithm must employ sequential segmentation. It must also be capable of performing standalone segmentation (i.e. no feed-forward between images). The segmentation algorithm must yield contours that are correct by visual inspection. The contours extracted by segmentation must not include any extraneous segmentation artifact regions. Additionally, the contours must have a nominal width of 1 pixel on an 8-connected basis. The segmentation algorithm must segment at least one image per second The segmentation algorithm must output the extracted contours overlaid on their respective input images. Also, it must save the extracted contours in data files. The segmentation algorithm may rely on minimal user input to segment the images. Nonfunctional Requirements: The ported reconstruction algorithm must be written in C or C++. The segmentation algorithm must be developed in MATLAB with the Image Processing Toolbox. The source code must not generate any avoidable compiler or interpreter warnings. All source code must conform to good programming style. All source code must be well documented. Design Requirements This project has given our team a greater understanding of the process involved with designing a software system and meeting a client’s needs and requirements. Our final product will help advance medical imaging research. Future research with the ported software could include parallelization and testing runtime performance on distributed computing clusters.Summary  Software development tools: $0.00 all provided by department or free download  Test data: $0.00 downloaded from web or provided by client and her colleagues  Estimated labor ($10 per hour): $7242.50 Project Resources Segmentation System Design The segmentation system has three main components, as illustrated below. 1. Graphical User Interface (GUI): allows the user to select and view image files, select a subsequence of images to segment, choose file output options, select segmentation options, and view image segmentation results. Also provides interface for user to manually assist segmentation process. 2. Segmentation Driver: provides an interface to the segmentation utility for segmenting a batch of images. Handles the passing of segmentation seed data between different calls to the segmentation algorithm, and handles input/output file duties. 3. Segmentation Algorithm: the actual component of the system that performs image segmentation. The algorithm, shown below, is passed raw image data (array form) and uses a series of image processing steps to extract the ROI boundary information. Once this boundary has been extracted, it is overlaid (highlighted) on the original image and saved in the output directory. The option is also available for the pixel coordinates of the boundary to be saved in a data file. For sequential segmentation, the algorithm relies on user input to select the ROI location for the first image. The segmentation system (i.e. the segmentation driver and algorithm) was designed to be used with a GUI or at the command line or in scripts, independent of any GUI. To achieve a simple interface between GUI and the segmentation driver, the GUI passes a function handle to the segmentation driver for a GUI update function. At each step of segmentation where the GUI must be updated, this function is referenced by the segmentation algorithm with different inputs, depending on what sort of GUI update must be performed. GUI display update Seed for next image segmentation Filenames of images to segment Segmentation settings GUI Segmentation Driver Image Segmentation Algorithm User Input – first segmentation seed Segmented image (ROI highlighted) ROI contour data Current image Seed for current segmentation Convert to grayscale Extract ROI contour Contrast enhancement Threshold image (convert to binary) Fill holes Morphological Opening Select ROI Overlay contour on original image Reconstruction System Design Only part of the reconstruction prototype - the actual image reconstruction algorithms – was ported from MATLAB to C. This excludes the test data generation and test/measurement framework. The primary routines that were ported are an implementation of KFCS ( kfcsfull ) and L1-Penalized Nonlinear Conjugate Gradient Reconstruction ( fnlCgv ). A few other reconstruction algorithms were also ported to C. The interface between the MATLAB test framework and the C reconstruction algorithms is accomplished by MEX (MATLAB Executable) files – compiled C code that is run from MATLAB. The mexFunction in each MEX file handles data formatting between the MATLAB and C environments (for compatibility). See the illustration below. The design focus for the reconstruction system was on runtime improvements of the key data-crunching prototype components. This drove our decision to implement the algorithms in C rather than C++ since we would not be using object-oriented programming. The choice of C also makes the code a good candidate for parallelization in future work to further improve runtime performance. Function calling-by-reference achieved through pointers to function input arguments increases runtime efficiency by avoiding unnecessary data copying. The use of dynamic memory allocation using the C standard library’s malloc and free routines allows all array sizes to be determined at runtime based on the matrices handed to the reconstruction code by MATLAB. This eliminates the burden on the end-user to maintain multiple size constants in header files. Matrix inversion is done with an implementation of LU decomposition with partial pivoting (row swaps). MATLAB source code C source code Image set: x Reconstructed image set: k-space data: y MEX function (MATLAB/C interface) MATLAB reconstruction algorithms Generate k- space data (2-D FFT) Ported C reconstruction algorithms Compare output data; capture timing Image Reconstruction Testing of the image reconstruction algorithms involves testing for two criteria: 1.Accuracy of the data output of the ported algorithms as compared to the output of the baseline prototype algorithms. Differences between the data outputs must be kept below acceptable tolerances. 2.Runtime performance of the ported algorithms is captured and compared with that of the prototype algorithms. The MEX file interface to the C reconstruction algorithms allows all testing to be done within MATLAB (see the block diagram under Reconstruction System Design). The MATLAB prototype and the C ported algorithm are run side-by-side for the same data input, and their outputs are compared to each other and to the input data.Testing Image Segmentation All testing is done by visual inspection of the results. This is the most robust method we have, and it is in line with our criterion for “correct” contour data. The GUI we created (shown at left) serves as our primary testing tool as it allows us to rapidly segment images and view the results in one window. Automated test scripts allow us to capture the runtime performance of the algorithm. Extracted ROI contour


Download ppt "I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications MAY 09-10 Advisor / Client: Dr. Namrata Vaswani Team: Aaron Logan (EE) Dylan."

Similar presentations


Ads by Google