Is there an easy way to reorient oblique 3D DICOM images into pure axial slices and save the output as nifti file, from command line?
If there is no such an easy tool, I am aware of the transform tool in 3DSlicer, but got confused how to construct the transform matrix from the ImageOrientationPatient & ImagePositionPatient. Does slicer uses the same coordinate system as dicom so I can form the transform matrix (M) like this:
IOP = ImageOrientationPatient;
IPP = ImagePositionPatient;
vx = voxel dimenstions
M = [ IOP (1:3)*vx(1), IOP (4:6)*vx(2), cross(IOP (1:3)*vx(3), IOP (4:6)), IPP ]
or I should do further processing to fix coordinates?
Can I call this transform function from command line so I can automate processing of multiple datasets?