Difference between revisions of "OpenIGTLink/ProtocolV2/Type/PolyData"

From NAMIC Wiki
Jump to: navigation, search
Line 100: Line 100:
  
 
=Contributors=
 
=Contributors=
Junichi Tokuda, Yuichiro Hayashi
+
Junichi Tokuda
  
 
=Comments=
 
=Comments=

Revision as of 06:28, 17 November 2010

Home < OpenIGTLink < ProtocolV2 < Type < PolyData

<< Version 2 Draft Page

Summary

POLYDATA is used to transfer 3D polygonal data. The message format is designed based on the POLY DATA format defined in VTK file format and equivalent to VTK's vtkPolyData class.

Message Types

POLYDATA

Data Type Description
NPOINTS uint32 Number of points
PTYPE uint16 Data type (see image)
POINTS PTYPE * NPOINTS * 3 Coordinates of points (P0x, P0y, P0z, P1x, P1y, P1z, ... P(n-1)x, P(n-1)y, P(n-1)z
NVERTICES uint32 Number of vertices
VERTICES uint32 * ((NPOINTS_0+1) + (NPOINTS_1+1) + (NPOINTS_(N-1)+1)) array of vertices ((NPOINTS_0, index_0_0, index_0_1, ....), (NPOINTS_1, index_1_0, index_1_1, ....), ..., (NPOINTS_(N-1), index_(N-1)_0, index_(N-1)_1, ....))
NLINES uint32 Number of lines
LINES uint32 * ((NPOINTS_0+1) + (NPOINTS_1+1) + (NPOINTS_(N-1)+1)) array of vertices ((NPOINTS_0, index_0_0, index_0_1, ....), (NPOINTS_1, index_1_0, index_1_1, ....), ..., (NPOINTS_(N-1), index_(N-1)_0, index_(N-1)_1, ....))
NPOLYGONS uint32 Number of lines
POLYGONS uint32 * ((NPOINTS_0+1) + (NPOINTS_1+1) + (NPOINTS_(N-1)+1)) array of vertices ((NPOINTS_0, index_0_0, index_0_1, ....), (NPOINTS_1, index_1_0, index_1_1, ....), ..., (NPOINTS_(N-1), index_(N-1)_0, index_(N-1)_1, ....))
NTRIANGLE_STRIPS uint32 Number of lines
TRIANGLE_STRIPS uint32 * ((NPOINTS_0+1) + (NPOINTS_1+1) + (NPOINTS_(N-1)+1)) array of vertices ((NPOINTS_0, index_0_0, index_0_1, ....), (NPOINTS_1, index_1_0, index_1_1, ....), ..., (NPOINTS_(N-1), index_(N-1)_0, index_(N-1)_1, ....))

GET_POLYDATA

Data Type Description


STT_POLYDATA

Data Type Description

STP_POLYDATA

Data Type Description

RTS_POLYDATA

Implementations

The NDARRAY message type is implemented in the following source code.

Contributors

Junichi Tokuda

Comments