|
A guide to surface file formats
|
|
- Vertex Attributes : true if the file format allows a data value to be associated with a particular vertex. If present, the permissible types of data vary greatly.
- Viewer : an application used to visualize a surface or contour file.
- VTK (Unstructured Grid) : one of many Visualization ToolKit geometry file formats.
|
< < |
|
> > |
- VTK (Polydata compoosed of triangle strips and surface normals : one of many Visualization ToolKit geometry file formats.
|
|
Viewer support table
|
|
|
< < |
| BrainVISA | ShapeViewer | Triangle or Quads | No | No | No | ShapeTools | none | ascii,big-endian binary, little-endian binary.may also be a single contour |
|
> > |
| BrainVISA .mesh files | ShapeViewer BrainVisa viewer | Triangle or Quads | No | No | No | ShapeTools | none | ascii,big-endian binary, little-endian binary.may also be a single contour |
|
|
FreeSurfer Triangle binary | ShapeViewer | Triangle | Yes | d/k | No | ShapeTools | | reader only. |
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | proprietary | ascii, verbose files. |
| DFS1.0 | ShapeViewer BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary (D. Shattuck) | Binary |
|
|
| TM | ShapeViewer | Triangle | No | No | No | ShapeTools | Legacy Loni | simple ascii format, Loni only |
| UCF | ShapeViewer BrainSuite | Quad | No | 1 float per vertex | No | ShapeTools | Legacy Loni | Surface by convention. |
| Ucf | ShapeViewer BrainSuite | n/a | No | 1 float per vertex | No | ShapeTools | Legacy Loni | |
|
< < |
| VTK (Unstructured Grid) | ShapeViewer | Triangle | d/k | d/k | No | ShapeTools | | reader only, trianglar mesh only |
|
> > |
| VTK (Unstructured Grid) | ShapeViewer Slicer | Triangle | d/k | d/k | No | ShapeTools | | ShapeViewer reads only Triangular Mesh |
| VTK (Polydata with vertex normals) | ShapeViewer Slicer | Triangle | d/k | Yes | No | ShapeTools | | |
|
|
Guide to selecting a file format
|
|
A guide to surface file formats
|
|
|
< < |
Application support table
|
> > |
Viewer support table
|
|
|
< < |
This section (not yet done) will list which LONI software programs will read a particular file format.
Because of the large amount of software, whose capabilities vary, this list will never be complete. It is hoped that it
will be a useful guide to answering the question: "What can I do with this file? "
|
> > |
This section lists which LONI viewer programs will read a particular file format.
|
|
|
|
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | proprietary | ascii, verbose files. |
| DFS1.0 | ShapeViewer BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary (D. Shattuck) | Binary |
| DFS2.0 | ShapeViewer BrainSuite | Triangle | Yes | 1 float per vertex, 1 short int per vertex. | Yes | ShapeTools | proprietary (D. Shattuck) | Binary |
|
< < |
| DX | ShapeViewer, DataExplorer | Triangle | Yes | Yes | | ShapeTools | OpenDX | ascii regular triangle faces only are supported by ShapeTools. format supports tensors at each vertex. |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | The off ascii format supports UV param, but these are not read by ShapeTools, supports arbitrary regular polygon faces. |
|
> > |
| DX | ShapeViewer, DataExplorer | Triangle | Yes | Yes, any number. | Yes | ShapeTools | OpenDX | ascii regular triangle faces only are supported by ShapeTools. format supports tensors at each vertex. UV param. can be modelled by 2 per-vertex variables |
| OFF | ShapeViewer | Any regular polygon | Yes | No | No | ShapeTools | | The off ascii format supports UV param, but these are not read by ShapeTools, supports arbitrary regular polygon faces. |
|
|
| Obj | ShapeViewer Display BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary | Both ascii and binary versions exist. |
| Obj(line) | ShapeViewer Display | n/a | No | No | No | ShapeTools | | ascii only |
| TM | ShapeViewer | Triangle | No | No | No | ShapeTools | Legacy Loni | simple ascii format, Loni only |
|
|
| VTK (Unstructured Grid) | ShapeViewer | Triangle | d/k | d/k | No | ShapeTools | | reader only, trianglar mesh only |
|
> > |
Guide to selecting a file format
Application developera and algorithm researchers will need to read and save their work. This requuires selection of a file format.
This decision will have considerable impact on your work. Some considerations are:
- Suitability: will the file format allow you to save the data you need ?
- Adaptibility : in the future when (not if!) your data format needs change, will the current format adapt to your changing needs, or will you have to start over with a new file format ?
- Ease of use: are there existing, debugged, maintained software tools that will easily read and write your format ?
- If you create your own file format,
- no one else will be able to share your data files.
- you will spend time and energy writing, debugging and supporting software that is not directly related to your research.
- If you use an existing format:
- You will need to learn how to use the existing readers and writers.
- You will be dependent on others to provide and maintain the file reader and writer software.
- It may not exactly match your needs. Workarounds and patches for 'short-term', intended to save time and energy, in practice, rarely do.
- Will the developers respond to your needs in a timely and useful manner ?
- file size vs. readability:
- Ascii files greatly simplify debugging algorithms, because you can directly read your data files. For very large data sets, however, they can become unwieldy. Needless verbosity in an ascii file format is therefore to be avoided.
- Binary files are more more compact, but less portable, than ascii file formats. Binary files tend to come in two incompatible variants: big-endian and little-endian. Most software at LONI does not adapt to unexpected binary file formats (ShapeTools do handle these incompatibilities; BrainSuite may -please check with the author). Binary files are unreadable to (most) humans; and are thus significantly more difficult to use when debugging software and algorithms.
- Interoperability (sharing) - most research projects rely on work done by others; thus, the capability of (at least) reading other file formats is very useful. If you read and write a format already used by other research projects you will enable use of your work by others. However limiting your file format solely to otherwise unsuitable existing formats for this reason is likely to result in significant effort devoted to working around the limitations of the file format selected.
Recommendations for new researchers
Disclaimer: the author is biased in favor of ShapeTools: ShapeTools was created , in part, precisely to address these issues
We strongly suggest new researchers consider using the ShapeTools libraries to read and write their data.
Pick tools and file formats for which :
- Written documentation is complete and available.
- An active, responsive user or developer community exists (so your question get answer quickly and knowledgably)
- The file format matches your needs
- Current source code to the tools is readily available.
If you are using Matlab: using ShapeTools is easy We suggest you do so.
If you are using Java: using ShapeTools is easy (ShapeTools are written in Java)
If you are using C/C++ : Select, if possible, non-proprietary, supported libraries to read and write your files. All CCB programs and tools are expected to share
their source code freely.
If you have not yet selected a programming language or research tool to use:
- Please consider learning Java, and using the ShapeTools to handle the 'housekeeping' taaks. LONI has considerable Java programming expertise available to support you.
- If you use Matlab - (see above). Also consider using Octave (a license free Matlab look alike) unless you need the specialized Matlab toolboxes.
- If you use C or C++, and want to try out ShapeTools : let us know. Our future plans include creation of ways to easily call ShapeTools functions from C/C++.
|
|
Notes
|
|
Using UCF file formats from C
Libraries to do so exist, but are not well publicized, leading individual developers to write their own code. At least one of the private implementations (DFS) has
|
< < |
known errors. Please contact the ShapeTools group for information on how to use the standard LONI C libaries to read and write UCF files.
|
> > |
known errors. Please contact the ShapeTools group for information on how to use the standard LONI C libraries to read and write UCF files.
|
|
a web page to document this is planned
|
|
Using DX formats from C
One LONI developer uses a C library, developed elsewhere, to do this. This library is presumed proprietary, and hence of no benefit to most LONI developers.
|
< < |
The OpenDX visualiztion tool has it's own codebase,however, the knowledge of how to easily make use of it has not been developed.
|
> > |
The OpenDX visualization tool has it's own code base,however, the knowledge of how to easily make use of it has not been developed.
|
|
Using DFS formats from C
Please contact Dr. David Shattuck for details.
|
|
A guide to surface file formats
|
|
|
< < |
| UCF | ShapeViewer BrainSuite | Quad | No | 1 float per vertex | No | ShapeTools | Legacy Loni | Surface by convention. |
| Obj | ShapeViewer Display BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary | Both ascii and binary versions exist. |
| Obj(line) | ShapeViewer Display | n/a | No | No | No | ShapeTools | | ascii only |
| Ucf | ShapeViewer BrainSuite | n/a | No | 1 float per vertex | No | ShapeTools | Legacy Loni | |
| DFS2.0 | ShapeViewer BrainSuite | Triangle | Yes | 1 float per vertex, 1 short int per vertex. | Yes | ShapeTools | proprietary (D. Shattuck) | Binary |
|
> > |
| BrainVISA | ShapeViewer | Triangle or Quads | No | No | No | ShapeTools | none | ascii,big-endian binary, little-endian binary.may also be a single contour |
FreeSurfer Triangle binary | ShapeViewer | Triangle | Yes | d/k | No | ShapeTools | | reader only. |
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | proprietary | ascii, verbose files. |
|
|
| DFS1.0 | ShapeViewer BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary (D. Shattuck) | Binary |
|
< < |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | The off ascii format supports UV param, but these are not read by ShapeTools, supports arbitrary regular polygon faces. |
|
> > |
| DFS2.0 | ShapeViewer BrainSuite | Triangle | Yes | 1 float per vertex, 1 short int per vertex. | Yes | ShapeTools | proprietary (D. Shattuck) | Binary |
|
|
| DX | ShapeViewer, DataExplorer | Triangle | Yes | Yes | | ShapeTools | OpenDX | ascii regular triangle faces only are supported by ShapeTools. format supports tensors at each vertex. |
|
< < |
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | proprietary | ascii, verbose files. |
|
> > |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | The off ascii format supports UV param, but these are not read by ShapeTools, supports arbitrary regular polygon faces. |
| Obj | ShapeViewer Display BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary | Both ascii and binary versions exist. |
| Obj(line) | ShapeViewer Display | n/a | No | No | No | ShapeTools | | ascii only |
|
|
| TM | ShapeViewer | Triangle | No | No | No | ShapeTools | Legacy Loni | simple ascii format, Loni only |
|
< < |
FreeSurfer Triangle binary | ShapeViewer | Triangle | Yes | d/k | No | ShapeTools | | reader only. |
|
> > |
| UCF | ShapeViewer BrainSuite | Quad | No | 1 float per vertex | No | ShapeTools | Legacy Loni | Surface by convention. |
| Ucf | ShapeViewer BrainSuite | n/a | No | 1 float per vertex | No | ShapeTools | Legacy Loni | |
|
|
| VTK (Unstructured Grid) | ShapeViewer | Triangle | d/k | d/k | No | ShapeTools | | reader only, trianglar mesh only |
|
|
|
< < |
A guide to surface file formats
|
> > |
A guide to surface file formats
|
|
This web page is a short guide to the major surface and contour file formats used in LONI.
|
< < |
Application support table
|
> > |
TOC: No TOC in "CCB.FileFormatSelectionGuide"
|
|
|
< < |
Definitions
|
|
|
< < |
- Viewer : an application used to visualize a surface or contour file.
- Vertex Colors : True if the file format allows specification of the color of each vertex.
- Vertex Attributes : true if the file format allows a data value to be associated with a particular vertex. If present, the permissible types of data vary greatly.
|
> > |
Definitions and Glossary
- CCBBM : a surface file format, used by certain LONI CCB projects.
- Contour : a line in three dimensional space.
- DFS : The Duff surface file format, in 2 versions. Duff is used by the BrainSuite collection of tools.
- DX : an abbreviation for DataExplorer - a general purpose file format used by the DataExplorer visualization toolkit.
|
|
- Face Colors: true if a surface face may have a color specified. This is separate from the color of a vertex.
|
< < |
- surface : a collection of polygons, embedded in three dimensional space.
- contour : a line in three dimensional space.
- UV Parameterization : a two dimensional parameterization of a set a vertices. Often used to map 3d coordinates into a 2d representation.
|
|
- Face Type - the type of polygons from which a surface is composed. Most, but not all, file formats require all polygons in surface to be the same type.
|
> > |
- OBJ: one of three varieties of the MINC Obj file formats. These represent either a set of contours, or a surface. The surface may be either an Ascii (text) file, or saved as a binary file.
- OFF: a surface file format used by the GeomView visualization tool.
- Surface : a collection of polygons, embedded in three dimensional space.
- TM (triangle model): a simple, triangulated surface file format, used by LONI
- UCF : an abbreviation of Universal Contour File, a file format that stores sets of contours (lines). Often, these are interpreted as a grid surface in a three dimensional space.
- UV Parameterization : a two dimensional parameterization of a set a vertices. Often used to map 3d coordinates into a 2d representation.
- Vertex Colors : True if the file format allows specification of the color of each vertex.
- Vertex Attributes : true if the file format allows a data value to be associated with a particular vertex. If present, the permissible types of data vary greatly.
- Viewer : an application used to visualize a surface or contour file.
- VTK (Unstructured Grid) : one of many Visualization ToolKit geometry file formats.
Application support table
This section (not yet done) will list which LONI software programs will read a particular file format.
Because of the large amount of software, whose capabilities vary, this list will never be complete. It is hoped that it
will be a useful guide to answering the question: "What can I do with this file? "
|
|
|
< < |
File format table
|
|
|
|
| VTK (Unstructured Grid) | ShapeViewer | Triangle | d/k | d/k | No | ShapeTools | | reader only, trianglar mesh only |
|
< < |
Notes
|
> > |
Notes
|
|
|
< < |
Ucf surface
|
> > |
Ucf surface
|
|
Ucf files contain a collection of lines (contours). By convention, these are often treated as the rows of a surface composed of quadrilateral faces. The n'th vertex of each ucf contour is assumed to be connected to N-1'th and N+1'th vertex in the contour, and the N'th vertex of the contours before, and after, the contour containing the vertex (first and last contour excepted). With this assumption, a UCF file defines a surface mesh whose faces are quads.
|
< < |
Using UCF file formats from C
|
> > |
Using UCF file formats from C
|
|
Libraries to do so exist, but are not well publicized, leading individual developers to write their own code. At least one of the private implementations (DFS) has
known errors. Please contact the ShapeTools group for information on how to use the standard LONI C libaries to read and write UCF files.
a web page to document this is planned
|
< < |
Using Minc formats from C
|
> > |
Using Minc formats from C
|
|
Various LONI developers have written personal Minc surface file reader and writer code; Theoretically, the Minc tool kit has libraries to perform these tasks, but
the means to do so easily is not known.
|
< < |
Using DX formats from C
|
> > |
Using DX formats from C
|
|
One LONI developer uses a C library, developed elsewhere, to do this. This library is presumed proprietary, and hence of no benefit to most LONI developers.
The OpenDX visualiztion tool has it's own codebase,however, the knowledge of how to easily make use of it has not been developed.
|
< < |
Using DFS formats from C
|
> > |
Using DFS formats from C
Please contact Dr. David Shattuck for details.
|
|
|
|
A guide to surface file formats
|
|
| Ucf | ShapeViewer BrainSuite | n/a | No | 1 float per vertex | No | ShapeTools | Legacy Loni | |
| DFS2.0 | ShapeViewer BrainSuite | Triangle | Yes | 1 float per vertex, 1 short int per vertex. | Yes | ShapeTools | proprietary (D. Shattuck) | Binary |
| DFS1.0 | ShapeViewer BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary (D. Shattuck) | Binary |
|
< < |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | ascii, format supports UV param, but not read by ShapeTools, supports arbitrary regular polygon faces. |
|
> > |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | The off ascii format supports UV param, but these are not read by ShapeTools, supports arbitrary regular polygon faces. |
|
|
| DX | ShapeViewer, DataExplorer | Triangle | Yes | Yes | | ShapeTools | OpenDX | ascii regular triangle faces only are supported by ShapeTools. format supports tensors at each vertex. |
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | proprietary | ascii, verbose files. |
| TM | ShapeViewer | Triangle | No | No | No | ShapeTools | Legacy Loni | simple ascii format, Loni only |
|
|
A guide to surface file formats
This web page is a short guide to the major surface and contour file formats used in LONI.
|
< < |
Overview
file format properties
Binary vs. ascii
|
|
Application support table
Definitions
|
< < |
- Viewer
- Vertex Colors
- Vertex Attributes
- Face Colors
- surface
- contour
- UV Parameterization
- Face Type - the shape of supported
|
> > |
- Viewer : an application used to visualize a surface or contour file.
- Vertex Colors : True if the file format allows specification of the color of each vertex.
- Vertex Attributes : true if the file format allows a data value to be associated with a particular vertex. If present, the permissible types of data vary greatly.
- Face Colors: true if a surface face may have a color specified. This is separate from the color of a vertex.
- surface : a collection of polygons, embedded in three dimensional space.
- contour : a line in three dimensional space.
- UV Parameterization : a two dimensional parameterization of a set a vertices. Often used to map 3d coordinates into a 2d representation.
- Face Type - the type of polygons from which a surface is composed. Most, but not all, file formats require all polygons in surface to be the same type.
|
|
File format table
|
< < |
| UCF | ShapeViewer BrainSuite | Quad | No | 1 float per vertex | No | ShapeTools | Loni Lib | Surface by convention. |
| Obj | ShapeViewer Display BrainSuite | Triangle | Yes | No | No | ShapeTools | | both ascii and binary versions exist. |
|
> > |
| UCF | ShapeViewer BrainSuite | Quad | No | 1 float per vertex | No | ShapeTools | Legacy Loni | Surface by convention. |
| Obj | ShapeViewer Display BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary | Both ascii and binary versions exist. |
|
|
| Obj(line) | ShapeViewer Display | n/a | No | No | No | ShapeTools | | ascii only |
|
< < |
| Ucf | ShapeViewer BrainSuite | n/a | No | 1 float per vertex | No | ShapeTools | Loni Lib | |
| DFS2.0 | ShapeViewer BrainSuite | Triangle | Yes | 1 float per vertex, 1 short int per vertex. | Yes | ShapeTools | proprietary | Binary |
| DFS1.0 | ShapeViewer BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary | Binary |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | ascii, format supports UV param, but not read by ShapeTools?, supports arbitrary regular polygon faces. |
| DX | ShapeViewer, DataExplorer | Triangle | Yes | Yes | | ShapeTools | OpenDX | ascii regular triangle faces only are supported by ShapeTools?. format supports tensors at each vertex. |
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | | ascii, verbose files. |
| TM | ShapeViewer | Triangle | No | No | No | ShapeTools | | simple ascii format, Loni only |
|
> > |
| Ucf | ShapeViewer BrainSuite | n/a | No | 1 float per vertex | No | ShapeTools | Legacy Loni | |
| DFS2.0 | ShapeViewer BrainSuite | Triangle | Yes | 1 float per vertex, 1 short int per vertex. | Yes | ShapeTools | proprietary (D. Shattuck) | Binary |
| DFS1.0 | ShapeViewer BrainSuite | Triangle | Yes | No | No | ShapeTools | proprietary (D. Shattuck) | Binary |
| OFF | ShapeViewer | Triangle,Quad | Yes | No | No | ShapeTools | | ascii, format supports UV param, but not read by ShapeTools, supports arbitrary regular polygon faces. |
| DX | ShapeViewer, DataExplorer | Triangle | Yes | Yes | | ShapeTools | OpenDX | ascii regular triangle faces only are supported by ShapeTools. format supports tensors at each vertex. |
| CCBBM 1.0 | ShapeViewer | Triangle | Yes | Yes | Yes | ShapeTools | proprietary | ascii, verbose files. |
| TM | ShapeViewer | Triangle | No | No | No | ShapeTools | Legacy Loni | simple ascii format, Loni only |
|
|
FreeSurfer Triangle binary | ShapeViewer | Triangle | Yes | d/k | No | ShapeTools | | reader only. |
| VTK (Unstructured Grid) | ShapeViewer | Triangle | d/k | d/k | No | ShapeTools | | reader only, trianglar mesh only |
|
< < |
Supplemental file format table notes
|
> > |
Notes
|
|
Ucf surface
|
> > |
|
|
Ucf files contain a collection of lines (contours). By convention, these are often treated as the rows of a surface composed of quadrilateral faces. The n'th vertex of each ucf contour is assumed to be connected to N-1'th and N+1'th vertex in the contour, and the N'th vertex of the contours before, and after, the contour containing the vertex (first and last contour excepted). With this assumption, a UCF file defines a surface mesh whose faces are quads.
|
< < |
File format recommendations
|
> > |
Using UCF file formats from C
Libraries to do so exist, but are not well publicized, leading individual developers to write their own code. At least one of the private implementations (DFS) has
known errors. Please contact the ShapeTools group for information on how to use the standard LONI C libaries to read and write UCF files.
a web page to document this is planned
|
|
|
> > |
Using Minc formats from C
|
|
|
< < |
Java Developers
|
> > |
Various LONI developers have written personal Minc surface file reader and writer code; Theoretically, the Minc tool kit has libraries to perform these tasks, but
the means to do so easily is not known.
|
|
|
> > |
Using DX formats from C
One LONI developer uses a C library, developed elsewhere, to do this. This library is presumed proprietary, and hence of no benefit to most LONI developers.
The OpenDX visualiztion tool has it's own codebase,however, the knowledge of how to easily make use of it has not been developed.
|
|
|
< < |
Matlab Developers
|
> > |
Using DFS formats from C
|
|
|
< < |
Use the ShapeTools library to read and write your data. Notes on how to do
may be found here.
|
|
|
< < |
C / C++ Developers
|
|
|