Make FSL-compatible Transformation Matrix

Prepares .mat files to be used with FSL's registration-related functions.
798 descargas
Actualizado 19 Mar 2011

Ver licencia

MAKEFSLXFMMATRIX Make FSL-compatible transformation matrix.
M = MAKEFSLXFMMATRIX(T,R,S,FILENAME) outputs a 4x4 transformation
matrix performing the translations in T, the rotations in R and the
scalings in S and writes this matrix to the file specified by the
string FILENAME. This file is compatible with FSL's flirt and thus can
be directly used without further modification.

This function is actually the inverse function of FSL's avscale in that
avscale reads a transformation matrix file and lists the corresponding
translation, rotation and so on.

MAKEFSLXFMMATRIX can be especially useful if you would like to run
simulations.

Please note that, just as in avscale, T is in millimeters, R is in
radians and S is unitless.

Usage example:
==============
T = [1.433440 19.715600 0.786690]; % in mm.
R = [0.102735 -0.155470 0.121564]; % in rad.
S = [1 1 1]; % unitless
filename = 'thisIsWhatIWant.mat'; % :))

M = makeFslXfmMatrix(T,R,S,filename);

Now you can use avscale to see if things are working correctly.

[status,result] = system(['avscale --allparams thisIsWhatIWant.mat']);
disp(result)

Best.

Citar como

Cihat Eldeniz (2024). Make FSL-compatible Transformation Matrix (https://www.mathworks.com/matlabcentral/fileexchange/30804-make-fsl-compatible-transformation-matrix), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Modeling en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0