Print

Print


Dear Joerg,

I'm afraid that this is really, really tricky/fiddly stuff.
In my experience it takes a considerable amount of time and effort
to get coordinate and transformation conventions consistent between
two different sources, but here you have dicom, xmedcon, mriconvert
and nifti.  Thus this is going to be very hard indeed.  Also, it is actually
the translations that are always the hardest to work out since they are
coupled to the rotations by the centre of rotation and so they interact
will all the coordinate conventions and differences in them.

With the new FSL release coming up I'm afraid that I need to be working
on new features for FSL and won't have a chance to look at this.
Sorry I can't help at the moment.
Good luck with it.

All the best,
    Mark


Joerg Magerkurth wrote:

>Hi Mark,
>
>I trying to rotate a vmr using the dicom-cosines, but without a satisfying
>result. I used the basic documentation of dicom from the xmedcon webpage.
>During my test I found a procedure from you on this list
>(http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind05&L=FSL&D=0&I=-3&X=33245B0F82F857D1DC&Y=magerkurth%40physik.uni-frankfurt.de&P=14763)
>Please take look at my procedure, for me both are equal, except the
>translation part, but this one should be the smallest problem. Here is my
>procedure:
>
>the dicom files are converted with medcon, no rotation is additional applied:
>medcon -f <files*> -c anlz -noprefix - stacks -o <out>
>
>the resulting analyze-files are
>
>sag.*: mprage, 88 128 128, 2mm iso resolution, isocentered, sagital
>measured, HFS
>the needed dicom info is
>(0020,0032) DS[3] ImagePositionPatient: [-127] [-88] [128]
>(0020,0037) DS[6] ImageOrientationPatient: [0] [1] [0] [0] [0] [-1]
>
>rot.*: equal, but rotated about 10° in sagital and coronal view on the
>scanner (siemens trio)
>(0020,0032) DS[3] ImagePositionPatient: [-117.13334061765]
>[-68.427035244597] [147.83274793964]
>(0020,0037) DS[6] ImageOrientationPatient: [0.17624435052857]
>[0.98434644760204] [-9.43392231e-009] [-0.1683331589845] [0.03013955000799]
>[-0.9852692805074]
>
>from xmedcon:
>
>  HFS -> patient system and machine system are equal X=R->L, Y=A->P, Z=F->H
>  
>  sagital measuring -> row-vec +y, col-vec -z
>
>from http://lcni.uoregon.edu/~jolinda/MRIConvert/fileformats.htm
>   
>  the column direction is flipped before writing
>
>
>Using this informations I get the following rotating matrix:
>
>
>Y x Z     cosines Y  cosines Z  transl
>
> 0.9692   0.176       0.168     5
>-0.1734   0.984      -0.030     5
>-0.1706   0.000       0.985     10
> 0        0           0         1
>
>
>Applying this on sag doesn't lead to rot
>
>For finding my mistake, I using Nudge for rotation sag. The use angles are
>X=-10°, Y=-10°, Z=0°
>
>The received matrix looks confusing, because it's more than an exchange of
>col-vectors between the two matrices:
>
>0.984747   0.029615   0.171453  -24.2087  
>0.000000   0.985408  -0.170209   23.4698  
>-0.173992  0.167613   0.970378   -2.38755  
>0  0  0  1 
>
>Where is the mistake?
>
>This the my second post, the first was rejected, caused by a 1MB attachment.
>If you need the used files, contact me.
>
>Best regards,
>
>  Joerg
>  
>