Overview
This application reads an image volume using LONIImageIO and a surface that is create from the
image volume, and creates output surface whose vertex attribute is data value of the original voxel associated to each vertex.
Command Line Usage
The command line follows this pattern: "java {optional java arguments} -jar {optional command line arguments} shape_input_file image_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 ColorSurface.jar shape_input_file image_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 | Type | Required | Description | Notes |
| -examples | flag | No | Prints examples of common usage. | |
| -shape | File | Yes | Specify shape file name. | |
| -image | File | Yes | Specify image file name. | |
| -air | File | No | Specify air file name. | |
| -output | File | Yes | Specify output file name. | |
| -nearest | flag | No | Choose NearestNeighbor as a type of interpolation. | |
| -trilinear | flag | No | Choose tri linear interpolation. | |
| -hotmetal | flag | No | Apply hotmetal color map to output attribute value. | |
| -hot | flag | No | Apply hot color map to output attribute value. | |
| -gray | flag | No | Apply gray color map to output attribute value. | |
| -spectral | flag | No | Apply spectral color map to output attribute value. | |
| -blue | flag | No | Apply blue color map to output attribute value. | |
| -green | flag | No | Apply green color map to output attribute value. | |
| -red | flag | No | Apply red color map to output attribute value. | |
| -bone | flag | No | Apply bone color map to output attribute value. | |
| -cool | flag | No | Apply cool color map to output attribute value. | |
| -copper | flag | No | Apply copper color map to output attribute value. | |
| -attr | String | No | Set attribute name in the output shape file. | |
| -overwrite | flag | No | Enables overwriting the output file, if it exists. | |
| -verbose | flag | No | Enables verbose statement. | |
| -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 file, as a pipeline resource. | Example: "pipeline://localhost//home/zed/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. | |
Color map reference
| Argument | Name | Description | Color Map |
| -cool | Cool Color Map | Shades of cyan and magenta color map. It varies smoothly from cyan to magenta. | |
| -blue | Blue Color Map | Only blue component of the color map changes linearly. | |
| -bone | Bone Color Map | The Bone Color map is a gray scale color map with a higher value for the blue component. This color map is useful for adding an "electronic" look to gray scale images. | |
| -copper | Copper Color Map | This is predefined Copper color map which is linear copper-tone color map. It varies smoothly from black to bright copper. | |
| -green | Green Color Map | Only green component of the color map changes linearly. | |
| -hotmetal | Hotmetal Color Map | Only blue component of the color map changes linearly. | |
| -red | Red Color Map | Only red component of the color map changes linearly. | |
| -spectral | Spectral Color Map | Map image into the spectral color "rainbow" blue-to-red scheme. | |
| -gray | Gray Color Map | A linear gray-scale color map. | |
Examples of common usage
In these examples we assume that the ColorSurface application is saved in a file
named ColorSurface.jar.
java -jar !ColorSurface.jar -shape data/10102_n3_L.obj -image data/10102_n3.mnc
-output output/out_10102.obj
Read shape from 10102_n3_L.obj and read image from 10102_n3.mnc. Construct affine
transformation which maps world coordiante to data value in the image.
For each coordinate, find data value cooresponding using the map constructed.
Write output to out_10102.obj whose shape structure will be the same
10102_n3_l.obj and whose 4d attribute:
MincShapeConversions.VERTEX_RGBA_COLOR_ATTRIBUTE_NAME will stores data value
evalueated above. If you want these data value are mapped by one of color map,
simply add one one color map command. For example, if gray scale color map should
be used, then do following:
java -jar !ColorSurface.jar -gray -shape data/10102_n3_L.obj -image data/10102_n3.mnc
-output output/out_10102.obj
Detailed Description of the program
- No input files
- if both input files (image and shape files) are not provided the application will exit.
- No output file
- if output file is 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 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.
- Not recognized image
- if image is not recognized by LONI Image IO, the application will exit.
System requirements
- Platform - Platform independent
- Operating System - Any OS that has Java 1.5 or greater.
Restrictions, Exclusions, Limitations
- Only analyze and minc image volumes will be supported.
Acknowledgements
This program is a product of the CCB
Shape Tools program.