Overview of Geometric Transformations

Geometric image transformation functions use mathematical transformations to crop, pad, scale, rotate, transpose or otherwise alter an image array to produce a modified view of an image. The transformations described in this chapter are linear transformations. For a description of non-linear geometric transformations, see Warping Images.

When an image undergoes a geometric transformation, some or all of the pixels within the source image are relocated from their original spatial coordinates to a new position in the output image. When a relocated pixel does not map directly onto the center of a pixel location, but falls somewhere in between the centers of pixel locations, the pixel's value is computed by sampling the values of the neighboring pixels. This resampling, also known as interpolation, affects the quality of the output image. See Interpolation Methods (Using IDL) for more information.

Note
In this book, Direct Graphics examples are provided by default. Object Graphics examples are provided in cases where significantly different methods are required.

The following list introduces image processing tasks and associated IDL image processing routines covered in this chapter.

Table 2-1: Image Processing Tasks and Related Image Processing Routines 

Task
Routine(s)
Description

Cropping Images.

SIZE

CURSOR

Focuses attention on important image features by creating a rectangular region of interest.

Padding Images.

SIZE

Creates a border around the perimeter of an image for presentation or advanced filtering purposes.

Resizing Images.

CONGRID

REBIN

Enlarges or shrinks an image.

Shifting Images.

SHIFT

Shifts image pixel values along any image dimension.

Reversing Images.

REVERSE

Reverses array elements to flip an image horizontally or vertically.

Transposing Images.

TRANSPOSE

Interchanges array dimensions, reflecting the image about a 45 degree line.

Rotating Images.

ROTATE

ROT

Rotates an image to any orientation, using 90 degree or arbitrary increments.

Planar Slicing of Volumetric Data.

EXTRACT_SLICE

SLICER3

XVOLUME

Displays a single slice or a series of planar slices in a single window or interactively extracts planar slices of volumetric data.

Note
This chapter uses data files from the IDL examples/data directory. Two files, data.txt and index.txt, contain descriptions of the files, including array sizes.