AlignVolumes
This procedure co-registers two oriented volumes by iteratively updating a user-supplied transformation until a user-supplied cost function, representing the difference between the two volumes, is minimised.
Syntax
AlignVolumes, FixedArray, FixedFrame, FloatArray, FloatFrame, Parameters
Arguments
FixedArray
A 3D array of byte type containing the reference image.
FixedFrame
A coordinate frame (see FrameVolume) defining the target geometry.
FloatArray
A 3D array of byte type containing the floating image.
FloatFrame
A coordinate frame defining the initial geometry of the floating image.
Parameters
A vector describing the current state of the transformation applied to the floating image geometry. On entry, this vector should be set to an initial guess at the transform parameters. On exit, it will contain the set of transformation parameters than minimises (in a local sense) the differences between the floating and reference images.
Keywords
The keywords understood by this procedure are listed below. Any additional keyword parameters that are provided will be passed along to the optimisation routine. For example, the Amoeba optimiser requires a SCALE parameter: this can be specified in the argument list of AlignVolumes (see the example below).
TRANSFORM (required)
Must be set to the name of the transform to be applied to the floating volume. The package currently supports the following linear transform types: Scaling, Rotation, Translation, Rigid and Conformal. Additional transform types, possibly including non-linear transforms, may be incorporated into the package in future.
OPTIMISER
May be used to specify an optimisation routine to use. Currently available optimisers are: Amoeba and Powell. If no optimiser is specified, the Amoeba optimiser will be used.
COMPARATOR
May be used to specify a similarity measure, or cost function. Currently, the only cost functions included with the package are: MutualInformation and SumAbsoluteDifference. If no comparator is specified,then the MutualInformation comparator will be used by default.
LOGFILE
Should be set to the logical unit number of an output channel. Specifying LOGFILE=-1 directs output to the console. Specifying LOGFILE=0 (the default) suppresses logging output.
Examples
Read_Interfile, 'target.img', fixedArray
fixedFrame = FrameVolume(fixedArray, VOXEL=[3.0, 3.0, 3.0])
Read_Interfile, 'source.img', floatArray
floatFrame = FrameVolume(floatArray, VOXEL=[3.0, 3.0, 3.0])
parameters = [0,0,0,0,0,0]
AlignVolumes, $
BytScl(fixedArray, MIN=0), fixedFrame, $
BytScl(floatArray, MIN=0), floatFrame, $
parameters, TRANSFORM='Rigid', $
OPTIMISER='Amoeba', COMPARATOR='SumAbsoluteDifference', $
LOGFILE=-1, SCALE=10.0
Print, parameters
See Also
FrameVolume,
MergeVolumes.