[MINC-users] DICOM to MINC
Michal Povazan
michal.povazan at meduniwien.ac.at
Tue Sep 24 06:24:14 EDT 2013
Hi all,
I would like to ask a question concerning the coordinate systems and
transformation from DICOM to MINC
We are trying to transform the DICOM patient coordinate system into MINC
world coordinates (our actual task is the creation of metabolic maps in
MINC format from 3D CSI Siemens DICOM data).
How is this transformation carried out in MINC converter (dcm2mnc), or
in other words how to transform the DICOM`s positions, sliceNormalVector
and InPlaneRotation parameters to direction cosines and start values in
MINC?
We were able to compute correct direction cosines, however, the start
values are wrong for z direction. we have used the following code as an
inspiration:
from dicom_read.c (dcm2mnc)
/for (ivolume=0; ivolume < VOL_NDIMS; ivolume++) {//
////
// if (found_coordinate && //
// found_dircos[VSLICE] && //
// found_dircos[VROW] &&//
// found_dircos[VCOLUMN]) {//
// starts[ivolume] = //
// coordinate[XCOORD] * dircos[ivolume][XCOORD] +//
// coordinate[YCOORD] * dircos[ivolume][YCOORD] +//
// coordinate[ZCOORD] * dircos[ivolume][ZCOORD];//
// }//
// else {//
// starts[ivolume] = 0.0;//
// }//
// }//
//
//
/and for the coordinates we have used (from siemens_to_dicom.c)
for (i = 0; i < WORLD_NDIMS; i++) {
coord[i] -=
pixel_spacing[0] * ((double) ncolumns - 1.0) / 2.0 * row[i] +
pixel_spacing[1] * ((double) nrows - 1.0) / 2.0 * column[i];
}
The problem is, if I understand it correctly, this piece of code compute
the coordinates just for slice and since we have 3D datasets, this can`t
work properly.
What is the correct formula for computation of start values from
position and direction cosines?
I hope my description is understandable.
thank you for any help
Michal Povazan
More information about the MINC-users
mailing list