ClassesClassesClassesClasses | | | | Operators

read_matrixread_matrixReadMatrixread_matrixReadMatrixReadMatrix (Operator)


read_matrixread_matrixReadMatrixread_matrixReadMatrixReadMatrix — Read a matrix from a file.


read_matrix( : : FileName : MatrixID)

Herror read_matrix(const char* FileName, Hlong* MatrixID)

Herror T_read_matrix(const Htuple FileName, Htuple* MatrixID)

Herror read_matrix(const HTuple& FileName, Hlong* MatrixID)

void HMatrix::ReadMatrix(const HTuple& FileName)

void ReadMatrix(const HTuple& FileName, HTuple* MatrixID)

void HMatrix::HMatrix(const HString& FileName)

void HMatrix::HMatrix(const char* FileName)

void HMatrix::ReadMatrix(const HString& FileName)

void HMatrix::ReadMatrix(const char* FileName)

void HOperatorSetX.ReadMatrix(
[in] VARIANT FileName, [out] VARIANT* MatrixID)

void HMatrixX.ReadMatrix([in] BSTR FileName)

static void HOperatorSet.ReadMatrix(HTuple fileName, out HTuple matrixID)

public HMatrix(string fileName)

void HMatrix.ReadMatrix(string fileName)


The operator read_matrixread_matrixReadMatrixread_matrixReadMatrixReadMatrix reads a matrix, which has been written to the file with write_matrixwrite_matrixWriteMatrixwrite_matrixWriteMatrixWriteMatrix, from the file FileNameFileNameFileNameFileNameFileNamefileName. The default HALCON file extension for the matrix is 'mtx'. The format of the file can be binary or ascii. Each row of the file contains one row of a matrix with a number of columns. The columns are separated with white spaces or tabs. Each row must have the same number of columns. Empty lines are ignored.

The reading results are stored in the matrix MatrixMatrixMatrixMatrixMatrixmatrix. The operator returns the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDMatrixIDmatrixID of this matrix. Access to the elements of the matrix is possible e.g. with the operator get_full_matrixget_full_matrixGetFullMatrixget_full_matrixGetFullMatrixGetFullMatrix.



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

File name.

File extension: .mtx

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

Matrix handle.


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

Possible Successors




ClassesClassesClassesClasses | | | | Operators