Computerhead Fusion Package IDL Library

FrameVolume

This function creates a coordinate frame for a specified 3D array. A coordinate frame is a 3D conformal transformation in homogeneous coordinates that maps pixel indices into locations (points) in a global frame of reference. The inverse of a coordinate frame maps global coordinates into pixel indices.

The origin of a coordinate frame is assumed to lie at the geometric centre of the array that it describes, and its 3 orthogonal basis vectors are directed along the array dimensions, and have length equal to the voxel size in the respective direction.

Syntax

Result = FrameVolume(A)

Arguments

A

A 3D array of numeric type.

Keywords

VOXEL (required)

A 3-tuple providing the x, y and z size of array voxels. The choice of units is left up to the client but for most purposes, millimeters are recommended as these correspond roughly in scale to degrees of rotation for common medical image registration tasks.

ROTATE

A 3-tuple specifying rotation of the frame about its own X axis, then its (transformed) Y axis and finally its (twice transformed) Z axis.

TRANSLATE

A 3-tuple specifying translation of the frame along the global X axis, then the Y axis and finally the Z axis.

Examples

	fixedArray = FIndGen(64, 64, 64)
	fixedFrame = FrameVolume(fixedArray,VOXEL=[3,3,3],$
		ROTATE=[90,0,0],TRANSLATE=[5,2,0])
	Print, fixedFrame

Erin McKay 2006-12-10