SimpleITK, ResampleImageFilter for orthogonal views of MRI data

Dear All,
i have the following question:
i have an MRI dataset and would like to compute the other two orthogonal projections of that dataset. If i understand correctly, ResampleImageFilter should do what i need. But i have a problem with parameter settings.

For instance, my dataset was taken in a sagittal view and its parameters are:

origin: (35.82217025756836, -281.53106689453125, -45.62310028076172)
size: (448, 448, 15)
spacing: (1.1160714626312, 1.1160714626312, 4.4000020027160645)
direction: (4.5691251730000336e-05, -0.0034908494453999993, -0.9999939059226608, 0.9999999989561548, 1.5929806359999996e-07, 4.569097404107829e-05, -2.0321856580351833e-10, -0.9999939069664997, 0.0034908494490346205)
pixel type: 16-bit unsigned integer
number of pixel components: 1

Now i want to get the coronal and axial views for this dataset to process them separately.
It is clear how to define the new size and new spacing for coronal and axial views, but i
do not understand how to get the correct origin and direction vectors. If i copy them from the original image (which is wrong, of course), the result is wrong as expected. But how to compute them?
Thank you!

Thank you.

Welcome to the community Tanja!

To get orthogonal views, it is best to use OrientImageFilter. It does not introduce lossy resampling step, and you don’t have to worry about spacing.

Hello TanjaIvanovska,

While SimpleITK does not have the OrientImageFilter. This ITK filter simply uses the PermuteAxesImageFilter and the FlipImageFilter to perform the desire re-orientation:

1 Like

Thank you! The combination of PermuteFilter and FlipFilter worked out as expected!!

Hi tanja,

I need a MRI dataset for a program similar to yours, could you direct me where I can get couple of sets.

Regards,
sag

TCIA has many datasets with MR modality.