Getting Started with ITK in Python Language

Slides:



Advertisements
Similar presentations
ITK-Overview Insight Software Consortium. What is ITK Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization.
Advertisements

SWIG Many languages Large user base Highly customizable.
Prof. Natalia Kussul, PhD. Andrey Shelestov, Lobunets A., Korbakov M., Kravchenko A.
NA-MIC National Alliance for Medical Image Computing National Alliance for Medical Image Computing: NAMIC Ron Kikinis, M.D.
OpenCV Introduction Hang Xiao Oct 26, History  1999 Jan : lanched by Intel, real time machine vision library for UI, optimized code for intel 
Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
National Alliance for Medical Image Computing ITK The Image Segmentation and Registration Toolkit Julien Jomier Kitware Inc.
Outline Introduction Image Registration High Performance Computing Desired Testing Methodology Reviewed Registration Methods Preliminary Results Future.
Introduction to ITK Casey Goodlett (with help from others as listed in references)
The cancer Biomedical Informatics Grid™ (caBIG™): In Vivo Imaging Workspace Projects Fred Prior, Ph.D. Mallinckrodt Institute of Radiology Washington University.
INDEX ∞ Image Processing ∞ OpenCV ∞ Download & Setup ∞ Make Project ∞ Show Result ∞ Q & A Setup OpenCV & Tutorial.
NA-MIC National Alliance for Medical Image Computing Slicer Custom Modules Steve Pieper, PhD.
Software Process for Distributed Teams KITWARE, Inc.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering End-user Platform Steve Pieper Isomics, Inc.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Computational Platform Jim Miller GE Research.
NA-MIC National Alliance for Medical Image Computing IGT Software Design and Process Bill Lorensen GE Research.
William Lorensen GE Research Niskayuna, NY February 12, 2001 Insight Segmentation and Registration Toolkit.
NA-MIC National Alliance for Medical Image Computing NAMIC-Kit Update Will Schroeder Jim Miller Bill Lorensen.
Open Source Imaging Toolkits Rick Avila Director of Medical Applications Kitware, Inc. April 27, 2006 Kitware.
OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.
Joshua Alexander University of Oklahoma – IT/OSCER ACI-REF Virtual Residency Workshop Monday June 1, 2015 Deploying Community Codes.
VTK: The Visualization Toolkit Part I: Overview and object models March 28, 2001.
NA-MIC National Alliance for Medical Image Computing NA-MIC Software Engineering Bill Lorensen GE Research NA-MIC Engineering Core PI.
Pegasus Status Update April April 2001 Karl Schopmeyer.
How to Install ITK ? (Insight Segmentation and Registration Toolkit) Prepared by: Hussain Rahman MS (CS) 1 st semester Supervised.
Edinburgh, January 25, 2005 VisIVO, a VO-Enabled tool for Scientific Visualization and Data Analysis: Overview and Demo 1. Ugo Becciani (OACt): Introduction.
ITK The Insight Segmentation & Registration Toolkit Martin Urschler Institute for Computer Graphics and Vision Graz University of Technology.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Highlights, Aims and Architecture Will Schroeder Kitware.
Geant4 Installation Supported platforms:  Scientific Linux with gcc 4.1.2/4.6  Mac Os X 10.7 and 10.8 with gcc 4.21  Windows7 with Visual Studio.
Community Software Engineering Practices and Principles A Case Study of the Open Source Insight Toolkit (ITK) Terry Yoo (National Library of Medicine),
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Software Process Stephen R. Aylward Kitware, Inc.
Grid Computing Research Lab SUNY Binghamton 1 XCAT-C++: A High Performance Distributed CCA Framework Madhu Govindaraju.
NA-MIC National Alliance for Medical Image Computing Slicer Building and Deployment Steve Pieper, PhD.
Center for Component Technology for Terascale Simulation Software CCA is about: Enhancing Programmer Productivity without sacrificing performance. Supporting.
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.
William Schroeder, Ph.D. §, Andy Cedilnik §, Sebastien Barré, Ph.D. §, William Lorensen ‡, James Miller, Ph.D. ‡, Daniel Blezek, Ph.D. ‡ § Kitware Inc.,
Chapter 1 Computer Systems. Why study Computer Architecture? Examples Web Browsing - how does the browser access pages from a server? How can we create.
Grid Computing at Yahoo! Sameer Paranjpye Mahadev Konar Yahoo!
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Software Process Stephen R. Aylward Kitware, Inc.
NA-MIC National Alliance for Medical Image Computing National Alliance for Medical Image Computing: NAMIC Ron Kikinis, M.D.
Copyright © 2008 Siemens Corporate Research – All rights reserved1/12 eXtensible Imaging Platform (Xip) Sylvain Jaume – Sep 2008 Siemens Corporate Research.
NA-MIC National Alliance for Medical Image Computing Slicer and ITK Raul San Jose.
VTK: The Visualization Toolkit Qaiser Chaudry Georgia Institute of Technology June 28, 2006.
GPU Brainstorming What Classes to focus on. Top Priorities Level Sets – (1) ParallelSparseFieldSolver (look at link from Paul) – (?) NarrowBandLevelSet.
SDD/DFS H. Lorch & M. Kiekebusch VLT 2 nd Generation Instrumentation Pipelines, 18 Apr Henning Lorch & Mario Kiekebusch et. al. The CLIP.
Earth System Modeling Framework Python Interface (ESMP) October 2011 Ryan O’Kuinghttons Robert Oehmke Cecelia DeLuca.
NA-MIC National Alliance for Medical Image Computing Process-, Work-Flow in Medical Image Processing Guido Gerig
 Programming - the process of creating computer programs.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Slicer 3 Ron Kikinis, Steve Pieper. CTK Workshop Heidelberg, June 29/30, 2009 Slicer Goals  Stable, Usable, Cross Platform, End-User Software for Medical.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Computational Platform Jim Miller GE Research.
