Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSci 6971: Image Registration Lecture 20: Demons Registration April 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI.

Similar presentations


Presentation on theme: "CSci 6971: Image Registration Lecture 20: Demons Registration April 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI."— Presentation transcript:

1 CSci 6971: Image Registration Lecture 20: Demons Registration April 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware

2 Image RegistrationLecture 20 2 Deformable Registration

3 Image RegistrationLecture 20 3 Deformable Transforms

4 Image RegistrationLecture 20 4 Deformable Transformation y Fixed Image Transform x y Moving Image x

5 Image RegistrationLecture 20 5 Deformable Transformation y Fixed Image Transform x y Moving Image x

6 Image RegistrationLecture 20 6 Deformable Transformation y Fixed Image Transform x y Moving Image x

7 Image RegistrationLecture 20 7 Image Resampling Fixed Image Moving Image Transform Interpolator Resample Image Filter Deformed Image

8 Image RegistrationLecture 20 8 Image Resampling Fixed Image Moving Image Transform Interpolator Resample Image Filter Deformed Image High Order Polynomials Orthogonal Basis Splines Explicit Vector Field

9 Image RegistrationLecture 20 9 Kernel Splines Transforms Source Landmarks Target Landmarks Displacement Vectors Interpolated Values

10 Image RegistrationLecture 20 10 Kernel Spline Transforms Thin Plates Thin Plates R 2 log R Elastic Body Elastic Body Reciprocal Volume

11 Image RegistrationLecture 20 11 Kernel Spline Transforms InsightApplications / ThinPlateSplines

12 Image RegistrationLecture 20 12 Resampling: Kernel Spline Transform #include "itkImage.h" #include "itkResampleImageFilter.h" #include "itkLinearInterpolateImageFunction.h" #include "itkElasticBodySplineKernelTransform.h" typedef itk::Image ImageType; ImageType::ConstPointer fixedImage = GetFixedImage(); ImageType::ConstPointer movingImage = GetMovingImage(); typedef itk::LinearInterpolateImageFunction InterpolatorType; InterpolatorType::Pointer interpolator = InterpolatorType::New(); typedef itk::ResampleImageFilter< ImageType, ImageType > FilterType; FilterType::Pointer resampler = FilterType::New();

13 Image RegistrationLecture 20 13 Resampling: Kernel Spline Transform typedef itk::ElasticBodySplineKernelTransform TransformType; TransformType::Pointer transform = TransformType::New(); resampler->SetInterpolator( interpolator ); resampler->SetInput( movingImage ); ImageType::RegionType region = fixedImage->GetBufferedRegion(); resampler->SetSize( region->GetSize() ); resampler->SetOutputStartIndex( region->GetIndex() ); resampler->SetOutputSpacing( fixedImage->GetSpacing() ); resampler->SetOutputOrigin( fixedImage->GetOrigin() );

14 Image RegistrationLecture 20 14 Resampling: Kernel Spline Transform resampler->SetTransform( transform ); typedef TransformType::PointSetType PointSetType; PointSetType::Pointer sourceLandmarks = PointSetType::New(); PointSetType::Pointer targetLandmarks = PointSetType::New(); transform->SetSourceLandmarks( sourceLandmarks ); transform->SetTargetLandmarks( targetLandmarks ); typedef PointSetType::PointsContainer PointsContainer; PointsContainer::Pointer sources = sourceLandmarks->GetPoints(); PointsContainer::Pointer targets = targetLandmarks->GetPoints();

15 Image RegistrationLecture 20 15 Resampling: Kernel Spline Transform sources->Reserve( numberOfLandmarks ); targets->Reserve( numberOfLandmarks ); typedef PointSetType::PointType PointType; PointType source; PointType target; for( int i = 0; i < numberOfLandmarks; i++ ) { inputFile >> source; inputFile >> target; sources->InsertElement( i, source ); targets->InsertElement( i, target ); } transform->ComputeWMatrix(); resampler->Update();// Finally !! ImageType::ConstPointer deformedImage = resampler->GetOutput();

16 Image RegistrationLecture 20 16 Kernel Spline Transforms VolView : ITK Plugin

17 Image RegistrationLecture 20 17 Kernel Spline Transforms VolView : ITK Plugin

18 Image RegistrationLecture 20 18 Deformable Transforms Deformation Fields

19 Image RegistrationLecture 20 19 Deformation Vector Field ParaView: http://www.paraview.org

20 Image RegistrationLecture 20 20 Warp Image Filter #include "itkImage.h" #include "itkWarpImageFilter.h" #include "itkLinearInterpolateImageFunction.h" typedef itk::Image ImageType; ImageType::ConstPointer fixedImage = GetFixedImage(); ImageType::ConstPointer movingImage = GetMovingImage(); typedef itk::LinearInterpolateImageFunction InterpolatorType; InterpolatorType::Pointer interpolator = InterpolatorType::New(); typedef itk::Vector VectorType; typedef itk::Image VectorFieldType; VectorFieldType::Pointer vectorField = GetVectorField();

