read_tupleread_tupleReadTupleReadTupleread_tuple (Operator)

Name

read_tupleread_tupleReadTupleReadTupleread_tuple — Read a tuple from a file.

Signature

read_tuple( : : FileName : Tuple)

Herror read_tuple(const char* FileName, double* Tuple)

Herror T_read_tuple(const Htuple FileName, Htuple* Tuple)

void ReadTuple(const HTuple& FileName, HTuple* Tuple)

static HTuple HMisc::ReadTuple(const HString& FileName)

static HTuple HMisc::ReadTuple(const char* FileName)

static HTuple HMisc::ReadTuple(const wchar_t* FileName)   (Windows only)

static HTuple HTuple::ReadTuple(const HTuple& FileName)

static void HOperatorSet.ReadTuple(HTuple fileName, out HTuple tuple)

static HTuple HMisc.ReadTuple(string fileName)

static HTuple HTuple.ReadTuple(HTuple fileName)

def read_tuple(file_name: str) -> Sequence[Union[float, int, str]]

def read_tuple_s(file_name: str) -> Union[float, int, str]

Description

The operator read_tupleread_tupleReadTupleReadTupleReadTupleread_tuple reads the contents of FileNameFileNameFileNameFileNamefileNamefile_name and converts it into TupleTupleTupleTupletupletuple. The default HALCON file extension for the tuple is 'tup'. The file has to be generated by write_tuplewrite_tupleWriteTupleWriteTupleWriteTuplewrite_tuple.

Execution Information

Parameters

FileNameFileNameFileNameFileNamefileNamefile_name (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the file to be read.

File extension: .tup

TupleTupleTupleTupletupletuple (output_control)  tuple(-array) HTupleSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Tuple with any kind of data.

Result

If the parameters are correct the operator read_tupleread_tupleReadTupleReadTupleReadTupleread_tuple returns the value TRUE. Otherwise an exception is raised.

Alternatives

fwrite_stringfwrite_stringFwriteStringFwriteStringFwriteStringfwrite_string

See also

write_tuplewrite_tupleWriteTupleWriteTupleWriteTuplewrite_tuple, write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image, write_regionwrite_regionWriteRegionWriteRegionWriteRegionwrite_region, open_fileopen_fileOpenFileOpenFileOpenFileopen_file

Module

Foundation