Accessing 2D planes of a 3D matrix in OpenCV
===

I have a 3D matrix of dimensions 25 (rows) x 320 (cols) x 235 (channels)

For each of the 25 rows, I want to extract the 2D slice (320 x 235) so that I have 25 2D matrices. 

I am not sure how to do this in OpenCV. 

I thought of transposing the 3D matrix so that I have 320 (rows) x 235 (cols) x 25 (channels) and then using split to get 25 matrices, but the transpose doesn't seem to work (MATLAB doesn't even allow transpose on multidimensional arrays) 

I then tried reshape to no avail. 

Is it possible to use NAryMatIterator? Or if there is any other way to carry out this process? 