PLYWriter
Introduction
vtkPLYWriter writes polygonal data in Stanford University PLY format (see http://graphics.stanford.edu/data/3Dscanrep/). The data can be written in either binary (little or big endian) or ASCII representation. As for PointData and CellData, vtkPLYWriter cannot handle normals or vectors. It only handles RGB PointData and CellData. You need to set the name of the array (using SetName for the array and SetArrayName for the writer). If the array is not a vtkUnsignedCharArray with 3 or 4 components, you need to specify a vtkLookupTable to map the scalars to RGB.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkPLYWriter characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IPLYWriterInitialValues | No | (default: {}) |
getDataByteOrder
Get byte order value.
getFormat
Get file format value.
getHeaderComments
Get header comments.
getTextureCoordinatesName
Get textures mapping coordinates format.
getTextureFileName
Get texture filename.
getTransform
Get transformation matrix.
getWithColors
Get whether colors values are included.
getWithIndices
Get whether indices are included.
getWithNormals
Get whether normals are included.
getWithUVs
Get textures mapping coordinates.
newInstance
Method used to create a new instance of vtkPLYWriter
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IPLYWriterInitialValues | No | for pre-setting some of its content |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setDataByteOrder
Set byte order.
| Argument | Type | Required | Description |
|---|---|---|---|
byteOrder | Number | Yes | Byte order. |
setFormat
Set file format.
| Argument | Type | Required | Description |
|---|---|---|---|
format | FormatTypes | Yes | File format. |
setHeaderComments
Set header comments.
| Argument | Type | Required | Description |
|---|---|---|---|
headerComments | Array[String] | Yes | Header comments. |
setTextureCoordinatesName
Set textures coordinates format.
| Argument | Type | Required | Description |
|---|---|---|---|
textureCoordinatesName | TextureCoordinatesName | Yes | Textures mapping coordinates format. |
setTextureFileName
Set texture filename.
| Argument | Type | Required | Description |
|---|---|---|---|
textureFileName | String | Yes | Texture filename. |
setTransform
Set tranformation matrix.
| Argument | Type | Required | Description |
|---|---|---|---|
transform | mat4 | Yes | Tranformation matrix. |
setWithColors
Set colors values.
| Argument | Type | Required | Description |
|---|---|---|---|
withColors | Boolean | Yes | Include colors. |
setWithIndices
Set indices values.
| Argument | Type | Required | Description |
|---|---|---|---|
withIndices | Boolean | Yes | Include indices. |
setWithNormals
Set normals values.
| Argument | Type | Required | Description |
|---|---|---|---|
withNormals | Boolean | Yes | Include normals. |
setWithUVs
Set UVs values.
| Argument | Type | Required | Description |
|---|---|---|---|
withUVs | Boolean | Yes | Include textures mapping coordinates. |
writePLY
| Argument | Type | Required | Description |
|---|---|---|---|
polyData | vktPolyData | Yes | |
format | FormatTypes | No | |
dataByteOrder | Number | No | |
comments | Array[String] | No | Header comments. |
textureFileName | String | No | Texture file n coordinates name. |
textureCoordinatesName | TextureCoordinatesName | No | Textures mapping coordinates format. |
transform | mat4 | No | Tranformation matrix. |
withNormals | Boolean | No | Include normals. |
withUVs | Boolean | No | Include textures mapping coordinates. |
withColors | Boolean | No | Include colors. |
withIndice | Boolean | No | Include indice. |