Educational Material

Last modified: November 1, 2023
home resources for CAS research publications data educational material personal consulting
Handouts

Slides

Tutorials And Workshops

Tricks of the Trade

Useful Books


Image-Guided Interventions hands on tutorial.


Handouts

If you find errors or typos in these handouts please notify me.
  1. Frames, rigid transformation representation as quaternions, Euler angles and axis angle (pdf), java and C++ implementations are available here.
  2. Point Based Rigid Registration also known in the vision community as absolute orientation (pdf), java, C++, and matlab implementations are available here.
    For a demonstration of pivot calibration download the following video. Notice how the needle is bending while pivoting, this is not a problem as the reference coordinate system (EM sensor coil) is located near the tip of the needle and remains in a fixed position relative to it.
  3. Iterative Closest Point Algorithm (pdf).
  4. Principle Component Analysis (pdf).
  5. Edge Detection (pdf).
  6. Fast median filtering (pdf). C++ implementation available here.

Slides

Algorithms

  1. Point based rigid registration - Horn's closed form algorithm and the Iterative Closest Point algorithm (ppt), also see why Fiducial Registration Error (FRE) is not a viable indicator of Target Registration Error (TRE) in rigid point based registration.
  2. Rigid registration tutorial for Image Guided Therapy (ppt).
  3. Rigid registration talk given at UBC EECE542 (pptx).
  4. High level introduction to computer/robot vision and detailed discussion on stereo reconstruction (ppt).
  5. Tracking for image-guided interventions (ppt).
  6. A succinct, 15 slide, introduction to image-guided interventions (ppt).
  7. A 15min introduction to Cone-Beam CT (ppt).
  8. An introduction to X-ray imaging and the DICOM standard in 15min (ppt), impossible.

Open research

  1. Open Science, the right way to practice research (ppt).
  2. Sharing data, medical images as a case study (ppt).
  3. Data repositories, lightning talk (ppt).

Software engineering

  1. Open source software development (original ppt and version 2).
  2. An introduction to the Git version control system (ppt).
  3. An introduction to DevOps with an emphasis on testing and accompanying exercise ( original ppt and exercise zip file, version 2 of presentation and exercise).

Miscellaneous

  1. Academic career in biomedical engineering - A set of slides from a panel discussion held during EMBC'08, career options for biomedical engineers (ppt).
  2. An introduction to LaTex (ppt) and accompanying examples (zipped latex files).
  3. Machine learning (AI) trust but verify (ppt). A short presentation on various aspects of AI publications/research that all users of the technology and practitioners need to think of.

Tutorials And Workshops


Tricks of the Trade

The information given here is based on practical experience and is often not described in published material. Unfortunately, it sometimes has dramatic effects on the possible results.

Phantom Construction

  • Symmetry is the bane of registration. A symmetric phantom removes constraints from the solution space, introducing multiple valid solutions. Most often we would like to avoid this situation.
  • Symmetry is an advantage for segmentation. Knowing that your target is symmetric introduces additional constraints that can potentially reduce your search space.
  • Construct from a single piece, if possible. This results in improved mechanical accuracy and stability.
  • Every phantom or part of a phantom should include at least three points (divots or spherical markers) that can be easily and accurately localized. This will allow you to accurately localize the phantom or its parts relative to each other.
  • Measure twice, cut once. It's often easy to forget that this isn't software.
  • Drilling deep, small diameter holes is not a trivial task. The forces on the drill bit will tend to bend it so that the holes are not straight on. Laser cutting is a possible solution.
  • Recipe for gelatin based US phantom,McNamara M. P., McNamara M. E., "Preparation of Homemade Ultrasound Biopsy Phantom", J. Clinical Ultrasound, July/Aug, 1989; 17:456-458:
    • 24 packets of Knox brand gelatin (1 packet is 7.2grams)
    • 4 level tablespoons of flour
    • 9 cups boiling water (approx 2100 ml)

    Combine gelatin with flour in bowl. Add boiling water, and stir until dissolved (about 5 minutes). Small clumps can be discarded. Wait for 5 minutes and continue stirring. Pour solution into the phantom. After filling the phantom with gelatine keep it refrigerated until the gelatine becomes stiff. It you intend to use the phantom for an extended period of time keep it in a refrigerator.

    This recipe was used in this venous phantom constructed in our lab.