Daniel Blezek, Jesus Caban, Brad Lowkamp, Dan Muller, Fabrice de Chaumont, Julien Michel, Harvey Cline, Gabe Hart, Ghassam Hamarech, John Galeotti, Raghu.
Correlator GUI Sonja Vrcic Socorro, April 3, 2006.
NA-MIC National Alliance for Medical Image Computing Engineering a Segmentation Framework Marcel Prastawa.
Bill Hoffman, Jesus Caban, Brad Lowkamp, Dan Muller, Fabrice de Chaumont, Julien Michel, Harvey Cline, Gabe Hart, Ghassam Hamarech, John Galeotti, Raghu.
PLUS overview (PerkLab ultrasound library and applications)
SimTK 1.0 Workshop Downloads Jack Middleton March 20, 2008.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Data Management Daniel Marcus Washington University.
MIRC Overview Medical Imaging Resource Center. RSNA2006 MIRC Courses Overview of the RSNA MIRC Software Installing MIRC on Your Laptop Using MIRC for.
The Insight Toolkit Case Study Dr. Luis Ibanez, Kitware /
3D Slicer module programming
CSC391/691 Intro to OpenCV Dr. Rongzhong Li Fall 2016
SPI external software build tool and distribution mechanism
Pipeline Execution Environment
Core 2 Progress Day 1 Salt Lake City
Fred Prior, Ph.D. Mallinckrodt Institute of Radiology
Introduction to GSL CS 3414 From GNU Scientific Library Reference Manual at
National Library of Medicine Segmentation and Registration Toolkit
ITK-Overview Insight Software Consortium.
GENERAL VIEW OF KRATOS MULTIPHYSICS
Presentation transcript:

Getting Started with ITK in Python Language I. Introduction to ITK, Python Wrapping and VTK-ITK Connection

Outline ITK Overview (most slides are adopted from Documents in Insight Toolkit 1.2 CD) Python Wrapping Installations Examples Filter Registration ITK-VTK connection Where to get help?

Open Source C++ Toolkit What is ITK Open Source C++ Toolkit Medical Image Processing Registration Segmentation

ITK Overview Core design concepts Generic programming (e.g. temper late, containers, iterators.) Smart pointers for memory management Object factories for adaptable object instantiation Command/observer design paradigm for event management Multithreading support Cross-platform (CMake) Efficient n-dimensional implementation

The Big Picture Common Basic Filters ITK Numerics Algorithms

Common Common System Data Pipeline Basic MultiThreader Mutex Exceptions Data Basic PointSet Pipeline Image VectorContainer MapContainer ListFeatures Histogram Mesh Point Matrix Vector ProcessObject DataObject Events Observer Size Transforms Index

Numerics Numerics Optimizers VNL Statistics FEM Eigen SVD Matrix Membership Functions Classifiers Vector Linear Algebra Evolutionary Algorithms Gradient Descent Histogram methods Optimizers List methods Optimizers VNL Element Statistics Node Numerics Solver FEM Load Material

Basic Filters Basic Filters PixelWise Neighborhood IO Global Arithmetic Basic Filters PixelWise Trigonometric Intensity Transf MorphoMath Neighborhood IO Median Global Derivative Laplacian EdgeDetection PNG VTK DICOM Meta DistanceMap HaussdorfDistance Anisotropic Diffusion Connected Components

Algorithms Algorithms Markov RF Level Sets Registration PDE Interpolators Narrow Band Shape Detection Fast Marching Transforms Optimizers Geodesic Contours Metrics Multi Resolution Watershed Markov RF Level Sets Registration Demons CurvatureFlow PDE Algorithms Fuzzy Connectedness Hard SimpleFuzzy Deformable Models Balloon Force

