1 / 76

CSci 6971: Image Registration Lecture 8: Registration Components February 6, 2004

CSci 6971: Image Registration Lecture 8: Registration Components February 6, 2004. Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware. Image Metrics. How similar is image A to image B ?. Image Metrics. Does Image B matches Image A better than Image C ?. Image Metrics.

Download Presentation

CSci 6971: Image Registration Lecture 8: Registration Components February 6, 2004

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. CSci 6971: Image Registration Lecture 8: Registration ComponentsFebruary 6, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware

  2. Image Metrics How similar is image A to image B ? Lecture 8

  3. Image Metrics Does Image Bmatches Image A better than Image C ? Lecture 8

  4. Image Metrics >< Match( A , B ) Match( A , C ) Image B Image A Image C Lecture 8

  5. Image Metrics Match( A , B )Simplest MetricMean Squared Differences Lecture 8

  6. Mean Squared Differences For each pixel in A Image A Image B Difference( index ) = A( index ) – B( index ) Sum += Difference( index ) 2 Match( A , B ) = Sum / numberOfPixels Lecture 8

  7. j j i i Moving Image Grid Fixed Image Grid y’ y Space Transform x’ x Moving ImagePhysical Coordinates Fixed ImagePhysical Coordinates For each pixel in the Fixed Image Lecture 8

  8. Image Metrics FixedImage Metric Value MovingImage Interpolator Transform Parameters Lecture 8

  9. Mean Squared Differences #include "itkImage.h" #include "itkMeanSquaresImageToImageMetric.h" #include "itkLinearInterpolateImageFunction.h" #include "itkTranslationTransform.h" typedef itk::Image< char, 2 > ImageType; ImageType::ConstPointerfixedImage = GetFixedImage(); ImageType::ConstPointermovingImage = GetMovingImage(); typedef itk::LinearInterpolateImageFunction<ImageType, double >InterpolatorType; InterpolatorType::Pointerinterpolator = InterpolatorType::New(); typedef itk::TranslationTransform< double, 2 > TransformType; TransformType::Pointertransform = TransformType::New(); Lecture 8

  10. Mean Squared Differences typedef itk::MeanSquaresImageToImageMetric< ImageType,ImageType > MetricType; MetricType::Pointermetric = MetricType::New(); metric->SetInterpolator( interpolator ); metric->SetTransform( transform ); metric->SetFixedImage( fixedImage ); metric->SetMovingImage( movingImage ); MetricType::TransformParametersTypetranslation( Dimension ); translation[0] = 12; translation[1] = 27; double value = metric->GetValue( translation ); Lecture 8

  11. Mean Squared Differences MetricType::TransformParametersTypetranslation( Dimension ); double value[21][21]; for( int dx = 0; dx <= 20; dx++) { for( int dy = 0; dy <= 20; dy++) { translation[0] = dx; translation[1] = dy; value[dx][dy] = metric->GetValue( translation ); } } Lecture 8

  12. Evaluating many matches y y Transform x x Fixed Image Moving Image Lecture 8

  13. Plotting the Metric Mean Squared Differences Transform Parametric Space Lecture 8

  14. Plotting the Metric Mean Squared Differences Transform Parametric Space Lecture 8

  15. Evaluating many matches y y Transform (-15,-25) mm x x Fixed Image Moving Image Lecture 8

  16. Plotting the Metric Mean Squared Differences Transform Parametric Space Lecture 8

  17. Plotting the Metric Mean Squared Differences Transform Parametric Space Lecture 8

  18. The Best Transform Parameters Evaluation of the full parameter spaceis equivalent to performoptimization by exhaustive search Lecture 8

  19. The Best Transform Parameters Very SafebutVery Slow Lecture 8

  20. The Best Transform Parameters Better Optimization Methodsfor exampleGradient Descent Lecture 8

  21. Image Registration Framework FixedImage Metric MovingImage Interpolator Optimizer Transform Parameters Lecture 8

  22. G( x , y ) = ∆ f( x , y ) Gradient Descent Optimizer f( x , y ) S = Step L = LearningRate S=L∙ G( x , y ) Lecture 8

  23. G( x , y ) = ∆ f( x , y ) Gradient Descent Optimizer f( x , y ) S=L∙ G( x , y ) Lecture 8

  24. G( x , y ) = ∆ f( x , y ) Gradient Descent Optimizer f( x , y ) L too large S=L∙G( x , y ) Lecture 8

  25. G( x , y ) = ∆ f( x , y ) Gradient Descent Optimizer f( x , y ) L too small S=L∙G( x , y ) Lecture 8

  26. Gradient Descent Optimizer What’s wrong with this algorithm ? Lecture 8

  27. Gradient Descent Optimizer = millimeters SUnits ? = intensity f(x,y) Units ? = intensity / millimeters G(x,y)Units ? S=L∙G( x , y ) = millimeters2 / intensity LUnits ? Lecture 8

  28. Gradient Descent Optimizer f( x ) S=L∙G( x ) 1 1 Lecture 8

  29. Gradient Descent Optimizer f( x ) S=L∙G( x ) S=Large in high gradients S=Small in low gradients 1 1 Lecture 8

  30. Gradient Descent Optimizer f( x ) S=L∙G( x ) Works great with this function Works badly with this function Lecture 8

  31. Gradient Descent Variant Driving Safe ! Lecture 8

  32. Regular Step Gradient Descent f( x ) ^ S=D∙G( x ) IfG changes direction Di=Di-1/ 2.0 D1 D1 D2 D1 Lecture 8

  33. Regular Step Gradient Descent f( x ) ^ S=D∙G( x ) User Selects D1 User Selects Dstop User Selects Gstop D1 D1 D2 D1 Lecture 8

  34. Optimizers are like a car Watch while you are driving ! Lecture 8

  35. Watch over your optimizer Example:Optimizer registering an image with itself starting at (-15mm, -25mm) Lecture 8

  36. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 1.0 mm Lecture 8

  37. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 2.0 mm Lecture 8

  38. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 5.0 mm Lecture 8

  39. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 10.0 mm Lecture 8

  40. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 20.0 mm Lecture 8

  41. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 40.0 mm Lecture 8

  42. Watch over your optimizer Example:Optimizer registering an image shifted by (-15mm, -25mm)The optimizer starts at (0mm,0mm) Lecture 8

  43. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 1.0 mm Lecture 8

  44. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 2.0 mm Lecture 8

  45. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 5.0 mm Lecture 8

  46. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 10.0 mm Lecture 8

  47. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 20.0 mm Lecture 8

  48. Plotting the Optimizer’s Path Mean Squared Differences Step Length = 40.0 mm Lecture 8

  49. Other Image Metrics Normalized Correlation Lecture 8

  50. Normalized Correlation For each pixel in A Image A Image B SumAB += A( index ) ∙ B( index ) SumAA += A( index ) ∙ A( index ) SumBB += B( index ) ∙ B( index ) Match( A , B ) = SumAB / √ ( SumAA∙SumBB ) Lecture 8

More Related