21 Image RegistrationLecture 20 21 Warp Image Filter typedef itk::WarpImageFilter< ImageType, ImageType, VectorFieldType > WarpFilterType; WarpFilterType::Pointer warpFilter = WarpFilterType::New(); warpFilter->SetInterpolator( interpolator ); warpFilter->SetInput( movingImage ); warpFilter->SetOutputSpacing( fixedImage->GetSpacing() ); warpFilter->SetOutputOrigin( fixedImage->GetOrigin() ); warpFilter->SetDeformationField( vectorField ); warpFilter->Update(); ImageType::ConstPointer deformedImage = warpFilter->GetOutput();

22 Image RegistrationLecture 20 22 Demons Registration

23 Image RegistrationLecture 20 23 Demons Registration Demons is a Family of Algorithms

24 Image RegistrationLecture 20 24 Demons Registration Demons Type 0

25 Image RegistrationLecture 20 25 Demons Registration: Type 0 Scene Model Transform

26 Image RegistrationLecture 20 26 Demons Registration: Type 0 Scene Model Transform Gradients

27 Image RegistrationLecture 20 27 Demons Registration: Type 0 Scene Model Transform Forces

28 Image RegistrationLecture 20 28 Demons Registration Demons Type 1

29 Image RegistrationLecture 20 29 Demons Registration: Type 1 SceneModel Transform Vector Field

30 Image RegistrationLecture 20 30 Demons Registration: Type 1 SceneModel Transform Vector Field

31 Image RegistrationLecture 20 31 Demons Registration: Type 1 SceneModel Transform Vector Field

32 Image RegistrationLecture 20 32 Demons Registration: Type 1 SceneModel Transform Vector Field

33 Image RegistrationLecture 20 33 Demons Registration: Type 1 Scene Gradient

34 Image RegistrationLecture 20 34 Demons Registration: Type 1 Scene Gradient Intensity Space Desired Displacement Current Estimation

35 Image RegistrationLecture 20 35 Demons Registration: Type 1 SceneModel Transform Vector Field

36 Image RegistrationLecture 20 36 Demons Registration: Type 1 Scene

37 Image RegistrationLecture 20 37 Demons Registration: Type 1 Previous Field Incremental Field Next Field Iterations Gaussian Smoothin g

38 Image RegistrationLecture 20 38 Demons Registration: Type 1 V = ( s – m ). Grad(s) Grad(s) 2 V = ( s – m ). Grad(s) Grad(s) 2 + (s-m) 2 K

39 Image RegistrationLecture 20 39 Image Registration Framework Fixed Image Moving Image Increment Computation Transform Interpolator PDE Solver Deformation Field

40 Image RegistrationLecture 20 40 Demons Registration: Type 1 #include "itkImage.h" #include "itkDemonsRegistrationFilter.h" typedef itk::Image ImageType; ImageType::ConstPointer fixedImage = GetFixedImage(); ImageType::ConstPointer movingImage = GetMovingImage(); typedef itk::Vector VectorType; typedef itk::Image VectorFieldType; typedef itk::DemonsRegistrationFilter< ImageType, VectorFieldType > DemonsType; DemonsType::Pointer demons = DemonsType::New();

41 Image RegistrationLecture 20 41 Demons Registration: Type 1 demons->SetFixedImage( fixedImage ); demons->SetMovingImage( movingImage ); demons->SetNumberOfIterations( 200 ); demons->SetStandardDeviations( 1.0 ); demons->Update(); ImageType::ConstPointer vectorField = demons->GetOutput();

42 Image RegistrationLecture 20 42 Demons Registration: Type 1 Scene

43 Image RegistrationLecture 20 43 Demons Registration: Type 1 Model

44 Image RegistrationLecture 20 44 Demons Registration: Type 1 After Registration

45 Image RegistrationLecture 20 45 Demons Registration: Type 1 Scene

46 Image RegistrationLecture 20 46 Demons Registration: Type 1 Scene

47 Image RegistrationLecture 20 47 Requirements Fixed and Moving images should have the same intensity distribution !

48 Image RegistrationLecture 20 48 Eventual Preprocessing - Histogram Matching Filter - Anisotropic Diffusion Filtering

49 Image RegistrationLecture 20 49 Image Registration Framework Fixed Image Moving Image Increment Computation Transform Interpolator PDE Solver Resampler Moving Registered Deformation Field

50 Image RegistrationLecture 20 50 End Enjoy ITK !


Download ppt "CSci 6971: Image Registration Lecture 20: Demons Registration April 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI."

Similar presentations


Ads by Google