1 / 47

ITK Applications

ITK Applications. Jean-Loïc Rose CREATIS-LRMN. Image applications. Morphology filtering. Watershed. Registration. Threshold. applications. Region growing. Classification. Levelset. Contents. ITK Segmentation Methods Region Growing Watershed Level Sets

anthea
Download Presentation

ITK 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. ITK Applications Jean-Loïc Rose CREATIS-LRMN

  2. Image applications Morphology filtering Watershed Registration Threshold applications Region growing Classification Levelset

  3. Contents • ITK Segmentation Methods • Region Growing • Watershed • Level Sets • ITK Registration Methods • Statistics • Histogram • Classification

  4. Segmentation Methods: Overview • Region Growing • ConnectedThreshold • ConfidenceConnected • IsolatedConnected • Watersheds • Level Sets • FastMarching • ShapeDetection • GeodesicActiveContours • ThresholdSegmentation • CannySegmentationLevelSet

  5. Segmentation Methods: Overview • Region Growing • ConnectedThreshold • ConfidenceConnected • IsolatedConnected • Watersheds • Level Sets • FastMarching • ShapeDetection • GeodesicActiveContours • ThresholdSegmentation • CannySegmentationLevelSet

  6. Upper bound Seed Lower bound Connected threshold Intensity Seed Point

  7. Connected threshold typedefitk::Image< unsigned char, 2 > ImageType; ImageType::IndexType seed= {{123,235}}; typedefitk::ConnectedThresholdImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( reader->GetOutput() ); filter->SetLower( 155 ); filter->SetUpper( 235 ); filter->SetSeed( seed); filter->Update( );

  8. Connected threshold (b) (c) (d) a b c d

  9. Upper bound Mean Lower bound Confidence Connected Intensity Seed Point

  10. Confidence Connected typedefitk::Image< unsigned char, 2 > ImageType; ImageType::IndexType seed= {{123,235}}; typedefitk::ConfidenceConnectedImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( reader->GetOutput() ); filter->SetMultiplier( 1.5 ); filter->SetNumberOfIterations( 5 ); filter->SetInitialNeighborhoodRadius( 2 ); filter->SetReplaceValue( 255 ); filter->SetSeed( seed); filter->Update( ); … writer->SetInput( filter->GetOutput() ); writer->Update();

  11. Confidence Connected (b) (c) (d) a b c d

  12. Seed 2 UpperValueLimit Isolated Value Seed 1 Lower Isolated Connected Intensity 2 Seed Points

  13. Isolated Connected typedefitk::Image< unsigned char, 2 > ImageType; ImageType::IndexType index1= {{123,235}}; ImageType::IndexType index2= {{236,189}}; typedefitk::IsolatedConnectedImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( reader->GetOutput() ); filter->SetLower( 155 ); filter->SetUpperValueLimit( 235 ); filter->SetReplaceValue( 255 ); filter->SetSeed1( index1); filter->SetSeed2( index2); filter->Update( );

  14. Isolated Connected segmentation result Input image smoothing image itk::CurvatureFlowImageFilter

  15. Segmentation Methods: Overview • Region Growing • ConnectedThreshold • ConfidenceConnected • IsolatedConnected • Watersheds • Level Sets • FastMarching • ShapeDetection • GeodesicActiveContours • ThresholdSegmentation • CannySegmentationLevelSet

  16. Water Level Watershed Concept Intensity

  17. Watershed Segmentation typedefitk::Image< float, 2 > ImageType; typedefitk::GradientMagnitudeImageFilter < ImageType, ImageType > GradientType; GradientType::Pointer gradient = GradientType::New(); gradient->SetInput( reader->GetOutput() ); gradient->Update( ); typedefitk::WatershedImageFilter< ImageType > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( gradient->GetOutput() ); filter->SetThreshold( 0.001 ); filter->SetLevel( 0.15 ); filter->Update( );

  18. Watershed segmentation

  19. Segmentation Methods: Overview • Region Growing • ConnectedThreshold • ConfidenceConnected • IsolatedConnected • Watersheds • Level Sets • FastMarching • ShapeDetection • GeodesicActiveContours • ThresholdSegmentation • CannySegmentationLevelSet

  20. Level Set Evolution

  21. Anisotropic diffusion Gradient magintude Sigmoid filter Fast Marching Sigmoid FastMarchingImageFilter Input Gradient Magnitude Speed Image Output

  22. Anisotropic diffusion Gradient magintude Sigmoid filter Fast Marching Δx Δx = V . Δt FastMarchingImageFilter Input Speed Image Time-Crossing Map Output

  23. FastMarchingImageFilter typedefitk::Image< float, 2 > ImageType; typedefitk::FastMarchingImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer fastmarching = FilterType::New(); fastmarching->SetInput( speedImage ); fastmarching->SetOutputSize( speedImage->GetBufferedRegion().GetSize() ); fastmarching->SetStoppingValue( 100.0 ); fastmarching->SetSeed( seeds ); fastmarching->Update(); typedef FilterType::NodeContainer NodeContainer; typedef FilterType::NodeType NodeType; NodeContainer::Pointer seeds = NodeContainer::New(); seeds->Initialize(); NodeType seed; seed.SetValue( 0.0 ); seed.SetIndex( index ); seeds->InsertElement( 0, seed );

  24. FastMarchingImageFilter (a) (b) (c) (d) a b c d

  25. Gradient Sigmoid Input Image Gradient Magnitude output LevelSet Input Feature Feature Image Shape Detection Input LevelSet Threshold Smooth Rescale Binary Mask Positive LevelSet Balanced [-0.5,0.5] Shape Detection Malladi et al (1995)

  26. Shape Detection Malladi et al (1995) typedefitk::Image< float, 2 > ImageType; typedefitk::ShapeDetectionLevelSetImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer shapeDetection = FilterType::New(); shapeDetection->SetInput( inputLevelSet ); shapeDetection->SetFeatureImage( SpeedImage ); shapeDetection->SetPropagationScaling( 1.0 ); shapeDetection->SetCurvatureScaling( 0.05 ); shapeDetection->SetMaximumRMSError( 0.001 ); shapeDetection->SetMaximumIterations( 400 ); shapeDetection->Update();

  27. Shape Detection Malladi et al (1995) (a) (b) (c) (d) a b c d

  28. ZeroSet Displacement Geodesic Active Contours Caselles et al (1997) Intensity Profile X axis Advection term added

  29. Geodesic Active Contours Caselles et al (1997) • addition of a third advection term which attracts the level set to the object boundaries. Vector Field Computed Internally

  30. Geodesic Active Contours Caselles et al (1997) typedefitk::Image< float, 2 > ImageType; typedefitk::GeodesicActiveContourLevelSetImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer geodesicActiveContour = FilterType::New(); geodesicActiveContour->SetInput( inputLevelSet ); geodesicActiveContour->SetFeatureImage( SpeedImage ); geodesicActiveContour->SetPropagationScaling( 1.0 ); geodesicActiveContour->SetCurvatureScaling( 0.05 ); geodesicActiveContour->SetAdvectionScaling( 8.0 ); geodesicActiveContour->SetMaximumRMSError( 0.001 ); geodesicActiveContour->SetMaximumIterations( 400 ); geodesicActiveContour->Update();

  31. Geodesic Active Contours Caselles et al (1997) (a) (b) (c) (d) a b c d

  32. Canny-Edge Level Set • Advection term added controlled by edges Canny edges attract the zero set

  33. Canny-Edge Level Set typedefitk::Image< float, 2 > ImageType; typedefitk::CannySegmentationLevelSetImageFilter < ImageType, ImageType > FilterType; FilterType::Pointer cannySegmentation = FilterType::New(); cannySegmentation->SetInput( inputLevelSet ); cannySegmentation->SetFeatureImage( inputImage); cannySegmentation->SetPropagationScaling( 0.0 ); cannySegmentation->SetCurvatureScaling( 1.0 ); cannySegmentation->SetAdvectionScaling( 2.0 ); // Canny edges cannySegmentation->SetMaximumRMSError( 0.01 ); cannySegmentation->SetMaximumIterations( 400 ); cannySegmentation->SetThreshold( 2.0 ); cannySegmentation->SetVariance( 1.0 ); cannySegmentation->SetIsoSurface( 127.0 ); cannySegmentation->SetUseNegativeFeraturesOn( ); cannySegmentation->Update();

  34. Canny-Edge Level Set Original prior Step 15 Convergence

  35. Contents • ITK Segmentation Methods • Region Growing • Watershed • Level Sets • ITK Registration Methods • Statistics • Histogram • Classification

  36. Basic registration in ITK • Image registration is the process of determining the spatial transform that maps points from one image to homologous points on a object in the second image. • In ITK, registration is performed within a framework of pluggable components that can easily be interchanged.

  37. MRI-T2 PET 128 x 128 pixels 256 x 256 pixels Basic registration in ITK Moving Image ? Fixed Image ? Images provided as part of the project: “Retrospective Image Registration Evaluation”, NIH, Project No. 8R01EB002124-03, Principal Investigator, J. Michael Fitzpatrick, Vanderbilt University, Nashville, TN.

  38. Fixed image Metric Optimizer Interpolator Transform Moving image Registration in ITK pixels fitness value pixels transform parameters pixels points

  39. Registration in ITK • Transform: represents the spatial mapping of points from the fixed image space to points in the moving image space. • Interpolator: is used to evaluate moving image intensities at non-grid positions. • Metric: provides a measure of how well the fixed image is matched by the transformed moving image. • Optimizer: This measure forms the quantitative criterion to be optimized by the optimizer over the search space defined by the parameters of the transform.

  40. Registration in ITK • Toolbox overview

  41. Registration in ITK • Toolbox overview

  42. Registration in ITK: Overview Multi-Resolution Multi-Modality Registration Point Set Deformable registration

  43. Contents • ITK Segmentation Methods • Region Growing • Watershed • Level Sets • ITK Registration Methods • Statistics • Statistics applied to image • Classification

  44. Statistics: Overview • Statistics applied to image • Images histograms • Entropy • Mutual information • Classification • k-d Tree based k-Means Clustering • k-Means classification • Bayesian plug-in classifier • Classification using Markov Random Field

  45. Conclusion • Very useful for rapid prototyping • Strongly growing community and code base • Problems: • Very complex • Overhead -> higher run-times • Still under development

  46. Insight Toolkit Advanced Course Enjoy yourself !

  47. References • http://www.itk.org/ItkSoftwareGuide.pdf • http://www.itk.org/Doxygen/html/index.html • http://www.itk.org/HTML/Tutorials.htm

More Related