BUGS · SEE_ALSO
im3dtran -- Transpose a 3D image
im3dtran input output
- The input 3d image.
- The output transposed 3D image. If the output image name is the same as the input image name then the original image will be overwritten. The number of output images must equal the number of input images.
- new_x = 3
- The new x axis. The default (3) replaces new x with old z.
- new_y = 2
- The new y axis = old axis. The default (2) does not change the y axis.
- new_z = 1
- The new z axis. The default (1) replaces new z with old x.
- len_blk = 128
- The size in pixels of the linear internal subraster. Im3dtran will try to transpose a subraster up to len_blk cubed at one time. Runtime is much faster with larger len_blk , but the task may run out of memory.
- verbose = yes
- Print messages about actions taken by the task.
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