Data Type: Landmarks ()

Description:

This data type represents specific points or markers in 3D space. It can be used to flag markers in MRI images, or to specify pairs or n-tuples of corresponding points in multiple data sets.

An empty set of landmarks can be created by typing create HxLandmarkSet into the console window, cf. Section "Consoles Panel".

Individual landmarks can be interactively added, repositioned, or removed from a landmark set by means of the Landmark Editor.

Commands:

setNumSets <n>
Sets the number of point sets contained in this data object. Upon creation a landmark set contains one set of points. In order to represent pairs of corresponding points two sets are required.

getNumSets
Returns the number of point sets in this data object.

setPoint <index> <x> <y> <z> [<set>]
Sets the coordinates of the specified marker <index> in a particular set. If <set> is omitted the first set is used.

getPoint <index> [<set>]
Returns the coordinates of the specified marker <index> in a particular set. If <set> is omitted the first set is used.

setOrientation <index> <x> <y> <z> <rad> [<set>]
Sets the orientation of the specified marker <index> in a particular set. If <set> is omitted the first set is used. The orientation is specified by an axis plus an angle of rotation around this axis in radians.

getOrientation <index> [<set>]
Returns the orientation of the specified marker <index> in a particular set. If <set> is omitted the first set is used. The orientation is returned as an axis plus an angle of rotation around this axis in radians.

appendLandmark <x> <y> <z>
Appends a new marker to the data object. The new marker will have the same coordinates in all sets.

removeLandmark <index>
Removes the specified marker from all sets, reducing the number of points by one.

swapSets [<set1> <set2>]
Exchanges the coordinates of the specified sets. If no arguments are given the first and the second set are swapped, provided both sets exist.

computeRigidTransform [<src-set> <dst-set>]
Computes a rigid transformation which moves the points of the first set as close as possible onto the points of the second set (the sum of the squared distances between corresponding points is minimized). The result is returned as a 4x4 transformation matrix, which for example can be used to transform some other data object using the setTransform command.

computeLinearTransform [<src-set> <dst-set> <transform-type>]
Computes the linear transformation that moves the points of the first set as close as possible onto the points of the second set (the sum of the squared distances between corresponding points is minimized). The result is returned as a 4x4 transformation matrix, which, for example, can be used to transform some other data object using the setTransform command. The possible types of linear transformations, specified by <transform-type>, are: 0=rigid (default), 1=rigid+iso-scale, 2=affine.

translateCoords <x> <y> <z> [<set>]
Translate the landmarks of the specified set by the given displacement vector. If <set> is omitted the landmarks in all sets are translated.

scaleCoords [-center <x> <y> <z>] <xscale> [<yscale> <zscale>] [<set>]
Scales the coordinates of the landmarks in the specified set. If <set> is omitted the landmarks in all sets are scaled. The optional argument -center defines the center of the scaling operation. If no center is specified the origin (0,0,0) will be used.