External use of registration TRM

BrainVisa toolbox for histology, biology, 3D reconstruction of animal slices
Post Reply
User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France

External use of registration TRM

Post by Simon Toralba »

Hello

I'm actually working on the registration of ~150 histological slices, using "03. volume - intra volume propagative slice registration". I need to register other pictures with the same translation and rotation parameters, and possibly modify these parameters with a spreadsheet program.

Picking values from "sliceN+1_to_sliceN" .trm file , I tried to apply translations (mm) of a picture, then rotation (radians) from its center, it does not reproduce exactly the same displacement. I tried to apply rotation first, but it's not better.

Does someone know how can I learn about how these values are created ?

Thanks

Simon
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: External use of registration TRM

Post by riviere »

Hi,
The .trm format is used as follows:
the 1st line is the 3 translation parameters, and the 3 next lines are the 3x3 linear matrix:

Code: Select all

Tx  Ty  Tz
R11 R12 R13
R21 R22 R23
R31 R32 R33
They are used to build a completely standard 4x4 affine transformation matrix looking like this:

Code: Select all

    [ R11 R12 R13  Tx ]
M = [ R21 R22 R23  Ty ]
    [ R31 R32 R33  Tz ]
    [ 0   0   0   1   ]
You can apply this matrix to a 3D coordinates vector (in mm) extended to 4d:

Code: Select all

    [ x ]
P = [ y ]
    [ z ]
    [ 1 ]
then the transform of P is M*P
Denis
User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France

Re: External use of registration TRM

Post by Simon Toralba »

Hi,

Thank you Denis

Now I know how to make my own displacement matrix, but I have an other question :

Around wich point does the rotation operate?
Is it the center of the image ? or maybe the gravity center of the object?

AimsBlockMatching seems to be the program that calculates this rotation.
I haven't found anything in its help.
Sorry if I posted in the wrong area.

Reverently,

Simon
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: External use of registration TRM

Post by riviere »

Hi,
In its original referential, the origin is in the center of the first voxel of the image: this voxel is normally in the right, front, upper corner, but your image is not necessarily oriented like this. I know the people developing the histology toolbox do not always orient their images like we do in volumic MRI...
Then the transformation matrix rotates "around" this origin point before the translation part is applied (at least it may be seen as this). But this translation part actually moves the rotation center... But all this is a very classical use of affine transformation matrix - or I don't really get your problem...
Denis
Post Reply