|
|
< < |
Medial Distance Calc Users's Guide
|
> > |
Medial Distance Users's Guide
|
|
TOC: No TOC in "CCB.MedialDistanceUserGuide1x0"
|
|
"Out of Memory"
|
< < |
then you will probably want to add the memory argument. To increase the amount of JVM memory, pass an argument to Your java an argument:
|
> > |
then you will probably want to add the memory argument. To increase the amount of JVM memory, pass an argument to your java virtual machine an argument:
|
|
java -Xmx512M -jar ShapeCurvature.jar input_file output_file
|
|
Command line arguments
|
< < |
The program is controlled by use of command line arguments. The complete table of command line arguments follows. The "Default" values listed are the values used by the program if the corrosponding command line argument is not specified.
|
> > |
The program is controlled by use of command line arguments. The complete table of command line arguments follows. The "Default" values listed are the values used by the program if the corresponding command line argument is not specified.
|
|
Not all arguments need be specified by a user; generally, an argument is used only to override an
unwanted default behavior of the program.
|
|
- Print a usage summary to the console output.
Ex 2) java -jar MedialDistance.jar -attrName dist DistanceContour.ucf output.ucf
|
< < |
- 1. Read input file from DistanceContour.ucf. The application will calculate the diatance between a vertex
|
> > |
- 1. Read input file from DistanceContour.ucf. The application will calculate the distance between a vertex
|
|
and the center of mass of the contour containing that vertex.
- 2. This distance will be written as per-vertex attributes to output file and, the attribute will be named
'dist' as given.
|
< < |
- 3. Distance calcualtion method is Euclidean as defualt.
|
> > |
- 3. Distance calculation method is Euclidean (the default).
|
|
- 4. The output file name is output.ucf as provided, and output file type will the same as the input file
|
< < |
type since none is provided.
|
> > |
type since no alternate output file type is provided.
|
|
Ex 3) java -jar MedialDistance.jar -verbose -taxicab -dx DistanceContour.ucf output.dx
- 1. Read input file from DistanceContour.ucf. The application will calculate the diatance between a vertex
|
|
- 2. Distances will be calculated with the 'taxicab' distance metric.
- 3. These distance will be written as per-vertex attributes to output file in a file attribute named 'distance'.
- 4. The output file is an OpenDX file named "output.dx".
|
< < |
- 5. The "-vebose" command line flag will cause details of the program's status to be written to the console output.
|
> > |
- 5. The "-verbose" command line flag will cause details of the program's status to be written to the console output.
|
|
Detailed Description of the program
|
|
Assumes that contour shapes use an IContourEdgeSet (except for UCF, which are handled as a special case)
|
< < |
Acknowledgements
|
> > |
Acknowledgments
|
|
This program is a product of the CCB Shape Tools program.
|
|
Medial Distance Calc Users's Guide
|
|
This application computes and stores the distance between the vertices of a shape, defined as a group of contours,
and a line passing through the centers of each of the contours.
|
> > |
Supported File Formats
Output files must support per-vertex data attributes; The current version (1.0.0) writes the following data formats:
|
|
Command Line Usage
The command line follows this pattern: "java {optional java arguments} -jar {optional command line arguments} input_file output_file". The "optional command line arguments" are described by the table in the next section, and
by the illustrative examples that follow. The "optional java arguments' control the behavior of the Java virtual
|
|
|
< < |
| Argument | Default | Description | Notes |
| -help | flag | Prints help and usage information. | |
| -examples | flag | Prints examples of common usage. | |
| -version | flag | Prints version number of this application. | |
| -verbose | flag | Enables detailed status messages. | |
| -license | flag | Prints license details, and exits. | |
| -euclidean | flag | Uses Euclidean distances. | Euclidean distances are used if no metric is selected. |
| -taxicab | flag | Uses Taxicab distances. | |
| -dx | flag | Write output as a dx file. | |
| -ucf | flag | Write output as a Ucf file. | |
| -attribute | String | Names the output file attribute in which distances are saved. | If unspecified the attribute will be named distance |
| -fromcenter | flag | Calculate all distances from the center of the entire shape. | |
| -frompoint | Float | Calculate all distances from the 3d point following this argument. | Example: -frompoint 1.0 1.5 2.3 |
| -fromcore | flag | Calculate all distances from medial core of the shape. | |
| | File | An input file path. | |
| | File | An output file path. | |
| -pipeline | flag | Write pipeline descriptor file to output and exit. | |
| -twiki | flag | Write TWiki command line argument table to output and exit. | |
|
> > |
| Argument | Type | Required | Description | Notes |
| -help | flag | No | Prints help and usage information. | |
| -examples | flag | No | Prints examples of common usage. | |
| -version | flag | No | Prints version number of this application. | |
| -verbose | flag | No | Enables detailed status messages. | |
| -license | flag | No | Prints license details, and exits. | |
| -euclidean | flag | No | Uses Euclidean distances. | Euclidean distances are used if no metric is selected. |
| -taxicab | flag | No | Uses Taxicab distances. | |
| -dx | flag | No | Write output as a dx file. | |
| -ucf | flag | No | Write output as a Ucf file. | |
| -attribute | String | No | Names the output file attribute in which distances are saved. | If unspecified the attribute will be named distance |
| -fromcenter | flag | No | Calculate all distances from the center of the entire shape. | |
| -frompoint | Float | No | Calculate all distances from the 3d point following this argument. | Example: -frompoint 1.0 1.5 2.3 |
| -fromcore | flag | No | Calculate all distances from medial core of the shape. | |
| -writeCloneCore | File | No | Write the medial core coordinates to an output file whose structure matches the medial distance output file | |
| | File | Yes | An input file path. | |
| | File | Yes | An output file path. | |
| -pipeline | flag | No | Write pipeline descriptor file to output and exit. | |
| -twiki | flag | No | Write TWiki command line argument table to output and exit. | |
|
|
Examples of common usage
|
|
| META TOPICPARENT | MedialDistanceCalculator? |
|
< < |
Medial Distance Calc Users's Guide
|
> > |
Medial Distance Calc Users's Guide
|
|
TOC: No TOC in "CCB.MedialDistanceUserGuide1x0"
|
|
| -help | n/a | prints usage string to the console output and exits normally. | |
| -dx | input file type | Specify output file type to be dx file type. | |
| -ucf | input file type | Specify output file type to be ucf file type. | |
|
< < |
| -euclidean | euclidean | Specify distance calculation to be Euclidean. | |
| -taxicab | eculidean | Specify distance calculation to be Taxi Cap. | |
| -attrName | n/a | Indicates attribute name will follow. | Default attribute name is 'Distance' if you don't use this command. |
| -fromshapecenter | n/a | Allow to calculate distance from the center of mass of the shape. | Distances are calculated from the center of mass of each contour by default. |
|
> > |
| -euclidean | n/a | Use euclidean distance measure. | If no distance metric is specified, euclidean is used. |
| -taxicab | n/a | Use the taxicab distance measure. | |
| -attribute | n/a | Indicates attribute name will follow. | Default attribute name is 'Distance' if you don't use this command. |
| -fromcenter | n/a | Allow to calculate distance from the center of mass of the shape. | Distances are calculated from the center of mass of each contour by default. |
|
|
| -frompoint | n/a | Allow to calculate distance from from a coordinate of a point which is following this command. | Distances are calculated from the center of mass of each contour by default. |
| -verbose | false | enables detailed status messages during calculations. | |
| -examples | n/a | prints examples of common usage | |
Examples of common usage
|
< < |
In these examples we assume that the MedialDistanceCalc application is saved in a file
named MedialDistanceCalc.jar.
|
> > |
In these examples we assume that the MedialDistance application is saved in a file
named MedialDistance.jar.
|
|
|
< < |
Ex 1) java -jar MedialDistanceCalc.jar -help
|
> > |
Ex 1) java -jar MedialDistance.jar -help
|
|
- Print a usage summary to the console output.
|
< < |
Ex 2) java -jar distFunction.jar -attrName dist DistanceContour.ucf output.ucf
|
> > |
Ex 2) java -jar MedialDistance.jar -attrName dist DistanceContour.ucf output.ucf
|
|
- 1. Read input file from DistanceContour.ucf. The application will calculate the diatance between a vertex
and the center of mass of the contour containing that vertex.
- 2. This distance will be written as per-vertex attributes to output file and, the attribute will be named
|
|
- 4. The output file name is output.ucf as provided, and output file type will the same as the input file
type since none is provided.
|
< < |
Ex 3) java -jar distFunction.jar -verbose -taxicab -dx DistanceContour.ucf output.dx
|
> > |
Ex 3) java -jar MedialDistance.jar -verbose -taxicab -dx DistanceContour.ucf output.dx
|
|
- 1. Read input file from DistanceContour.ucf. The application will calculate the diatance between a vertex
and the center of mass of the contour containing that vertex.
|
< < |
- 2. Distance calculation method is Taxi Cap as specified by command, '-taxicab'.
- 3. This distance will be written as per-vertex attributes to output file and, the attribute will be named
'distance' as default.
- 4. The output file name is output.dx as provided, and output file type will be dx file type.
- 5. Since '-verbose' command is used, detailed program running status will be displayed
|
> > |
- 2. Distances will be calculated with the 'taxicab' distance metric.
- 3. These distance will be written as per-vertex attributes to output file in a file attribute named 'distance'.
- 4. The output file is an OpenDX file named "output.dx".
- 5. The "-vebose" command line flag will cause details of the program's status to be written to the console output.
|
|
Detailed Description of the program
|
|
- Not appropriate output file
- if it is not possible to write the output file then the application will exit.
- Not appropriate shape
- if shape has no face set or the face set has no faces the application will exit.
|
< < |
|
> > |
Data formats supported
|
|
|
< < |
First of all, any mesh files supported by the ShapeTools library may be read by this program, however, it is possible that a valid file may not contain contours. If the input file does not contain contours, the program will exit. Next, the applicaiton will verify that the output file format supports per-vertex attributes. If not, the program will print an error message, and will show the command line arguments that will enable the user to choose a valid output file format.
|
> > |
Any mesh files supported by the ShapeTools library may be read by this program, however, it is possible that a valid file may not contain contours. If the input file does not contain contours, the program will exit. Next, the applicaiton will verify that the output file format supports per-vertex attributes. If not, the program will print an error message, and will show the command line arguments that will enable the user to choose a valid output file format.
|
|
The following input formats are currently supported (February 28, 2007)
|
< < |
|
> > |
|
|
| Ucf | Loni Universal Contour Format files. | Not a mesh format, however, adjacent polyline contours with equal numbers of vertices may be interpreted as a square grid mesh. |
| Minc Line OBJ | n/a | Since this file type does not allow arbitrary data values at mesh vertices, you must use either '-dx' or '-ucf' command argument in order to have attribute saved. |
|
|
|
< < |
Algorithem
|
> > |
Algorithm
|
|
- a. For each contour in the grid, obtain vertices consisting of that contour.
|
< < |
- b. Calculate center of mass of the contour. Center of mass is calcualted by (X1 + X2 +...+ Xn)/n
|
> > |
- b. Calculate center of mass of the contour. The center of mass is calculated taking the average of the coordinates of that contour's vertices.
|
|
- c. Calculate the diatance between a vertex and the center of mass of the contour containing that vertex.
|
> > |
Note: if either of the -fromcenter or -frompoint arguments are used this point is used to compute the distances.
|
|
System requirements
- Platform - Platform independent
- Operating System - Any OS that has Java 1.5 or greater.
|
|
| META TOPICPARENT | MedialDistanceCalculator? |
Medial Distance Calc Users's Guide
|
> > |
Overview
This application computes and stores the distance between the vertices of a shape, defined as a group of contours,
and a line passing through the centers of each of the contours.
Command Line Usage
The command line follows this pattern: "java {optional java arguments} -jar {optional command line arguments} input_file output_file". The "optional command line arguments" are described by the table in the next section, and
by the illustrative examples that follow. The "optional java arguments' control the behavior of the Java virtual
machine used to run the application and, with one exception, are seldom used. That exception is the memory
allocation argument, -Xmx{number}, which asks your computer's operating system to give more memory to the Java
virtual machine that it ordinarily gets. This is used when the data to be manipulated exceed the amount of memory.
If you run the program and see an error with text resembling
"Out of Memory"
then you will probably want to add the memory argument. To increase the amount of JVM memory, pass an argument to Your java an argument:
java -Xmx512M -jar ShapeCurvature.jar input_file output_file
this sets the ammount of memory to 512MB. Note: the -Xmx512M is the argument that requests additional memory.
Command line arguments
The program is controlled by use of command line arguments. The complete table of command line arguments follows. The "Default" values listed are the values used by the program if the corrosponding command line argument is not specified.
Not all arguments need be specified by a user; generally, an argument is used only to override an
unwanted default behavior of the program.
| Argument | Default | Description | Notes |
| -version | n/a | prints a version string to the console output and exits normally. | |
| -help | n/a | prints usage string to the console output and exits normally. | |
| -dx | input file type | Specify output file type to be dx file type. | |
| -ucf | input file type | Specify output file type to be ucf file type. | |
| -euclidean | euclidean | Specify distance calculation to be Euclidean. | |
| -taxicab | eculidean | Specify distance calculation to be Taxi Cap. | |
| -attrName | n/a | Indicates attribute name will follow. | Default attribute name is 'Distance' if you don't use this command. |
| -verbose | false | enables detailed status messages during calculations. | |
| -examples | n/a | prints examples of common usage | |
Examples of common usage
In these examples we assume that the MedialDistanceCalc application is saved in a file
named MedialDistanceCalc.jar.
Ex 1) java -jar MedialDistanceCalc.jar -help
- Print a usage summary to the console output.
Ex 2) java -jar distFunction.jar -attrName dist DistanceContour.ucf output.ucf
- 1. Read input file from DistanceContour.ucf. The application will calculate the diatance between a vertex
and the center of mass of the contour containing that vertex.
- 2. This distance will be written as per-vertex attributes to output file and, the attribute will be named
'dist' as given.
- 3. Distance calcualtion method is Euclidean as defualt.
- 4. The output file name is output.ucf as provided, and output file type will the same as the input file
type since none is provided.
Ex 3) java -jar distFunction.jar -verbose -taxicab -dx DistanceContour.ucf output.dx
- 1. Read input file from DistanceContour.ucf. The application will calculate the diatance between a vertex
and the center of mass of the contour containing that vertex.
- 2. Distance calculation method is Taxi Cap as specified by command, '-taxicab'.
- 3. This distance will be written as per-vertex attributes to output file and, the attribute will be named
'distance' as default.
- 4. The output file name is output.dx as provided, and output file type will be dx file type.
- 5. Since '-verbose' command is used, detailed program running status will be displayed
Detailed Description of the program
- No input or output file
- if both input file and output file are not provided the application will exit.
- Not appropriate input file
- if input file doesn't exist, or cannot be read the application wlll exit.
- Not appropriate input file
- if input file doesn't contain contour, the application wlll exit.
- Not appropriate output file
- if it is not possible to write the output file then the application will exit.
- Not appropriate shape
- if shape has no face set or the face set has no faces the application will exit.
First of all, any mesh files supported by the ShapeTools library may be read by this program, however, it is possible that a valid file may not contain contours. If the input file does not contain contours, the program will exit. Next, the applicaiton will verify that the output file format supports per-vertex attributes. If not, the program will print an error message, and will show the command line arguments that will enable the user to choose a valid output file format.
The following input formats are currently supported (February 28, 2007)
| Abbreviated Name | Descripoint | Notes |
| Ucf | Loni Universal Contour Format files. | Not a mesh format, however, adjacent polyline contours with equal numbers of vertices may be interpreted as a square grid mesh. |
| Minc Line OBJ | n/a | Since this file type does not allow arbitrary data values at mesh vertices, you must use either '-dx' or '-ucf' command argument in order to have attribute saved. |
The following output formats are currently supported (February 28, 2007)
| Abbreviated Name | Description | Notes |
| UCF | Laboratory of Neuro-Imaging (LONI) Universal Contour Files (UCF's). | There will be only one contour in the file that represents the path between two vertices. The point starts from the sink vertex and end at the source vertex. |
| Dx | OpenDX general format data files (using "positions" and "connections" to define the mesh). | supports arbitrary data components at all mesh vertices |
System requirements
- Platform - Platform independent
- Operating System - Any OS that has Java 1.5 or greater.
Restrictions, Exclusions, Limitations
Assumes that contour shapes use an IContourEdgeSet (except for UCF, which are handled as a special case)
Acknowledgements
This program is a product of the CCB Shape Tools program.
|