This page is a stub.
- 1 Background
- 2 Output
- 3 Image types
- 4 Transform dialog box
- 5 Transform dialog box: Resample tab
- 6 Applying Transform/Resample
- 7 Hough transform
- 8 Transform to power of 2
- 9 Transform: Conformal Mapping Algorithms
- 10 Transform nonlinear
- 11 See also:
The Transformation algorithm, transforms images (volumes) by resampling the image using transformation matrix and the choice of Nearest-Neighbor, Gaussian, Bilinear, Trilinear, 3rd order B-spline, 4th order B-spline, Cubic Lagrangian, Quintic Lagrangian, Heptic Lagrangian, or Windowed sinc.
The Transform/Resample dialog box provides the user interface for transforming and (or) resampling images. It offers multiple options that help the user to define the transformation matrix and execute the transformation and (or) resampling algorithm. The user is asked to provide the output volume's desired resolutions and dimensions.
To learn more about interpolation techniques used in the method, refer to Interpolation methods used in MIPAV:
- Interpolation methods used in MIPAV#Bilinear Interpolation
- Interpolation methods used in MIPAV#Trilinear Interpolation - default
- Interpolation methods used in MIPAV#Nearest-Neighbor
- Interpolation methods used in MIPAV#Gaussian
- Interpolation methods used in MIPAV#B-spline basis interpolations
- Interpolation methods used in MIPAV#Lagrange interpolations
- Interpolation methods used in MIPAV#Windowed sinc
The transformed and (or) resampled image is displayed
All image types supported by MIPAV. See also: FAQ: Understanding Image Basics#FilesExtensions.
Transform dialog box
The dialog box has two tabs - Transform and Resample. The Transform tab allows the user to set up the transformation matrix and choose the interpolation method. The Resample tab is designed to set up the resampling interpolation.
- The Save option allows to save current settings and use them as default settings (Save default) or to save the current dialog box settings as a profile file and load it later (Save profile).
- The Load option allows to load the profile file (Load profile) to use the settings from the loaded profile or to load default settings (Load default).
- The Help menu displays the help for this dialog box.
See also: Load and save profile
The Transform tab of the dialog box allows the user to transform an image using the transformation matrix that can be either
- A matrix associated with the image,
- A matrix stored in a separate file,
- The user defined matrix, defined in this dialog box.
Transform dialog box: Transform tab
- No transformation - if selected, this option disables all transformation options, but the interpolation options are still available. Therefore, the user can not perform the transformation, but is still able to run the interpolation for a chosen image.
- Use image associated matrix - if checked, this option allows using a transformation matrix associated with the image.
- Read matrix from file - if checked, reads the transformation matrix from a file. The user should select the file where the transformation matrix is stored.
- User defined transformation matrix - if checked, makes available the transformation matrix options, which are used to design the user defined transformation matrix. In these boxes, the user can enter values for translation, rotation, scale, and skew.
User defined transformation matrix
The options available for defining a transformation matrix are as follows:
- Tx, Ty, Tz in mm - translations in the X, Y, and Z directions;
- Rx, Ry, Rz in degrees - rotations along the X, Y, and Z axis;
- Sx, Sy, Sz - scales in the X, Y, and Z directions;
- SKx, SKy, and SKz - skews in the X, Y, and Z directions.
MIPAV coordinate system and the image origin
In MIPAV, we use the right hand coordinate system.
The image origin is located in the upper left had corner on the first image slice.
Pay attention to a little diagram next to the user defined transformation matrix options.
Interpolation list box is designed to help the user to select the interpolation technique. The list of available interpolation methods includes: Bilinear, Trilinear, 3rd order B-spline, 4th order B-spline, Cubic Lagrangian, Quintic Lagrangian, Heptic Lagrangian, Nearest-Neighbor, and Windowed sinc.
- The default interpolation is Bilinear for 2D images and also for 3D or 4D images with each slice processed independently (slice processing).
- The default interpolation is Trilinear for 3D or 4D images when not using slice processing. To learn more about interpolation techniques used in the method, refer to Interpolation methods used in MIPAV.
Constant FOV - TBD.
Unrepeated Begin and End Matching - TBD.
Rotate about radio buttons should be used to specify the image rotation. If Origin is selected, the image will be rotated about the MIPAV origin which is the upper left hand corner of the image. If Center is selected, the image will be rotated about its center. If Use Scanner Center is selected, the image will be rotated about the scanner's center, this choice is available only for DICOM images.
Retain original image size - if selected, this option preserves the image size. The image will be either padded by pixels with zero intensity (black pixels) to preserve its size, or cropped.
Pad image to include entire original image - if selected, this option pads the image. While using this option the user can also specify the intensity value for padding pixels (this works for 2D images only). In order to include the entire original image, the user must select the Pad image option.
Out of bounds data - TBD.
Out of bounds intensity value - TBD.
Clip output values to input image - if checked, this option preserves the original image type. In that case, the transformed image minimum value would not decrease below the original image minimum value, and the transformed image maximum value would not increase above the original image maximum value. This check box is disabled if Nearest-Neighbor, Bilinear, or Trilinear interpolation is selected, because when using these interpolations, minimum values do not decrease and maximum values do not increase.
Process each slice independently (2.5D) - if checked, this option allows transforming each image slice separately. This works for 3D and 4D images.
Update origin - if checked (default), this option updates the image origin according to the new image size and resolution. The algorithm translates the image origin from image space to scanner space. First the image origin (0,0,0) is translated from scanner space to image space. Then the resolution is applied and the original image origin is subtracted. Note: the (0, 0, 0) point is the upper left corner of the scanner space's image. By default, this option is activated.
Transform VOIs - if checked, the transformation is applied to both the image and to all VOI(s). The algorithm transforms and resamples 2D and 3D VOI(s) using Nearest-Neighbor interpolation. For each VOI in VOIVector, the algorithm 1) exports a VOI as a mask image, 2) transforms the mask, 3)extract VOI contours from mask image and put in new image.
Invert matrix - if checked, this option inverts the transformation matrix, first, and then applies the transformation with the inverted matrix. This option can only be activated if one of the following transformation options is selected: Use Image's Associated Matrix or Read Matrix from File.
Two examples of using the Retain original image size option for 2D images: with padding (b) and with cropping (c). An example of using the Pad image option to include entire original image option is (d).
(a) - the original 2D image,
(b) - the image scaled to 0.5 in X direction,
(c) - the image scaled to 2 in X direction,
(d) - the image scaled to 0.5 in X direction and padded with pixels with intensities equal to 140.
Transform dialog box: Resample tab
The Resample tab of the dialog box allows the user to resample images:
- To the size of a specified image;
- To the user defined size;
- By the user defined factor.
New pixel values are computed using a weighted combination of existing pixel values within a defined neighborhood of the new pixel location. The interpolation methods used in this implementation of the resampling technique include all available via the Transform tab. If the user did not change the interpolation method in the Transform tab, Trilinear (or Bilinear for 2D images and for 3D and 4D with independent slice processing) interpolation is used.
See also: Interpolation methods used in MIPAV
Use the Resample to size of drop-box to select the image which would be used to resample the current image (in terms of resolution, dimensions, and units of measurement).
- Set output dim from selected image dim - sets X and Y dimensions for an output image from X and Y dimensions of the selected image;
- Set output dim to preserve input (dim-1)*resolution - TBD.
User defined size options allow the user to specify both the resolution and dimension to which the image should be resampled.
- Set dim and resolution independently - TBD.
- Set both dim and resolution at the same time to preserve (dim-1)*resolution - TBD.
- Preserve field of view - if this option is activated, the algorithm preserves the image's FOV while resampling the image.
- Lock XY aspect ratio allows the user to preserve the XY aspect ratio.
- Lock XYZ aspect ratio allows the user to preserve the ratio between Z and the XY plane for 3D and 4D images not using independent slice processing.
- ResX, ResY, ResZ text boxes are used to specify the new image resolution in each direction.
- DimX, DimY, DimZ text boxes are used to specify the new image size in each direction.
The Resample by factor slider is used to choose the resampling factor. The slider allows selecting factor values from 0.25 to 4.0.
See also: To resample the image
To transform the image
- Open the image.
- Call Algorithms>Transformation tools > Transform.
- In the Transform/Resample dialog box, open the Transform tab and do the following:
- To specify a transformation matrix, select one of the following options: No Transformation, Use image associated matrix, Read matrix from File, or use User defined transformation matrix.
- Select the interpolation method that will be used to create a transformed image.
- Specify the image origin.
- Specify whether to preserve the image size or not.
- Specify whether to clip the output image if the intensity values are outside the original image range.
- Indicate if you wish to apply the transformation to all image's VOI(s) in addition to the image.
- Specify other options if needed.
- Click OK. The transformation algorithm begins to run, and a progress bar appears momentarily with the status. When the algorithm finishes running, the progress bar disappears, and the result appears in a separate image window.
See also: Transformation Options
To resample the image
- Open an image of interest.
- Call Algorithms>Transformation tools >Transform.
- In the Transform tab, specify the interpolation method that will be used to create a resampled image. See also: Transformation Options.
- In the Transform/Resample dialog box, navigate to the Resample tab.
- Use the Resample tab options to specify the size of the new resampled image. You can choose to resample the original image to the size of some other image, or you can choose to specify the new image size, or you can use the Resample Factor slider.
- When selecting the user defined size, you might also choose to preserve a field of view. You can lock the XY aspect ratio for 2D images and for 3D and 4D images using independent slice processing. You can lock the XYZ aspect ratio for 3D and 4D images not using independent slice processing.
- Press OK. The algorithm begins to run. When the resampling algorithm finishes running, the result image appears in a new image frame.
See also: Resample tab options
The Hough transform is a technique which is used to determine and isolate features of a particular shape within an image. The classical Hough transform requires that the desired shapes be specified in some parametric form. It is most commonly used for the detection of simple curves such as lines, circles, and ellipses within a given image. Read more: Hough Transform
Transform to power of 2
By default, this algorithm will use Bilinear interpolation for 2D images and Trilinear Interpolation for 3D images to resample the original image to dimensions that are powers of 2. Optionally, the user can select another type of interpolation that will be used in the algorithm. Read more: Transform to power of 2
Transform: Conformal Mapping Algorithms
A conformal mapping, is a transformation w=f(z) that preserves local angles. An analytic function is conformal at any point where it has a nonzero first derivative. A complex function is analytic on a region R if it is complex differentiable at every point in R. In a conformal mapping, in any small neighborhood the relative angle and shape are preserved. Read more: Transform: Conformal Mapping Algorithms