Home/News

About Us

Products
  Locator
  Data Editor
  Source Estimator
  MR Viewer
  Image Processor
  Visualizer

Data Analysis Service

Downloads

FAQs

Formats

Jobs

Contact Us

Papers

Links

EMSE User Group

Search


 
File Formats - Wireframe

Description
Wireframe (.wfr) files are used to represent tessellated surfaces. The surfaces consist of vertices, patches (triangles), and, optionally edges. In general, the file consists of a prolog, a header, a sequence of vertices, followed by a sequence of triangles, followed by a sequence of edges, but the detailed structure depends on the minor rev. Minor rev = 1, 2, 4 are similar, and a documented together. Minor rev =3 is documented last.

Minor Rev
EMSE v4.2 and above write minor rev 3 and 4, but can read earlier revisions. 

Minor rev = 4
Indices rather than address are used to link objects such as triangles and their associated vertices.

Minor rev = 3
The connectivity information in minor rev=3 files is stripped (i.e. only essential vertex and triangle information is stored). Connectivity information must be reconstructed once the file is read. The header consists of only one field (the type field).

Minor rev = 2
Explicit address pointers are stored. The header includes the type field, but the file is otherwise identical to minor rev=1.

Minor rev = 1
Explicit address pointers are stored. The header omits the type field.

Comments
Wireframe files must not have comment lines.
 

Header
The header consists of up to 5 entries in mandatory sequence (minor rev 1, 2, 4), shown in Table A-1.

Name Format Description
radius %f Sphere radius used for initial create step
#vertex %d Number of vertices in this file
#patch %d  Number of triangles in this file
#edge %d Number of edges in this file
type Type must be one of the following

 

 

m-rev=2 m-rev=3,4 Type
0 0x00000000 Unknown

64

0x00000040

Scalp, head frame

 

0x00080040

Scalp, voxel frame

 

0x00100040

Scalp, MRI frame

128

0x00000080

Outer skull, head frame

 

0x00080080

Outer skull, voxel frame

 

0x00100080

Outer skull, MRI frame

256

0x00000100

Inner skull, head frame

 

0x00080100

Inner skull, voxel frame

 

0x00100100

Inner skull, MRI frame

512

0x00000200

Cortex, head frame

 

0x00080200

Cortex, voxel frame

 

0x00100200

Cortex, MRI frame

Table A-1

Note: It is an undefined situation (and may produce an error) if both the voxel and MRI frame bits are set.

Vertex field
Table A-2 defines the vertex fields (minor rev = 1, 2, 4)

Name Format Description
%d %x %d index, address, channel index
Location 3 %g %g %g replace %g %g %g with the point location (meters)
Outward normal 3 %g %g %g  replace %g %g %g with outward normal
Potential %g current or voltage
Curvature %g curvature

Table A-2

 

Patch field
Table A-3 defines the patch fields (minor rev = 1, 2, 4)

Name Format Description
%d %x index, address
%g %g %g %g Solid angle, magnitude, potential, area
Location %g %g %g  replace %g %g %g with the center location (meters)
Outward normal %g %g %g replace %g %g %g with outward normal
Vertices  %x %x %x Vertex addresses (m-rev 1,2) or indices (m-rev4)
Edges %x %x %x edge addresses (m-rev 1,2) or indices (m-rev4)

Table A-3

Edge fields
Table A-4 defines the edge fields (minor rev = 1, 2, 4)

Name Format Description
Index %d %x index, address
%x %x Vertex address (m-rev= ,2) or index (m-rev=4)

Table A-4

Example 1
The following example illustrates a tetrahedron saved in minor rev = 2 format. The tetrahedron is shown in Figure F-1.

3 4000

2

0 4 4 6 64

0 0x01f87620 -1 3 0 0 0

3 0 0 0

0 0

1 0x01f94244 -1 3 0.5 0.867 0

3 0 0 0

0 0

2 0x01f94380 -1 3 1 0 0

3 0 0 0

0 0

3 0x01f93ec8 -1 3 0.5 0.289 0.816

3 0 0 0

0 0

0 0x01f93b90 0 0 0 0.4335

0.5 0.289 0

0 0 -1

0x01f87620 0x01f94244 0x01f94380 0x01f93fb0 0x01f93ffc 0x01f94048

1 0x01f93c68 0 0 0 0.433157

0.333333 0.385333 0.272

-0.816645 0.47096 0.333597

0x01f87620 0x01f93ec8 0x01f94244 0x01f94094 0x01f940e0 0x01f93fb0

2 0x01f93d40 0 0 0 0.432833

0.5 0.0963333 0.272

0 -0.942627 0.333847

0x01f87620 0x01f94380 0x01f93ec8 0x01f94048 0x01f9412c 0x01f94094

3 0x01f93858 0 0 0 0.433157

0.666667 0.385333 0.272

0.816645 0.47096 0.333597

0x01f94244 0x01f93ec8 0x01f94380 0x01f93ffc 0x01f940e0 0x01f9412c

0 0x01f93fb0 0x01f87620 0x01f94244

1 0x01f93ffc 0x01f94244 0x01f94380

2 0x01f94048 0x01f94380 0x01f87620

3 0x01f94094 0x01f87620 0x01f93ec8

4 0x01f940e0 0x01f94244 0x01f93ec8

5 0x01f9412c 0x01f94380 0x01f93ec8

 

Figure F-1

Example 2
The following example illustrates a tetrahedron saved in minor rev = 4 format.
 
3 4000

4

0 4 4 6 40

-1 3 0 0 0

3 0 0 0

0 0

-1 3 0.5 0.867 0

3 0 0 0

0 0

-1 3 1 0 0

3 0 0 0

0 0

-1 3 0.5 0.289 0.816

3 0 0 0

0 0

0 0 0 0.4335

0.5 0.289 0

0 0 -1

0 1 2 0 1 2

0 0 0 0.433157

0.333333 0.385333 0.272

-0.816645 0.47096 0.333597

0 3 1 3 4 0

0 0 0 0.432833

0.5 0.0963333 0.272

0 -0.942627 0.333847

0 2 3 2 5 3

0 0 0 0.433157

0.666667 0.385333 0.272

0.816645 0.47096 0.333597

1 3 2 1 4 5

0 1

1 2

2 0

0 3

1 3

2 3

Minor rev = 3
The connectivity information in minor rev=3 files is stripped (i.e. essential vertex and triangle information is stored). Connectivity information must be reconstructed once the file is read. The header consists of only one field (the type field, see Table A-1). Each subsequent line represents either a vertex or a triangle.

Name Format Description
vertex v %f %f %f A vertex is represented by the character 'v' followed by the (xyz) coordinates
triangle t %f %f %f A triangle is represented by the character 't' followed by the indices of the 3 vertices. The vertex index is given by its sequence within the file.


Example 3

The following example illustrates a tetrahedron saved in minor rev = 3 format.

3 4000

3

40

v 0 0 0

v 0.5 0.867 0

v 1 0 0

v 0.5 0.289 0.816

t 0 1 2

t 0 3 1

t 0 2 3

t 1 3 2

Figure F-2
Tetrahedron used in examples 1-3, showing vertices v0-v3 with their (xyz) locations, and triangles t0-t3.


Figure F-2


 

Return to File Formats page


 
  © 2010 by Source Signal Imaging Inc.