ClassesClassesClassesClasses | | | | Operators

write_matrixwrite_matrixWriteMatrixwrite_matrixWriteMatrixWriteMatrix (Operator)

Name

write_matrixwrite_matrixWriteMatrixwrite_matrixWriteMatrixWriteMatrix — Write a matrix to a file.

Signature

write_matrix( : : MatrixID, FileFormat, FileName : )

Herror write_matrix(const Hlong MatrixID, const char* FileFormat, const char* FileName)

Herror T_write_matrix(const Htuple MatrixID, const Htuple FileFormat, const Htuple FileName)

Herror write_matrix(const HTuple& MatrixID, const HTuple& FileFormat, const HTuple& FileName)

void HMatrix::WriteMatrix(const HTuple& FileFormat, const HTuple& FileName) const

void WriteMatrix(const HTuple& MatrixID, const HTuple& FileFormat, const HTuple& FileName)

void HMatrix::WriteMatrix(const HString& FileFormat, const HString& FileName) const

void HMatrix::WriteMatrix(const char* FileFormat, const char* FileName) const

void HOperatorSetX.WriteMatrix(
[in] VARIANT MatrixID, [in] VARIANT FileFormat, [in] VARIANT FileName)

void HMatrixX.WriteMatrix(
[in] BSTR FileFormat, [in] BSTR FileName)

static void HOperatorSet.WriteMatrix(HTuple matrixID, HTuple fileFormat, HTuple fileName)

void HMatrix.WriteMatrix(string fileFormat, string fileName)

Description

The operator write_matrixwrite_matrixWriteMatrixwrite_matrixWriteMatrixWriteMatrix writes a matrix to the file FileNameFileNameFileNameFileNameFileNamefileName. The matrix can be read with read_matrixread_matrixReadMatrixread_matrixReadMatrixReadMatrix. The default HALCON file extension for the matrix is 'mtx'. The format of the file can be selected via the parameter FileFormatFileFormatFileFormatFileFormatFileFormatfileFormat. The following values are supported: 'binary'"binary""binary""binary""binary""binary" for a binary file format, and 'ascii'"ascii""ascii""ascii""ascii""ascii" for a ascii text format. In the text format each row of the file contains one row of the matrix. The columns are separated with white spaces. The advantage of using the binary file format instead of the ascii text format is a smaller size of the output file.

Parallelization

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID (input_control)  matrix HMatrix, HTupleHTupleHMatrix, HTupleHMatrixX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Matrix handle of the input matrix.

FileFormatFileFormatFileFormatFileFormatFileFormatfileFormat (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Format of the file.

Default value: 'binary' "binary" "binary" "binary" "binary" "binary"

List of values: 'ascii'"ascii""ascii""ascii""ascii""ascii", 'binary'"binary""binary""binary""binary""binary"

FileNameFileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

File name.

File extension: .mtx

Result

If the file name is valid (write permission), the operator write_matrixwrite_matrixWriteMatrixwrite_matrixWriteMatrixWriteMatrix returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

create_matrixcreate_matrixCreateMatrixcreate_matrixCreateMatrixCreateMatrix

Module

Foundation


ClassesClassesClassesClasses | | | | Operators