CSci 6971: Image Registration Lecture 27: FEM-Based Methods April 23, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr.

Slides:



Advertisements
Similar presentations
ITK Deformable Registration
Advertisements

Finite element method Among the up-to-date methods of stress state analysis, the finite element method (abbreviated as FEM below, or often as FEA for analyses.
Isoparametric Elements Element Stiffness Matrices
Basic FEA Procedures Structural Mechanics Displacement-based Formulations.
CSci 6971: Image Registration Lecture 14 Distances and Least Squares March 2, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
Point-wise Discretization Errors in Boundary Element Method for Elasticity Problem Bart F. Zalewski Case Western Reserve University Robert L. Mullen Case.
Beams and Frames.
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
LECTURE SERIES on STRUCTURAL OPTIMIZATION Thanh X. Nguyen Structural Mechanics Division National University of Civil Engineering
MANE 4240 & CIVL 4240 Introduction to Finite Elements Practical considerations in FEM modeling Prof. Suvranu De.
MANE 4240 & CIVL 4240 Introduction to Finite Elements
The Finite Element Method A Practical Course
Some Ideas Behind Finite Element Analysis
APPLIED MECHANICS Lecture 10 Slovak University of Technology
Katsuyo Thornton*, R. Edwin García✝, Larry Aagesen*
Chapter 17 Design Analysis using Inventor Stress Analysis Module
Section 4: Implementation of Finite Element Analysis – Other Elements
ECIV 720 A Advanced Structural Mechanics and Analysis
Finite Element Primer for Engineers: Part 2
Basic FEA Concepts. FEA Project Outline Consider the physics of the situation. Devise a mathematical model. Obtain approximate results for subsequent.
Isoparametric Elements Element Stiffness Matrices
CSci 6971: Image Registration Lecture 3: Images and Transformations January 20, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
Finite Element Method Introduction General Principle
CSci 6971: Image Registration Lecture 26: BSpline Transforms April 20, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI.
CSE351/ IT351 Modeling and Simulation
CSci 6971: Image Registration Lecture 4: First Examples January 23, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr.
CSci 6971: Image Registration Lecture 8: Registration Components February 6, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
Finite Element Method in Geotechnical Engineering
CSci 6971: Image Registration Lecture 2: Vectors and Matrices January 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI.
Manipulator Dynamics Amirkabir University of Technology Computer Engineering & Information Technology Department.
CSci 6971: Image Registration Lecture 9: Registration Components February 10, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
Introduction to Finite Element Analysis for Structure Design Dr. A. Sherif El-Gizawy.
MCE 561 Computational Methods in Solid Mechanics
CSci 6971: Image Registration Lecture 5: Feature-Base Regisration January 27, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
CSci 6971: Image Registration Lecture 16: View-Based Registration March 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
MECH593 Introduction to Finite Element Methods
MANE 4240 & CIVL 4240 Introduction to Finite Elements
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
MANE 4240 & CIVL 4240 Introduction to Finite Elements
Introduction to virtual engineering László Horváth Budapest Tech John von Neumann Faculty of Informatics Institute of Intelligent Engineering.
B-Spline Constrained Deformations Submitted by: - Course Instructor:- Avinash Kumar ( ) Prof. Bhaskar Dasgupta Piyush Rai ( )(ME 751)
ME 520 Fundamentals of Finite Element Analysis
Analytical Vs Numerical Analysis in Solid Mechanics Dr. Arturo A. Fuentes Created by: Krishna Teja Gudapati.
Finite Element Method.
Haptics and Virtual Reality
Eng Ship Structures 1 Matrix Analysis Using MATLAB Example.
1 20-Oct-15 Last course Lecture plan and policies What is FEM? Brief history of the FEM Example of applications Discretization Example of FEM softwares.
The Finite Element Method A Practical Course
Derivatives In modern structural analysis we calculate response using fairly complex equations. We often need to solve many thousands of simultaneous equations.
11/11/20151 Trusses. 11/11/20152 Element Formulation by Virtual Work u Use virtual work to derive element stiffness matrix based on assumed displacements.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
Last course Bar structure Equations from the theory of elasticity
Illustration of FE algorithm on the example of 1D problem Problem: Stress and displacement analysis of a one-dimensional bar, loaded only by its own weight,
Sensitivity derivatives Can obtain sensitivity derivatives of structural response at several levels Finite difference sensitivity (section 7.1) Analytical.
Finite Element Analysis
HEAT TRANSFER FINITE ELEMENT FORMULATION
Outline Introduction Research Project Findings / Results
Basic Geometric Nonlinearities Chapter Five - APPENDIX.
Advisor : Ku-Yaw Chang Speaker : Ren-Li Shen /6/12.
1 Copyright by PZ Bar-Yoseph © Finite Element Methods in Engineering Winter Semester Lecture 7.
Finite Element Method in Geotechnical Engineering
Katsuyo Thornton1, R. Edwin García2, Larry Aagesen3
Peter Uzunov Associate professor , PhD Bulgaria, Gabrovo , 5300 , Stramnina str. 2 s:
FEM : Finite Element Method 2017.
FEA Introduction.
GPU Implementations for Finite Element Methods
Implementation of 2D stress-strain Finite Element Modeling on MATLAB
GENERAL VIEW OF KRATOS MULTIPHYSICS
OVERVIEW OF FINITE ELEMENT METHOD
Coordinate Transformation in 3D Final Project Presentation
Presentation transcript:

CSci 6971: Image Registration Lecture 27: FEM-Based Methods April 23, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware

Image RegistrationLecture 27 2 Open Source Disclaimer Many of the slides in this talk were taken from the ITK course presented at MICCAI 2003 by Dr. James Gee (U. Penn) Brian Avants (U. Penn) Tessa Sundaram (U. Penn) Dr. Lydia Ng (Insightful Corp.) Of course, any errors… are mine.

Image RegistrationLecture 27 3 Deformable Registration Finite Element Methods for Deformable Registration

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

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

Image RegistrationLecture 27 6 Deformable Transformation y x

Image RegistrationLecture 27 7 Deformable Transformation y x

Image RegistrationLecture 27 8 FEM Grid y x FEM Grid Resampling Grid

Image RegistrationLecture 27 9 FEM Grid y x FEM Grid

Image RegistrationLecture FEM Grid y x FEM Grid Computed Deformation

Image RegistrationLecture FEM Grid y x FEM Grid Forces Displacements

Image RegistrationLecture FEM Iterative Linear System Finite Element Methods Forces Displacements Regularization F U K Vector N Matrix NxN

Image RegistrationLecture FEM Iterative Linear System Finite Element Methods F U K FUK ● =

Image RegistrationLecture FEM Iterative Linear System N = Number of Nodes FU K N x NNN ● =

Image RegistrationLecture FEM Iterative Linear System Iteratively Solving a Linear System FUK ● = Image based forces Linearization of a Physical Model Node Displacements

Image RegistrationLecture FEM Energy Formulation Find registration transformation that maximizes

Image RegistrationLecture FEM Energy Formulation Benefits  Intuitive; easier to express constraints  Powerful numerical solutions available  Optimality of solutions; easier to debug Limitations  Difficult / overhead to implement

Image RegistrationLecture Deformable Registration To solve the deformation, consider only displacements of the form

Image RegistrationLecture Deformable Registration Linear Elements

Image RegistrationLecture Deformable Registration φ1φ1 Element α1α1 Shape Function

Image RegistrationLecture Deformable Registration φ2φ2 Element α2α2 Shape Function

Image RegistrationLecture Deformable Registration φ3φ3 Element α3α3 Shape Function

Image RegistrationLecture Deformable Registration φ3φ3 Element φ1φ1 φ2φ2 u α2α2 α3α3 Shape Functions α1α1

Image RegistrationLecture Deformable Registration Higher Order Elements

Image RegistrationLecture Deformable Registration φ1φ1 Element α1α1 Shape Function

Image RegistrationLecture Deformable Registration φ4φ4 Element α4α4 Shape Function

Image RegistrationLecture Deformable Registration φ2φ2 Element α2α2 Shape Function

Image RegistrationLecture Deformable Registration φ5φ5 Element α5α5 Shape Function

Image RegistrationLecture Deformable Registration φ3φ3 Element α3α3 Shape Function

Image RegistrationLecture Deformable Registration φ6φ6 Element α6α6 Shape Function

Image RegistrationLecture Deformable Registration φ3φ3 Element φ1φ1 φ2φ2 u α2α2 α3α3 Shape Functions α1α1 α6α6 α5α5 α4α4 φ5φ5 φ6φ6 φ4φ4

Image RegistrationLecture Deformable Registration Substitute u h into E, then minimizing with respect to α i :

Image RegistrationLecture BSplines Grid & Image Grid Calculation are made in an Element by Element basis

Image RegistrationLecture BSplines Grid & Image Grid Elements are connected at Nodes at which the displacement is solved

Image RegistrationLecture BSplines Grid & Image Grid Efficiency is gained by elemental computation

Image RegistrationLecture BSplines Grid & Image Grid Domain subdivision (Mesh) can be tailored to the underlying geometry of the image.

Image RegistrationLecture FEM Solver Image Metric Derivative Physical Assumptions Solve New Solution Start Iteration Loop End Iteration Loop  Begin Loop by making physical assumptions and then taking the derivative of the similarity metric.  End loop when the solution stabilizes.

Image RegistrationLecture FEM Solver Image Metric Derivative Physical Assumptions Solve New Solution Start Iteration Loop End Iteration Loop F U K

Image RegistrationLecture FEM Solver F K U U new Start Iteration Loop If ( U new – U old ) < ε then Stop KFU ● =

Image RegistrationLecture KU=F in Code FEMSolver::AssembleF() calls FEMImageMetricLoad::Fe() itk::FEMSolver::AssembleK() FEMSolver:: Solve() FEMSolver :: AddSolution() itk::FEMRegistrationFilter::IterativeSolve()

Image RegistrationLecture FEM-Based Registration Options Element Type  Triangles  Quadrilaterals  Hexahedra  Tetrahedra

Image RegistrationLecture FEM-Based Registration Options Continuum / Physical Model  Linear elasticity  Membrane  Other specialized

Image RegistrationLecture FEM-Based Registration Options Mesh geometry  Uniform grid vs. adaptive  Anatomy-specific mesh

Image RegistrationLecture FEM-Based Registration Options Metric  Mean square  Normalized cross-correlation  Mutual information  Pattern intensity

Image RegistrationLecture ITK FEM Library Introduction to the ITK Finite Element Library

Image RegistrationLecture ITK FEM Library Library for solving general FEM problems  Object oriented  C++ classes are used to  specify the geometry and behavior of the elements  apply external forces and boundary conditions  solve problem and post-process the results

Image RegistrationLecture ITK FEM Library Applications  Mechanical modeling  Image registration

Image RegistrationLecture FEM Basics  Mesh  Nodes  Points in space where solutions are obtained  Elements  e.g., 2-D triangular elements  Loads  e.g., gravity (body) load  Boundary conditions  e.g., nodes fixed in space

Image RegistrationLecture ITK FEM Elements  Core of the library is the Element class  Code is in two functionally independent parts  Geometry and Physics  Arbitrarily combined to create new elements  Problem domain is specified by a mesh GeometryPhysics

Image RegistrationLecture Loads Classes that apply external forces (loads) to elements  Various types  Easily extensible

Image RegistrationLecture Solvers  Provide functionality to obtain and process the solution  Different solution methods  different solver classes  Static problems  Time dependent - dynamic problems

Image RegistrationLecture Solvers Use linear system wrappers to link FEM classes to an external numeric library  Any numeric library can be used to solve the systems of linear equations in FEM problems  VNL and ITPACK currently supported

Image RegistrationLecture Setting Up a FEM Problem  Four-step process  Select element classes  Discretize problem domain  Specify boundary conditions  Specify/Apply external loads  Two options  Directly  create proper objects in code  Indirectly  read object definitions from a file

Image RegistrationLecture Deformable Registration FEM-Base Registration Parameters

Image RegistrationLecture Parameter File : Part 1 % % Parameters for the single- or multi-resolution techniques % % Number of levels in the multi-resolution pyramid (1 = single-res) 1% Highest level to use in the pyramid 1 1 % Scaling at lowest level for each image dimension 8 % Number of pixels per element 1.e5 % Elasticity (E) 1.e4 % Density (RhoC) 1. % Image energy scaling 4 % NumberOfIntegrationPoints 1 % WidthOfMetricRegion 25 % MaximumIterations % % Parameters for the registration % % Similarity metric (0=mean sq, 1=ncc, 2=pattern int, 3=MI) 1.0 % Alpha 1 % DescentDirection 2 % DoLineSearch (0=never, 1=always, 2=if needed) 1.e1 % TimeStep 1.e-15 % Energy Reduction Factor

Image RegistrationLecture Parameter File : Part 2 % % Information about the image inputs % % ImageDimension 256 % Nx (image x dimension) 256 % Ny (image y dimension) 128 % Nz (image z dimension - not used if 2D) brain_slice1.mhd % ReferenceFileName brain_slice1warp.mhd % TargetFileName % % The actions below depend on the values of the flags preceding them. % For example, to write out the displacement fields, you have to set % the value of WriteDisplacementField to 1. % % UseLandmarks? - % LandmarkFileName brain_result % ResultsFileName (prefix only) 1 % WriteDisplacementField? brain_disp % DisplacementsFileName (prefix only) 1 % ReadMeshFile? brain_mesh.fem % MeshFileName END

Image RegistrationLecture Configuring Parameters #1 this->DoMultiRes(true); this->m_NumLevels = nlev; this->m_MaxLevel = mlev; for (jj=0; jj < ImageDimension; jj++) { m_ImageScaling[jj] = dim; } for (jj=0; jj m_NumLevels; jj++) { this->m_MeshPixelsPerElementAtEachResolution(jj) = p; this->SetElasticity(e, jj); this->SetRho(p, jj); this->SetGamma(g, jj); this->SetNumberOfIntegrationPoints(ip, jj); this->SetWidthOfMetricRegion(w, jj); this->SetMaximumIterations(mit, jj); }

Image RegistrationLecture Configuring Parameters #2 this->SetDescentDirectionMinimize(); or this->SetDescentDirectionMaximize(); this->DoLineSearch( n ); // n = 0, 1, 2 this->SetTimeStep( t ); this->SetEnergyReductionFactor( fbuf );

Image RegistrationLecture Configuring Parameters #3 this->m_ImageSize[0] = xdim; this->m_ImageSize[1] = ydim; if (dim == 3) this->m_ImageSize[2] = zdim; this->SetReferenceFile( imgfile1 ); this->SetTargetFile( imgfile2 ); this->UseLandmarks( true ); this->SetLandmarkFile( lmfile ); this->SetResultsFile( resfile ); this->SetWriteDisplacements( true ); this->SetDisplacementsFile( dispfile ); this->m_ReadMeshFile = true; this->m_MeshFileName = meshfile;

Image RegistrationLecture Deformable Registration FEM-Based Registration: Writing the Code../ Insight / Examples / Registration / DeformableRegistration1.cxx

Image RegistrationLecture Header Declarations #include "itkImageFileReader.h" #include "itkImageFileWriter.h“ #include "itkFEM.h" #include “itkFEMRegistrationFilter.h"

Image RegistrationLecture Type Definitions typedef itk::Image fileImageType; typedef itk::Image ImageType; typedef itk::fem::Element2DC0LinearQuadrilateralMembrane ElementType; typedef itk::fem::Element2DC0LinearTriangularMembrane ElementType2; typedef itk::fem::FEMRegistrationFilter RegistrationType;

Image RegistrationLecture Registering Objects ElementType::LoadImplementationFunctionPointer fp1 = & itk::fem::ImageMetricLoadImplementation ::ImplementImageMetricLoad; DispatcherType::RegisterVisitor( (ImageLoadType*)0, fp1 ); ElementType2::LoadImplementationFunctionPointer fp2 = & itk::fem::ImageMetricLoadImplementation ::ImplementImageMetricLoad; DispatcherType2::RegisterVisitor( (ImageLoadType*)0, fp2 );

Image RegistrationLecture Input / Output RegistrationType::Pointer registration = RegistrationType::New(); registration->SetConfigFileName( paramname ); registration->ReadConfigFile();

Image RegistrationLecture Material and Element Setup // Create the material properties itk::fem::MaterialLinearElasticity::Pointer m; m = itk::fem::MaterialLinearElasticity::New(); m->GN = 0; m->E = registration->GetElasticity(); m->A = 1.0; // Cross-sectional area m->h = 1.0; // Thickness m->I = 1.0; // Moment of inertia m->nu = 0.; // Poisson's ratio m->RhoC = 1.0; // Density // Create the element type ElementType::Pointer e1 = ElementType::New(); e1->m_mat= dynamic_cast ( m ); registration->SetElement( e1 ); registration->SetMaterial( m );

Image RegistrationLecture Running the Registration registration->RunRegistration(); registration->WriteWarpedImage(); if ( registration->GetWriteDisplacements() ) { registration->WriteDisplacementField( 0 ); // x registration->WriteDisplacementField( 1 ); // y registration->WriteDisplacementFieldMultiComponent(); }

Image RegistrationLecture FEM - Deformable Registration Example #1

Image RegistrationLecture Fixed Image

Image RegistrationLecture Moving Image

Image RegistrationLecture Registered Image

Image RegistrationLecture Registered Image

Image RegistrationLecture FEM - Deformable Registration Example #2

Image RegistrationLecture Fixed Image

Image RegistrationLecture Moving Image

Image RegistrationLecture Registered Image

Image RegistrationLecture Registered Image

Image RegistrationLecture FEM - Deformable Registration Example #3

Image RegistrationLecture Fixed Image

Image RegistrationLecture Moving Image

Image RegistrationLecture Registered Image

Image RegistrationLecture Registered Image

Image RegistrationLecture FEM - Deformable Registration Example #4 Elasticity value was doubled

Image RegistrationLecture Fixed Image

Image RegistrationLecture Moving Image

Image RegistrationLecture Registered Image

Image RegistrationLecture Registered Image

Image RegistrationLecture End Enjoy ITK !