National Alliance for Medical Image Computing ITK The Image Segmentation and Registration Toolkit Julien Jomier Kitware Inc.
National Alliance for Medical Image Computing What is ITK? Open Source (BSD-Like) Written in C++ Wrapping for Java, Python, Tcl Cross-Plaform Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization
National Alliance for Medical Image Computing C++ Glue Code How to Integrate ITK in your application ITK Image Processing GUI {MFC,Qt, wxWin FLTK} Visualization {OpenGL, VTK}
National Alliance for Medical Image Computing ITK Developers
National Alliance for Medical Image Computing Generic Programming Example: Standard Template Library Abstraction of types and behaviors Templates -itkImage Images are N-Dimensional, arbitrary pixel types and dimension and pixel type must be defined at compile time.
National Alliance for Medical Image Computing Reader Image File Gaussian Image Writer File The Data Pipeline ITK has a Data Pipeline architecture Filters are connected together The output image is own by each filter Computation is performed on demand
National Alliance for Medical Image Computing The Simplest, yet useful ITK program #include “itkImage.h” #include “itkImageFileReader.h” #include “itkMedianImageFilter.h” #include “itkImageFileWriter.h” typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::MedianImageFilter FilterType; typedef itk::ImageFileWriter WriterType;
National Alliance for Medical Image Computing The Simplest, yet useful ITK program ReaderType::Pointer reader= ReaderType::New(); FilterType::Pointer filter= FilterType::New(); WriterType::Pointer writer= WriterType::New(); reader->SetFileName(“InputImage.png”); filter->SetInput( reader->GetOutput() ); writer->SetInput( filter->GetOutput() ); writer->SetFileName(“OutputImage.png”); writer->Update();
National Alliance for Medical Image Computing Basic Filters Pixel-wise Arithmetic, Casting, Thresholding Mathematical morphology Noise reduction Gaussian, Anisotropic diffusion Derivatives
National Alliance for Medical Image Computing Region Growing –ConfidenceConnected –ConnectedThreshold –IsolatedConnected Watersheds Level Sets –FastMarching –ShapeDetection –GeodesicActiveContours –ThresholdSegmentation –CannySegmentationLevelSet Segmentation Methods
National Alliance for Medical Image Computing SpeedCurvature Zero set, time = t Zero set, time = t+1 Shape Detection PDE Includes a curvature termPrevents leaking
National Alliance for Medical Image Computing Feature Image Sigmoid Gradient Magnitude Gradient Input Image Binary Mask Smooth Positive LevelSet Rescale Balanced [-0.5,0.5] Input LevelSet Shape Detection Input Feature Threshold output LevelSet Shape Detection
National Alliance for Medical Image Computing typedef itk::Image ImageType; typedef itk::ShapeDetectionLevelSetImageFilter< ImageType, ImageType > FilterType; FilterType::Pointer shapeDetection = FilterType::New(); shapeDetection->SetInput( inputLevelSet ); shapeDetection->SetFeatureImage( speedImage ); shapeDetection->SetPropagationScaling( 1.0 ); shapeDetection->SetCurvatureScaling( 0.05 ); Shape Detection
National Alliance for Medical Image Computing shapeDetection->SetMaximumRMSError( ); shapeDetection->SetMaximumIterations( 400 ); shapeDetection->Update(); std::cout GetRMSChange() << std::endl; std::cout GetElapsedIterations() << std::endl; thresholder->SetInput( shapeDetection->GetOutput() ); thresholder->SetLowerThreshold( -1e7 ); thresholder->SetUpperThreshold( 0.0 ); Shape Detection
National Alliance for Medical Image Computing Fixed Image Moving Image Metric Transform Interpolator Optimizer Registration Method Registration Framework
National Alliance for Medical Image Computing ITK Transforms Rigid (Quaternion), Similarity, Affine Centered transforms ThinPlateSpline, ElasticBodySpline, B- Spline TransformIO: Matlab, XML, Text
National Alliance for Medical Image Computing ITK Metrics MeanSquares, NormalizedCorrellation, GradientDifference MutualInformation (Viola-Mattes) KullbackLeiblerCompareHistogram Model-to-Image metrics: - ICP
National Alliance for Medical Image Computing ITK Optimizers Derived from VNL GradientDescent, ConjugateGradient, Powel Amoeba, One-plus-One, LBFGS(B), LevenbergMarquart Use metric value or metric derivative or both.
National Alliance for Medical Image Computing ITK Interpolators NearestNeighbor, Linear, BSpline WindowedSync
National Alliance for Medical Image Computing Enjoy ITK!