US calibration

  • When calibrating using a water bath:(a) use warm water; and (b) wait for a couple of minutes to let the air bubbles settle.
  • Remember that the speed of sound in water is not equivalent to its speed in tissue.
  • Fiducials

    • Use rigidly attached fiducials, if possible, or make them part of your phantom (see phantom construction above). This will allow you to acquire a single CT scan of the object which will still be valid a year later. Skin adhesive fiducials will fall off over time, requiring a new scan.
    • If using skin adhesive fiducials, use a marker to outline their locations. For qualitative evaluation you can replace fiducials that fall off.
    • Fiducial Registration Error (FRE) should only be used to evaluate the rigidity of a point set. That is, a small FRE confirms that the point configuration has not deformed, nothing more. This applet visually illustrates the fact that FRE does not predict the Target Registration Error (TRE). As a consequence you should never show the FRE numbers to a lay person as it is highly likely that they will assume that they reflect the TRE.

    Critical Reading

    • If no details are given with regard to a method used to produce the input for the presented algorithm, assume that the input was obtained manually. For example, if reading a paper describing feature based registration that does not give details with regard to the method used for feature localization, assume it was done manually.
    • Look for the magic numbers, often these make the difference between success and failure of the presented method.
    • Often, the same quantity can be computed in different ways. This can potentially influence the results as we are dealing with computations on fixed precision machines (i.e. a computer). A trivial example is computation of the mean of several values. This MATLAB script shows how different implementations exhibit different behaviors. A more interesting example is the computation of the Mutual-Information metric for image registration, one can use either a histogram based approach or a Parzen windowing based approach to compute probabilities.
    • Standard XYZ procedure - The practice of medicine is an art, often there are multiple standards (that's the beauty of standards - there are many to choose from). Thus, the name of a procedure does not provide sufficient detail about the specific setup and associated challenges. Examples illustrating this include, among others, changing patient position[1] or medication regimen [2] between pre-operative data acquisition and the intra-operative setting.

      [1] T. Rohlfing, C. R. Maurer Jr., D. Dean, R. J. Maciunas, "Effect of changing patient position from supine to prone on the accuracy of a Brown-Roberts-Wells stereotactic head frame system", Neurosurgery, 52(3):610-618, 2003.

      [2] O. El Ganaoui, X. Morandi, S. Duchesne, P. Jannin, "Preoperative brain shift: study of three surgical cases", SPIE Medical Imaging, 2008.

    Presenting

    • If using a Mac don't forget to bring an RGB adapter, and don't forget to take it when you are done with your talk.
    • You may want to hide the mess on your desktop from everyone:

      On windows, right click on your desktop. Under the view floating menu item unselect/select "Show desktop icons".

      On Mac, add the following two functions to your .bashrc file:
      function hideIcons() { defaults write com.apple.finder CreateDesktop false; killall Finder; }
      function showIcons() { defaults write com.apple.finder CreateDesktop true; killall Finder; }

      To hide/show the icons open a terminal and invoke the relevant function, 'hideIcons'/'showIcons'.

    MATLAB

    • Avoid loops. MATLAB is optimized for vector/matrix operations and is not computationally efficient when performing iterations. Replace explicit iteration over data with MATLAB's implicit/vectorized operators.
    • Use loops. If prototyping with the intent to port to another programming language (e.g. C++):
      This will result in slower MATLAB code but it facilitates the porting of your code to the intended programming language.
      Remember that MATLAB indexes are in [1..n], while in most other programming languages they are in [0,n-1].

    Useful Books

    1. Computer Graphics: "Computer Graphics Principles And Practice", Foley, van Dam, Feiner, Hughes.
    2. Computer Aided Design: "Curves And Surfaces For CAGD, A Practical Guide", Farin.
    3. Algorithms and Data Structures: "Introduction To Algorithms", Cormen, Leiserson, Rivest.
    4. Computer Vision: "Three dimensional computer vision: a geometric viewpoint", Faugeras.
    5. Computer Vision: "Multiple View Geometry in Computer Vision", Hartley, Zisserman.
    6. Computer Vision and Image Processing: "Machine Vision", Jain, Kasturi, Schunck.
    7. Machine learning: "Introduction to machine learning", Alpaydin.
    8. Machine learning: "Pattern classification", Duda, Hart, Stork.
    9. Machine Learning (Et tu, Brute?): "Deep Learning", Goodfellow, Bengio, Courville.
    10. Numerical analysis: "Numerical Analysis", Kincaid, Cheney.
    11. Linear algebra: "Introduction to Linear Algebra", Strang.
    12. Linear algebra: "Matrix Computations", Golub, Van Loan.
    13. Applied math: "Introduction to Applied Mathematics", Strang.
    14. Optimization: "Practical Methods of Optimization", Fletcher.
    15. Software Engineering: "Design Patterns Elements of Reusable Object-Oriented Software", Gamma, Helm, Johnson, Vlissides.
    16. C++ and Software Engineering: "Advanced C++ Programming Styles And Idioms", Coplien.
    17. C++: "The C++ Programming Language", Stroustrup.
    18. Java: "Thinking in Java", Eckel.
    19. Writing style: "The Elements of Style", Strunk , White.
    20. Writing: "Latex user's guide and reference manual", Lamport.