Dear All,
This is a pretty much 101 question but I would really be grateful for any help on the same:
Let's say I want to see my structural data in all three views using MATLAB. I do the following:
image_file = spm_vol(filename);
image_file_data = spm_read_vols(image_file);
% To visualize axial slice:
imagesc(squeeze(image_file_data(:, :, slice_number)); % squeeze not really needed
% To visualize coronal slice:
imagesc(squeeze(image_file_data(:, slice_number, :));
% To visualize sagital slice:
imagesc(squeeze(image_file_data(slice_number, :, :));
To correctly view the images, I have found the following solutions:
1. Use flipud on the squeezed transposed matrix
2. Use rot90 on the squeezed matrix
3. To transpose the matrix and set the YDir property to be "normal"
My questions are:
1) is there a ubiquitous/preferred way of displaying the images correctly?