1 / 50

I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications

I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications. May09-10. Aaron Logan Dylan Reid William Lim Kyungchul Song. THANK YOU: Dr. Namrata Vaswani , Chenlu Qiu , Dr. Greg Smith, Bill Zimmerman. Project Planning. Problem Statement & Client Needs.

rumer
Download Presentation

I.R.SNApp Image Reconstruction and Segmentation for Neurosurgery Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. I.R.SNApp ImageReconstructionandSegmentation forNeurosurgeryApplications May09-10 Aaron Logan Dylan Reid William Lim Kyungchul Song THANK YOU: Dr. NamrataVaswani, ChenluQiu, Dr. Greg Smith, Bill Zimmerman

  2. Project Planning

  3. Problem Statement & Client Needs • Problem: need real-time MRI • Current MRI is slow: many measurements • Slow acquisition (10’s of minutes scan time) • Slow reconstruction (Fourier/k-space  spatial domain) • Slow and inefficient segmentation (image analysis) algorithms • Solution/ Client Needs: • MR image reconstruction algorithm using Compressed Sensing • New technique in statistical signal processing/ estimation theory • Permits signal estimation using fewer observations/ measurements • Result is faster acquisition & less computation  faster imagereconstruction • Goal is real-time • Develop algorithm for sequential image segmentation • Sequentially segment deforming objects or ROI's from images • Utilize prior knowledge about shape change dynamics to segment noisy/low contrast imagery. Use only current and past images. • Goal is real-time

  4. Reconstructed & segmented MR image Reconstructed MR image Raw MR data Image Reconstruction Image Segmentation System Description & Diagrams Requirements Specification • High-Level System Block Diagram

  5. System Description & Diagrams Requirements Specification • Image Reconstruction Block Diagrams KFCS LSCS

  6. Reconstructed & segmented MR image Reconstructed MR Image Manual ROI Selection – Algorithm Seed MATLAB Segmentation Code Additional Manual Tracing System Description & Diagrams Requirements Specification • Image Segmentation Block Diagram

  7. System Description & Diagrams Requirements Specification • System GUI Sketches

  8. Operating Environment & User Interface Requirements Specification • Operating Environment • High-performance computing • Lots of memory • High speed • Future work on this project may require parallel processing • Linux application servers meet these requirements • User interacts with algorithm primarily through scripts and commandline interfaces • User Interface • Command prompt windows • MATLAB command window • SSH access to Linux applications servers • Simple GUI for segmentation • User input to choose ROI location to seed algorithm • Allow user to select options • Visual image processing feedback

  9. Project Requirements Requirements Specification • Functional Requirements • FR-1: Algorithms shall output correct data. • FR-2: Ported version of reconstruction algorithm shall runsignificantly faster than MATLAB prototype version. • FR-3: The entire image processing program shall be capable of real-time execution. • Non-functional Requirements • NFR-1: The reconstruction program shall be written in C/C++. • NFR-2: The segmentation program shall be written in MATLAB. • NFR-3: The program shall employ parallel processing. • NFR-4: The source code shall be well documented.

  10. Deliverables Requirements Specification • A complete software system that • takes raw MRI data, • reconstructs the data into images, and • performs segmentation on those images. • Attributes of the system: • C/C++ code, well documented and working • Executable version of the code (MEX) • A basic GUI to assist segmentation process • Comprehensive test results

  11. Project Plan

  12. Resource Requirements Project Plan • C/C++ IDE and compiler • MATLAB installed with • Image Processing Toolbox • Other Toolboxes as necessary • GUI development environment • MATLAB/ GUIDE? • Visual Studio? • Eclipse with add-ons? • Test data • Raw MR data and corresponding images

  13. Risks Project Plan • Segmentation • Very data-dependent • Image contrast, focus/resolution of objects, etc. influence final results • Mitigated with good image preprocessing • Contrast correction/normalization, filtering • “Good” segmentation algorithm difficult to define objectively • Reconstruction • KFCS algorithm could cause PCs to crash, resulting in data loss • Eliminated by testing only small images on PCs for frameworktesting; performing batch tests on full-size images on Linux clusters • Raw data acquisition • “Raw” MRI data only exists internal to the machine • HIPAA privacy laws may pose issue with acquisition

  14. Understand Problem and Project Scope Understand Theory Learn Operating Environment Concept Testing Thanksgiving Break Learning Design and Implementation Testing Breaks Algorithm Development – Modules Winter Break Algorithm Development – Integration Test Algorithm Framework Test Algorithm for Robustness and Correctness Spring Break Miscellaneous Wrap-Up Tasks Work Breakdown & Schedule Project Plan • Image Reconstruction: • Aaron Logan, William Lim • Image Segmentation: • Kyungchul Song, Dylan Reid

  15. Design Project

  16. Design Approach • Image Reconstruction • Specifications are determined with two goals in mind: • Runtime improvements • Use good programming style and documentation • Image segmentation: research-oriented • Experimentation with IPT functions • See what yields good segmentation results

  17. System Design • Image Reconstruction

  18. System Requirements System Design – Reconstruction • Port: MATLAB  C • Faster • MATLAB prototype: ~6 minutes per 64 x 64 frame • (ChenluQiu’s PC) • Initial requirement: 3x faster • Identical output

  19. Functional Decomposition & System Analysis System Design – Reconstruction • Implement KFCS Reconstruction

  20. Engineering Specification • Image Reconstruction

  21. Input / Output Specifications Engineering Specification – Reconstruction • Inputs • MR k-space (Fourier-domain measurement) data • Data file • Process control parameters • Passed to program either as input parameters or as .INI file. • Observation percentage • Others? • Input / output options and directory information • Outputs • An array representation of image • Primary output format, passed to image segmentation system • Uncompressed image file - .BMP • Optional: for visual inspection by user

  22. User Interface Specification Engineering Specification – Reconstruction • Command line interfaces • Little return on investment for creating GUI • Research project! • Focus our time on client’s needs • Simplest interface to use for operating on Linux serverconnection

  23. Hardware Specification Engineering Specification – Reconstruction • Small scale testing • PCs in 2046 Coover: • CPU: Intel® Pentium® D, 3.00 GHz • RAM: 2.00 GB @ 2.99 GHz • Large scale testing • ECpE Linux application servers

  24. Software Specification Engineering Specification – Reconstruction • Language • C, not C++ • Compiles smaller than C++ • Runs faster – no overhead for OOP • Easier to learn; simple, yet powerful • Compiler • MinGW (Minimalist GNU for Windows) distribution of GCC (GNU Compiler Collection) • Implements ANSI-C99 standard • support for complex numbers • Behaves identically to most common C compilers on UNIX systems • Code compiled for PCs and Linux will behave very similarly

  25. Software Specification Engineering Specification – Reconstruction • Libraries • CLAPACK (C Linear Algebra Package) • FFTW (Fast C implementation of Fourier Transform) • Discrete Wavelet Transform package • Still looking for a C library that can do this. Part of ongoingresearch • Good style • Good abstraction practices • Happy medium between huge, complicated functions & toomany small functions that bog down performance • No compiler warnings

  26. Software Specification Engineering Specification – Reconstruction • Documentation • Function header comments /* * Function name * Thorough description of function * List of input arguments * Output * Revision History * Author & date */ • In-context explanations & clarifications y = x^2; // x squared

  27. Test Specification Engineering Specification – Reconstruction • Automated test scripts • Generate / read program input • Run C and MATLAB algorithms in succession on same input • Compare output of each algorithm by differencing • Compute statistics on differences • Scripts written in MATLAB; access C algorithms through MEX (MATLAB executable) files

  28. Prototyping Engineering Specification – Reconstruction • runsim: MATLAB reconstruction simulation • Generates test data by taking FFT of image set • 32 x 32 images – manageable size for testing on PC • Tests different reconstruction techniques and looks at error,runtime of each • Kalman Filtering • Compressed Sensing • Compressed Sensing, without deletions • Full Compressed Sensing (with deletions) • Genie-Aided Kalman Filtering • Full compressed sensing yielded best results • Full simulation on 1.5 GHz PC took roughly 25 minutes • 6 minutes for full KFCS

  29. System Design • Image Segmentation

  30. System Requirements System Design – Segmentation • Develop segmentation algorithm in MATLAB • Achieve a contour that is correct • Includes only the ROI, no extraneous / artifact regions

  31. System Requirements System Design – Segmentation • Achieve a contour that is correct (cont.) • Correct by visual inspection • Good contour with fine width, fine precision • ~1 pixel width (8-connected) right wrong • Runtime upper bound: 1 sec/frame

  32. System Analysis System Design – Segmentation • Input: MR images of brain or other organ of interest • Automatically segments images • Goal of segmentation: • Simplify and change the representation of an image intosomething that is more meaningful and easier to analyze • Extract exact location of regions of interest within image • Output: the segmented MR image

  33. Functional Decomposition System Design – Segmentation Outputs: Display montage of original images Expanded on Next Slide Contour extraction Draw contour on original image Save segmented image in DICOM format Increment iuntil i= no.input images Input: MRimages Display montage of segmented images Text file of generated files and image run info

  34. Functional Decomposition System Design – Segmentation Contour Extraction Read ithimage Threshold (convert to B/W) Detect edges Dilate the image Fill interior gaps Smooth the object Output the contour of object

  35. Engineering Specification • Image Segmentation

  36. Input / Output Specification Engineering Specification – Segmentation • Input: • MR Image sequence • File format: DICOM (Digital Imaging and Communications in Medicine)* • Size: 256 × 256 pixels* *NOTE: not limited to these • Grayscale • Directory information • Indices of images to process • Output: • MATLAB display: • the current segmented image • Display montage of the original and segmented images • a list of the image files that have been segmented • File output: • DICOM file of segmented image (original + contours overlaid) • CSV file of the contour pixel coordinates • Text file listing all the image filescreated,andexecution results.

  37. User Interface Specification Engineering Specification – Segmentation • MATLAB Command Window • Segmentation GUI • File list, current segmented image, montages of original/ segmented images • Run and stop buttons; pertinent menu bar items • Prompts user with multiple dialog boxes • Input & Output Directories • Segmentation options

  38. Hardware and Software Specification Engineering Specification – Segmentation • Hardware Specification • Must achieve 1 sec/frame with the following: • CPU: Intel® Pentium® D, 3.00 GHz • RAM: 2.00 GB @ 2.99 GHz • PCs in 2046 Coover meet this spec • Software Specification • MATLAB Version 7.6 (R2008a) • Image Processing Toolbox, Version 6.1 • Others: discussed for reconstruction • Documentation practices • Good data abstraction • No MATLAB Interpreter warnings

  39. Test Specification Engineering Specification – Segmentation • Visual inspection of output contour • Simple and most robust method of checking that output meetsrequirements • Speed (throughput time) of the system • Measured using the timing functions available with MATLAB • tic and toc stopwatch functions • clock • MATLAB Profiler

  40. Prototype Segmentation Algorithm (1/8) Engineering Specification – Segmentation • Step 1: Read Image • Original image • dicomread

  41. Prototype Segmentation Algorithm (2/8) Engineering Specification – Segmentation • Step 2: Threshold Image • Threshold the grayscaleimage to black and white • im2bw

  42. Prototype Segmentation Algorithm (3/8) Engineering Specification – Segmentation • Step 3: Edge Detection • Detect the edges withbinary gradient mask • edge, sobel • Does not yield a goodcontour • need the next steps toimprove

  43. Prototype Segmentation Algorithm (4/8) Engineering Specification – Segmentation • Step 4: Image ContourDilation • Dilatethe objects in theimage using dilatedgradient mask • imdilate, strel

  44. Prototype Segmentation Algorithm (5/8) Engineering Specification – Segmentation • Step 5: Hole Filling • Holes within objects arefilled • imfill

  45. Prototype Segmentation Algorithm (6/8) Engineering Specification – Segmentation • Step 6: Object BoundarySmoothening by Erosion • Smoothen the white pixelboundaries using erosion • imerode, strel

  46. Prototype Segmentation Algorithm (7/8) Engineering Specification – Segmentation • Step 7: Extraction ofContours • Extract the contour pixelsfrom the object boundaries • bwperim

  47. Prototype Segmentation Algorithm (8/8) Engineering Specification – Segmentation • Step 8: Final SegmentedImage • Overlay extracted contours on original image

  48. Project Design Summary • Implementation already in progress • Project risks: all can be eliminated or mitigated • Project feasibility • Low cost – all resources, except for test data, already available • Test data could be obtained as part of research agreement • Project success would help advance field of medical imaging • Project has been scoped well within our means

  49. Questions and Discussion

  50. Wrap-up • Required and requested changes • Action items

More Related