1 / 18

SimITK and SimVTK : ITK and VTK in Simulink

SimITK and SimVTK : ITK and VTK in Simulink. DG Gobbi, P Mousavi, KM Li, J Xiang, A Campigotto, A LaPointe, G Fichtinger, P Abolmaesumi Medical Image Analysis Laboratory (MedIA) http://www.media.queensu.ca School of Computing Queen’s University. Motivation.

Download Presentation

SimITK and SimVTK : ITK and VTK in Simulink

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. SimITK and SimVTK:ITK and VTK in Simulink DG Gobbi, P Mousavi, KM Li, J Xiang, A Campigotto, A LaPointe, G Fichtinger, P Abolmaesumi Medical Image Analysis Laboratory (MedIA) http://www.media.queensu.ca School of Computing Queen’s University

  2. Motivation Visual programming for ITK and VTK Drag & drop approach to application development Increase understandability & maintainability Instructional value MATLAB is our friend Use MATLAB’s Simulink visual environment Hence, avoid reinventing the wheel Allow mix of MATLAB code and ITK / VTK

  3. Related Work • Visual Programming of VTK and ITK • ITKBoard (CSIRO) • SciRun (Utah) • MeVisLab (MeVis Research GmbH) • caBIG XIP (caBIG, Siemens, Washington U. in St Louis) • ITK and VTK in MATLAB (without Simulink) • MATITK (Chu and Hamarneh) • VTK plus MATLAB – various • Us: Visual ITK/VTK Programming in MATLAB

  4. MATLAB’s Simulink Environment Library Model

  5. Our Own Simulink Libraries

  6. 3D Processing with ITK

  7. Combine ITK Processing and VTK Rendering Output: VTK Window Input: cthead1.png

  8. Method: Wrapping Process Simulink wrappers for ITK, VTK Each Simulink block is an “S-Function” with callbacks S-Function callbacks are C++ code, calls ITK or VTK CMake build process Start with an XML description of each filter (ITK) or Start with class header files (VTK) CMake calls perl script to generate C++ code CMake then calls perl to generate .mdl library file Finally, build libraries with VC++ or gcc

  9. Method: Data Flow for SimITK • SimITK, SimVTK use different architecture • ITK is primarily image based • VTK handles many data set types • SimITK Data Flow • ITK images -> MATLAB arrays (“info” and “data”) • Use shared memory for efficiency • Conversion of ITK parameter data types • ITK uses several specialized types e.g. versor

  10. SimITK Helper Class Input InputPort Conversion Spacing & Origin itkImage Data Conversion Parameters Run ITK Image Filter Parameter Variables Output Conversion OutputPort Spacing & Origin itkImage Data

  11. Method: Data Flow for SimVTK • SimVTK Data Flow • Use MATLAB arrays to pass vtkObject pointers • Define “VTKOBJECT” MATLAB type for safety • When run starts, Simulink builds VTK pipeline on-the-fly • Then, Simulink calls Update or Render at each time step • SimVTK filter parameters • VTK parameter types need no conversion • VTK and MATLAB both use basic C data types

  12. Registration Examples • Registration in ITK • Immediate, interactive feedback • Great way to tune parameters • Easy to swap out components

  13. Intervention Examples • Computer Assisted Intervention in VTK • Incorporate real-time data input • Use “Subsystems” to manage complexity

  14. Discussion • “Diagrams” that actually run as code • Easy to verify that code matches design • Great teaching tool • Understandability improves maintainability • Utility • Simulink models can run as stand-alone exec • Nearly all VTK, ITK classes can be wrapped

  15. Future Work WrapITK To automate ITK build (VTK is already done!) GUI integration Slicer module interface in Simulink KWWidgets (later Qt, maybe FLTK) Community Building Mailing list, website We want to hear from you!

More Related