Skip to content.
CCB > CCBSIGS > ShapeToolLibraryProgram > LandmarkWarpTools > ApplyLandmarkWarpUserGuide1x0

Apply Landmark Warp User's Guide Version 1.0

Overview

This is an application for applying a warp to a set of points.

Description

The point and shape application have three required arguments. The first required argument is the filename of the warp file, and the second required argument is the filename of the point data. The point data may be specified by a line-delimited list of coordinates. The point data may also be specified by a ShapeTools-compatible shape, where the vertices are used for the point data. The dimension of the warp and the dimension of the point data must be equal. The third required argument is the output filename the warped point data, whose format will match the format of the second required argument. If this file exists, an error will occur; however, if the user adds the '-overwrite' flag, the file will always be written. For a usage page, use the '-usage' flag or no arguments. For verbose output, add the '-verbose' flag. The name and version of the application can be written with the '-version' flag. If there is an error executing the program, and you think a bug has occurred, the '-debug' flag will print more information for the bug report.

Examples

Consider homologous landmarks that are stored in the files 'reference.lm' and 'target.lm'.

First, the warp between the landmarks is computed and stored in the file 'warp.lmw':

java -jar ComputeLandmarkWarp.jar -ref reference.lm -tar target.lm -output warp.lmw

If we have novel points (points that are not at the landmarks), novelReference.lm, we can find their homologous points in the target space and write them to 'novelTarget.lm':

java -jar ApplyLandmarkWarp.jar -ascii -warp warp.lmw -input novelReference.lm -output novelTarget.lm

For three dimensional warps, we can apply a warp to a shape. Assume that we have derived a three dimensional warp, 'warp3D.lmw' from one of the compute applications. If we have a shape 'shapeReference.off' from the reference space, then we can find the homologous shape in the target space and write it to 'shapeTarget.off':

java -jar ApplyLandmarkWarp.jar -shape -warp warp3D.lmw -input shapeReference.off -output shapeTarget.off

If you would like to know more about the progress of the program, you can use the '-verbose' flag:

java -jar ApplyLandmarkWarp.jar -verbose -ascii -warp warp.lmw -input novelReference.lm -output novelTarget.lm

If you would like the program to overwrite files, use the '-overwrite' flag:

java -jar ApplyLandmarkWarp.jar -verbose -overwrite -ascii -warp warp.lmw -input novelReference.lm -output novelTarget.lm

Usage page

Usage: java -jar ApplyLandmarkWarp.jar [options] -warp warp.lmw -input inputFilename -output outputFilname

|   Argument   |  Type | REQ|              Description              |   Notes   |
|-overwrite    |flag   |No  |Enables file overwriting               |           |
|-debug        |flag   |No  |Enables additional error reporting     |           |
|-ascii        |flag   |No  |This flag is used to specify the       |           |
|              |       |    |input/output file format               |           |
|              |       |    |ASCII/PointList. The default is        |           |
|              |       |    |ShapeToolsVertices                     |           |
|-shape        |flag   |No  |This flag is used to specify the       |           |
|              |       |    |input/output file format               |           |
|              |       |    |ShapeToolsVertices. The default is     |           |
|              |       |    |ShapeToolsVertices                     |           |
|-input        |File   |Yes |Used to specify the input filename     |           |
|-warp         |File   |Yes |Used to specify the warp filename      |           |
|-output       |File   |Yes |Used to specify the output filename    |           |
|-help         |flag   |No  |Prints help and usage information.     |           |
|-version      |flag   |No  |Prints version number of this          |           |
|              |       |    |application.                           |           |
|-verbose      |flag   |No  |Enables detailed status messages.      |           |
|-license      |flag   |No  |Prints license details, and exits.     |           |
|-twiki        |flag   |No  |Writes command line arguments as a     |           |
|              |       |    |TWiki format table to output and exit. |           |
|-pipeline     |flag   |No  |Write pipeline descriptor file to      |           |
|              |       |    |output and exit.                       |           |
|-pipelineJar  |String |No  |Specify path to an application jar     |Example:   |
|              |       |    |file, as a pipeline resource.          |"pipeline: |
|              |       |    |                                       |//localhos |
|              |       |    |                                       |t//home/ze |
|              |       |    |                                       |d/Connery. |
|              |       |    |                                       |jar"       |
|-pipelineJvm  |String |No  |Specify a Java Virtual Machine called  |           |
|              |       |    |by a pipeline.                         |           |
|-pipelineJvmOptions
|              |String |No  |Specify Java Virtual Machine options   |           |
|              |       |    |used by a pipeline.                    |           |


DESCRIPTION:

This application applies a given warp to the a set of points.   By 
default, the points are the vertices of a ShapeTools-compatible shape.   
Alternatively, the points may be specified by an ASCII list of 
coordinates.   The coordinates of the points should be space delimited 
and the points should be line delimited.   The dimension of the warp 
must match the shape's dimension.   The output format will match the 
input format.