Skip to content.
CCB > CCBSIGS > ShapeToolLibraryProgram > ShapeToDX > ShapeToDXUserGuide1x0

CCB ShapeToDX

ShapeToDX is an application program that translates all shape file format that can be read by the CCB ShapeTools library into an OpenDX general format data file.

This is useful because it allows any of the supported shape formats to be read, displayed, and analyzed by the powerful visualization tool OpenDX.

This program uses the CCB DXJava library.

Supported Shape Formats

As of this version (1.0) the following shape data file formats are supported:

  • Loni UCF - Laboratory of Neuro-Imaging Universal Contour files.
  • Loni TM - Laboratory of Neuro-Imaging Triangle Model files.
  • Minc OBJ - Montreal Neurology Institute Object files (binary and ascii).
  • Geomview OFF - GeomView project OFF files.

ShapeToDx Usage

The program translates an input file into an output file, both of which must be explicitly named by the user of the program.

The general usage syntax of the program is

java -jar program.jar [options] input_file output_file

An example of using ShapeToDX to translate a file named 'foo.ucf' into a file named 'foo.dx' would be:

java -jar ShapeToDX.jar foo.ucf foo.dx

ShapeToDX accepts a few command line arguments which slightly modify the behavior of the program. These are:

Argument Description
-verbose Enables verbose status messages.
-version Display program version.
-o Enables overwriting of extant output file.
-help Displays usage help.

Program Details

This program is essentially a wrapper to the ShapeTools ShapeToDX translator class. This class implements a simple, but complete, translation of all data found in a shape file that was read by the ShapeTools library.

All data in the original file are translated into components of a single DX Field. The vertices of the shape are placed in the Field "data" component; regular connections between face vertices are saved as a "connections" component.

All other elements of the input file are saved as components of the DX field. The names of these components are derived from the attribute Id assigned the element by the ShapeTools shapeio reader used to read the file into a Shape.

DX Field components often contain explicity listed dependencies; elments of the original data file are considered "dependent" upon the vertices or faces with with they are originally associated.

Thus, a data value measured at each point of a vertex will be considered (in the output OpenDX file) to "depend" upon the DX "points" component.

Restrictions

Only regular faces (e.g. all faces have the same number of vertices) are supported.

Revised: 10 May 2006