| im3dtran | images.imgeom | im3dtran |
im3dtran -- Transpose a 3D image
im3dtran input output
IM3DTRAN transposes the input images input in 3 dimensions and writes the transposed images to output . The 6 possible axis mappings are specified by setting the parameters new_x , new_y , and new_z .
IM3DTRAN can be used to rotate a datacube 90 degrees in any direction by combining the transpose operation with an axis flip. For example, Consider a datacube is visualized with its origin at the lower left front when seen by the viewer, with its abscissa being the x axis, its ordinate the y axis, and its depth the z axis, with z increasing away from the viewer or into the datacube [this is a left-handed coordinate system]. To rotate the datacube by 90 degrees clockwise about the y axis when viewed from the +y direction; the old z axis must become the new x axis, and the old x axis must become the new z axis, while the new y axis remains old y axis. In this case the axis that must be flipped prior to transposition is the x axis as shown in example 2.
The parameter len_blk controls how much memory is used during the transpose operation. len_blk elements are used in each axis at a time, or a cube len_blk elements on a side. If len_blk is too large, the task will abort with an "out of memory" error. If it is too small, the task can take a very long time to run. The maximum size of len_blk depends on how much memory is available at the time IM3DTRAN is run, and the size and datatype of the image to be transposed.
1. Transpose axes 1 2 and 3 of a list of input images to axes 2 1 and 3 of a list of output images.
cl> im3dtran image1,image2,image3 tr1,tr2,tr3 2 1 3
2. For an input datacube with columns = x = abscissa, lines = y = ordinate, and bands = z = depth increasing away from viewer, and with the image origin at the lower left front, rotate datacube 90 degrees clockwise around the y axis when viewed from +y (top):
cl> im3dtran input[-*,*,*] output 3 2 1
imtranspose, imjoin, imstack, imslice