MergeVolumes
This function merges two oriented volumes after modifying one of the pair using a geometric transformation of some kind described by a parameter vector supplied by the client.
Syntax
Result = MergeVolumes(FixedArray, FixedFrame, FloatArray, FloatFrame, Parameters)
Arguments
FixedArray
A 3D array of numeric type containing the reference image.
FixedFrame
A coordinate frame (see FrameVolume) defining the target geometry.
FloatArray
A 3D array of numeric type containing the floating image.
FloatFrame
A coordinate frame defining the geometry of the floating image.
Parameters
A vector describing a transformation applied to the floating image geometry. The interpretation of the vector will depend on the type of transform.
Keywords
TRANSFORM (required)
This keyword 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: identity, scaling, rotation, translation, rigid and conformal. Additional transform types, possibly including non-linear transforms, may be incorporated into the package in future.
REVERSE
If this keyword is set, the MergeVolumes routine will try to sample from the fixed array into the floating array. This will only work if the applied transform is invertible.
Examples
In the following example, the floating image is enlarged by 10% in each direction, then rotated 180 around the Z axis and finally moved down the Z axis by 50 millimeters. Then finally, the target array is sampled into the floating image (by specifying the REVERSE keyword).
Read_Interfile, 'target.hdr', fixedArray
fixedFrame = FrameVolume(fixedArray, VOXEL=[3.0, 3.0, 3.0])
Read_Interfile, 'source.hdr', floatArray
floatFrame = FrameVolume(floatArray, VOXEL=[3.0, 3.0, 3.0])
parameters = [10,10,10,0,0,180,0,0,-50]
fusedArray = MergeVolumes( $
fixedArray, fixedFrame, floatArray, floatFrame, parameters, $
TRANSFORM='Conformal', /REVERSE)