Skip to content

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.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIPLYWriterInitialValuesNo(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

ArgumentTypeRequiredDescription
initialValuesIPLYWriterInitialValuesNofor pre-setting some of its content

requestData ​

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setDataByteOrder ​

Set byte order.

ArgumentTypeRequiredDescription
byteOrderNumberYesByte order.

setFormat ​

Set file format.

ArgumentTypeRequiredDescription
formatFormatTypesYesFile format.

setHeaderComments ​

Set header comments.

ArgumentTypeRequiredDescription
headerCommentsArray[String]YesHeader comments.

setTextureCoordinatesName ​

Set textures coordinates format.

ArgumentTypeRequiredDescription
textureCoordinatesNameTextureCoordinatesNameYesTextures mapping coordinates format.

setTextureFileName ​

Set texture filename.

ArgumentTypeRequiredDescription
textureFileNameStringYesTexture filename.

setTransform ​

Set tranformation matrix.

ArgumentTypeRequiredDescription
transformmat4YesTranformation matrix.

setWithColors ​

Set colors values.

ArgumentTypeRequiredDescription
withColorsBooleanYesInclude colors.

setWithIndices ​

Set indices values.

ArgumentTypeRequiredDescription
withIndicesBooleanYesInclude indices.

setWithNormals ​

Set normals values.

ArgumentTypeRequiredDescription
withNormalsBooleanYesInclude normals.

setWithUVs ​

Set UVs values.

ArgumentTypeRequiredDescription
withUVsBooleanYesInclude textures mapping coordinates.

writePLY ​

ArgumentTypeRequiredDescription
polyDatavktPolyDataYes
formatFormatTypesNo
dataByteOrderNumberNo
commentsArray[String]NoHeader comments.
textureFileNameStringNoTexture file n coordinates name.
textureCoordinatesNameTextureCoordinatesNameNoTextures mapping coordinates format.
transformmat4NoTranformation matrix.
withNormalsBooleanNoInclude normals.
withUVsBooleanNoInclude textures mapping coordinates.
withColorsBooleanNoInclude colors.
withIndiceBooleanNoInclude indice.