File Exchange

image thumbnail

GetTransformMatrix

version 1.3.0.1 (1.46 KB) by Alper Yaman
This code calculates the transform matrix between two image coordinates.

5 Downloads

Updated 11 Jan 2019

View License

It first transforms to patient coordinates and then to the second coordinates. Both dicom image sets should have the same localizer while scanning.
It takes two inputs: dicominfo structures (taken by dicominfo mmand) of two image sets. The outputs are 4x4 transform matrix and 3x3 rotation matrix.
The code is developed with the help of the document written by David Atkinson (http://cmic.cs.ucl.ac.uk/fileadmin/cmic/Documents/DavidAtkinson/DICOM_6up.pdf).
This code is developed by BUMIL (Bogazici University Medical Imaging Lab) in Istanbul, Turkey.

Cite As

Alper Yaman (2019). GetTransformMatrix (https://www.mathworks.com/matlabcentral/fileexchange/24277-gettransformmatrix), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Hi, thank you for this easy yet very useful function.

One remark; the SliceThickness in the third row of Scaling should be set to SpacingBetweenSlices. If not, the scaling can be off and will result in a false M.

Zhijun Zhang

very useful function

Updates

1.3.0.1

Scaling matrix has been updated, only SpacingBetweenSlices has been used anymore.

1.3.0.0

Lab info

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor