140 likes | 246 Views
Registration Helper Classes. Stephen Aylward Matt Turek Luis Ibanez. Goals. Increase the speed of image registration in ITK Provide Slicer modules for image registration Provide Slicer modules for batch image registration Reduce the effort and expertise required for ITK image registration.
E N D
Registration Helper Classes Stephen Aylward Matt Turek Luis Ibanez
Goals • Increase the speed of image registration in ITK • Provide Slicer modules for image registration • Provide Slicer modules for batch image registration • Reduce the effort and expertise required for ITK image registration
Outline • ITK Image Registration Helper class • Features • Slicer Modules • Status and Future Work
Image Registration Helper Class • Multi-threaded • Implicitly handles oriented images • Options (via enumerations): • Transforms • VersorRigid3D, Affine, BSplines • Metrics • MattesMI, NormalizedCorrelation, MeanSquaredError • Interpolators • Linear, BSpline, Windowed Sinc • Optimizers • Gradient • FRPR for Rigid/Affine and LBFSGB for BSpline • Multi-resolution • 3-levels, Gradient at each level • Evolutionary • OnePlusOne followed-by Gradient • Initialization • Centers of Images, Centers of Mass, Second Moments
Image Registration Helper Class • Examples of member functions • LoadParameters( std::string filename ) • “T1-T2-BrainRegistration.prm”, “CT-CT-LiverRegistration.prm”, “MyProjectsRegistration.prm” • Simplifies batch processing • SetExpectedOffsetMagnitude( double expectedOffset ) • Used to calculate scales for rigid/affine optimization • SetBSplineControlPointPixelSpacing( double controlPointSpacing ) • Used to calculate number of control points for BSplines • Update( void ) • Load transform and resample moving image • Initial registration • Rigid registration • Affine registration • BSpline registration
Image Registration Helper Class • Default behavior of Update() • Initial • Centers of mass • Rigid • Versor3D + MattesMI + LinearInterpolation + SamplingRatio=0.05 + EvolutionaryOptimization + MaxIterations=100 + … • Affine • Affine + MattesMI + LinearInterpolation + SamplingRatio=0.10 + Gradient + MaxIterations=100 + … • BSpline • BSpline + MattesMI + BSplineInterpolation + SamplingRatio=0.2 + Gradient + MaxIterations=50 + ControlPointPixelSpacing=20
Usage #include “itkImageToImageRegistrationHelper.h” Int main(int argc, char *argv[]) { typedef itk::OrientedImage< short, 3> ImageType typedef itk::ImageToImageRegistrationHelper< ImageType > RegType; RegType::Pointer reg = RegType::New(); reg->LoadFixedImage( argv[1] ); reg->LoadMovingImage( argv[2] ); reg->LoadParameters( argv[3] ); reg->SetRigidOptimizationMethodEnum( RegType::MULTIRESOLUTION_OPTIMIZATION ); reg->Update(); reg->SaveImage( argv[4], reg->GetFinalMovingImage() ); }
Internal Class Hierarchy itkProcessObject itkImageToImageRegistrationMethod itkOptimizedImageToImageRegistrationMethod itkInitialImageToImageRegistrationMethod itkRigidImageToImageRegistrationMethod itkAffineImageToImageRegistrationMethod = Derives from itkBSplineImageToImageRegistrationMethod
New Slicer Modules • Status: • Requires CVS ITK • CMake enable: • ITK_USE_REVIEW • ITK_USE_OPTIMIZED_REGISTRATION_METHODS • Bug in Optimized Linear Interpolation • Parameter tweaking • Testing modules: oriented images, etc. • RegisterImages • BatchRegisterImages
NAMIC DTI Atlas Registration Atlas = FixedImage = Red Channel = ICBM DTI Atlas: ICBM_T2.nhdr Subject = MovingImage = Green Channel = 01009-t2w.nrrd
More Information • IJ article on multi-threaded registration • Article on modifications to ITK pending • Matt Turek et al. • Thanks Matt Turek and Luis Ibanez!!!
Future Work • Fix linear interpolation • Testing and tweaking • Oriented images • Manage memory requirements • itkOptimization.h: typedef Array< double > ParametersType; • Speed • BSplines: • Only process control points that contain samples