The Transform tab contains commands that allow users to manipulate the orientation, position and resolution of the images. The Transform commands alter the image data and allows the user to save the transformed images (unlike the View commands that only alter the way the images are displayed).
Acts on all layers (image and ROI, visible and invisible). Opens a dialog (Rotate Volume, Fig. 18.1). Creates a new document labeled as the original with _rotated_n suffix (n – integer). Transforms the source image by applying rotation and scaling.
Rotations are specified by entering angles of rotation, in degrees, about X, Y, and Z axes into the boxes labeled X-angle (deg), Y-angle (deg), Z-angle (deg).
Resampling is specified by Scale, a numerical coefficient between 0.01 and 100. The transformed image is resampled to isotropic resolution so that Scale = Smallest original voxel dimension / Transformed voxel dimension.
Therefore, Scale > 1 corresponds to upsampling (increasing resolution) and Scale < 1 – to downsampling (decreasing resolution).
The Interpolation dropdown menu allows the user to select among Nearest neighbor, Tri-linear, Wsinc2, Wsinc 3, Wsinc 4 interpolation methods.
If Scale <1 (the image is downscaled), the user may select the downscale method. Gaussian downscale checkbox selects downsampling by Gaussian blur plus thresholding, with user-specified Binary Threshold in percent (50% by default). If the box is unchecked, regular downsampling is used with fixed 50% threshold.
Checking the box Preserve original FOV and resolution suppresses resampling and retains only rotation. The transformed image will have the same field of view (FOV) and voxel size as the original, regardless of Scale.
Acts on all layers. Creates a new document labeled as the original document with a suffix _RotOrtho_n (n-integer). Opens a dialog panel (Rotate Volume Orthogonally around Volume Center, Fig. 18.2).
Performs orthogonal rotations around 1st, 2nd, and 3rd rotation axes.
The drop-down menus labeled 1st, 2nd and 3rd Rotation Axis are used to select X, Y, Z, None axes of rotation. The buttons -90< and >90 deg are used to indicate the direction of rotation (rotate by minus or plus 90 degrees about a given axis).
The bottom part of the panel displays the rotation matrix M in one of the two configurations: 1) Source=M*Target or 2) Target=M*Source.
Reset button clears all entries. Matrix to Clipboard copies the transformation matrix to clipboard and allows it to be pasted into a text editor or spreadsheet. Save creates a VTF file (by default in FireVoxel Temp directory) with information about this transformation.
If no landmarks are present, shows a warning message.
Acts on the active layer and all visible layers. Requires a previously saved .VTF file (see Volume Transform File). Opens a dialog panel (Fig. 18.3).
The user can select the Interpolation method (Nearest neighbor, Tri-linear, Wsinc2, Wsinc 3, Wsinc 4). If the image is downsampled (target resolution is lower than the original resolution), the user may select Gaussian downscale and the threshold value (50% by default). The user must also enter into the Transformation File text box the name of the previously created .VTF file (or click Browse to open a browse for file). Pressing OK applies the affine transformation described by the .VTF file to all visible layers. If the .VTF file does not match the dimensions of the active layer, FireVoxel shows an error message and the command is not performed.
Acts on all layers in a document. Opens dialog (Specify Resolution (mm)), to enter the voxel dimension of the transformed image. By default, the resolution is set to the smallest dimension of the original voxel. The command creates a new document and displays it in a new document window labeled with the name of the original window with iso_[number] suffix. The transformed image has isotropic resolution (cubic voxels). If the target voxel is larger than the original (i.e., target resolution is lower than the original), regular downsampling method is used (see DOWNSAMPLING). The image and the ROI layers, both visible and invisible, are transformed together.
Acts on all active layers. Does not create a new document. Reflects all visible layers with respect to the selected axis.
Acts on the active layer and all visible layers. Requires a vector object (vector – a two-point polyline) (Fig. 18.4). Does not create a new document. Shifts (translates) layer(s) by the distance and in the direction specified by a vector object. The user first uses Insert Polyline to draw a vector, a two-point vector object, connecting the origin and destination of translation, and then calls the Translate command. The active layer, along with all other visible layers, is shifted as defined by the vector. The transformation may be saved as .VTF file. To undo, use Discard Alignment.
Acts on the active layer and all visible layers. Requires a vector object, a segment –- a 3-point polyline (Fig. 18.5).
The transformation may be saved as .VTF file. Rotates layer(s) by the angle specified by the sector. The user first uses Insert Polyline to draw a sector, a vector object made of three ordered points. The line connecting the first and second points is aligned with the starting direction. The line connecting the second and third points is aligned with the destination direction. The second point is the center of rotation. After drawing and adjusting the sector, the user calls the Rotate command, and the layer(s) are rotated about the center of rotation by the sector angle in the direction from the first line to the second line (indicated by an arrow next to the sector). The transformation may be saved as .VTF file. To undo, use Discard Alignment.
Reverses all transformations performed since the last saving of the document. If several transformations were performed sequentially, all of them will be undone. The saved .VTF files from these transformations are not affected.
Open file save dialog to save the Volume Transform File (with .vtf extension) with the information about the image transformations. The file retains the information about a sequence of transformations since the last document save.
18.11.1. Volume Transform File (.vtf)¶
The Volume Transform File (.vtf) can be opened with a text editor (Fig. 18.6).
The file contains the transform type (affine), the matrix size and resolution (voxel size in mm) in X, Y, and Z direction of the source and target images, and the Transform Data (12 matrix elements of affine transformation matrix).
The affine transformations include scaling, rotations, shear, and translations and can be expressed in matrix form: x’ = A x + t, where x is the source, x’ is the target, A is the affine transformation matrix and t is the translation vector. This expression can be rewritten in terms of matrix elements (Fig. 18.7):
In VTF, the Transform Data are the 12 elements of the affine matrix (marked with the red box) listed row by row (a11, a12, a12, tx, a21…tz).
Requires an image layer. The command extracts the current slice from the active document, resamples this slice to isotropic resolution equal to the smallest dimension of the original voxel, and displays this slice in a new document labeled snapshot.