Pipeline Architecture Data Flow Data Objects Image Mesh Process Objects (Algorithms) Segmentation Registration Image Processing Streaming capable

Pipeline Architecture Image Filter

Streaming – Processing Large Images Architecture Streaming – Processing Large Images Input Image Output Image Filter

Registration Framework Multi Resolution Registration Framework Image Registration Framework Components PDE Based Registration FEM Based Registration

Registration Components Registration Method Fixed Image Metric Optimizer Transform Interpolator Moving Image Metric: Mutual Information, Mean Squares, Normalized Correlation and Pattern Intensity Optimizer: Gradient Descent, Regular Step Gradient Descent, Conjugate Gradient, Levenberg-Marquardt Transform: Translation, Scale, Rotation, Rigid3D, Rigid2D, Affine and Splines (TPS, EBS, VS) Interpolator: Nearest neighbor, Linear, BSpline

Other Frameworks Level Set Framework for segmentation FEM Framework A subsystem for solving general FEM problems, in particular non-rigid registration IO Framework Use a flexible object factory mechanism to support a variety of file formats

Why Python Wrapping ? Interpreted Language Interactive Simplifies teaching and learning Facilitates rapid prototyping Large python-vtk user base in our Labs

How Does It Work? ITK Core is implemented in C++ Tcl and Python bindings are generated automatically using a combination of gccxml -- a modified version of gcc Cable -- processes XML info from gccxml and generates input for CSWIG CSWIG -- modified version of SWIG that produces Python (or Tcl ) binding Under active development, no binary installation package yet.

Python wrapping requires fully specified C++ types How does it work ? Python wrapping requires fully specified C++ types C++ Python Image<T,N> Image<ushort,2> ImageUS2 Image<ushort,3> ImageUS3 Image<float,2> ImageF2 Image<float,3> ImageF3

How does it work ? ITK Filters are Templated over Image Type GaussianImageFilter< InputImage, OutputImage > GaussianImageFilter< ImageU2 , ImageU2 > GaussianImageFilter< ImageF2 , ImageF2 > GaussianImageFilter< ImageU2 , ImageF2 > GaussianImageFilter< ImageF2 , ImageU2 > GaussianImageFilter< ImageF3 , ImageU3 >

How does it work? C++ Python Python wrapper for filters should define type combinations C++ Python GaussianImageFilter<ImageUS2,ImageUS2> GaussianFilterUS2US2 GaussianImageFilter<ImageF2,ImageF2> GaussianFilterF2F2 GaussianImageFilter<ImageUS2,ImageF2> GaussianFilterUS2F2 GaussianImageFilter<ImageF2,ImageUS2> GaussianFilterF2US2 GaussianImageFilter<ImageF3,ImageUS3> GaussianFilterF3US3

VTK-ITK Connection in Python Implemented as an module ConnectVTKITK in InsightApplication repository Connect the pipeline with Import and Export classed in VTK and ITK VTK exporter  ITK importer ITK exporter  VTK importer Use ITK for image processing, registration, segmentation and VTK for visualization Status: Under active development

Installation What do I need? C++ Compiler -- gcc 2.95 to 3.3, Visual C++ 6 -7.1 ) CMake (1.67 or cvs checkout) Python (2.1, 2.2, or 2.3) VTK (4.2.2 or cvs checkout) Insight (cvs checkout) InsightApplications Installation for Python-VTK-ITK is not straight forward right now, no binary distribution. A step by step instruction will be posted on Image Lab coders’ web page.

Step 1 Python and modules Linux comes with python and tcl/tk Windows: python 2.2, tcl/tk 8.3 Numpy (Numeric Python) Scientific Python (Install NetCDF library first for NetCDF and MINC support)

Step 2 CMake Download the latest (1.67) binary for your platform from www.cmake.org

Step 3 Install VTK Install VTK 4.2.2 from source distribution . Turn on the following flags VTK_USE_HYBRID VTK_USE_PATENTED VTK_WRAP_PYTHON VTK_USE_ANSI_STDLIB

Step 4 Install Insight Get the source cvs Build with CMake CSWIG_WRAP_PYTHON USE_VTK

Step 5 Install InsightApplications CVS checkout CMake CONNECT_VTK_ITK

Step 6 Environment Variables Linux/Unix PYTHONPATH LD_LIBRARY_PATY Windows PATH

Examples CurvatureAnisotropicDiffusionImageFilter.py

Examples ImageRegistration3.py

Examples : VTK-ITK Connection CannyEdgeDetectionImageFilterConnectVTKITK.py

Where to get help? www.itk.org Image Labs coders mailing lists: ITK Software Guild : PDF document (Over 500 pages) Doxygen generated manual pages Insight-users Mailing Lists Image Labs coders mailing lists: http://www.imaging.robarts.ca/coders