I have a 4D image of size 60 x 80 x 12 x 350, i.e. it is a 3D image where each voxel has a time series (of 350). Now I want to use mat2cell to divide the 3D image into cubes of dimension k*k*k. Each voxel in the cube...

As part of an assignment, I am supposed to write a method that uses insertion sort to sort the 3D arrays inside a 4D array based on the number of doubles inside each 3D array. I have this so far for the method, but it seems to only work if...

I'm looking to graph a 4D data set (X, Y, Z, intensity) using opacity to represent intensity. I also want the color to be dependent on the Z variable as well to better show depth. Here is the relevant code so far, I am a novice when it comes to...

I have a 4D matrix with dimensions 7x4x24x10 (Lets call it main_mat). I want to get a matrix of size 7x4x24 (rand_mat) so that each element of this (rand_mat) matrix is actually a uniformly random draw from the main matrix (main_mat). I am sorry if I have not put the...

Assuming I have a 4d numpy array like this: my_array[x,y,z,t]. Is there a simple way to load the whole array into Mayavi, and simply selecting the t I want to investigate for? I know that it is possible to animate the data, but I would like to rotate my figure...