read_tupleread_tupleReadTupleReadTupleread_tuple (Operator)
Name
read_tupleread_tupleReadTupleReadTupleread_tuple
— Read a tuple from a file.
Signature
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_tupleReadTupleReadTupleread_tuple
reads the contents of FileNameFileNameFileNamefileNamefile_name
and
converts it into TupleTupleTupletupletuple
. The default HALCON file extension for the
tuple is 'tup'. The file has to be generated by write_tuplewrite_tupleWriteTupleWriteTuplewrite_tuple
.
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
FileNameFileNameFileNamefileNamefile_name
(input_control) filename.read →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the file to be read.
File extension:
.tup
TupleTupleTupletupletuple
(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_tupleReadTupleReadTupleread_tuple
returns the value 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
Alternatives
fwrite_stringfwrite_stringFwriteStringFwriteStringfwrite_string
See also
write_tuplewrite_tupleWriteTupleWriteTuplewrite_tuple
,
write_imagewrite_imageWriteImageWriteImagewrite_image
,
write_regionwrite_regionWriteRegionWriteRegionwrite_region
,
open_fileopen_fileOpenFileOpenFileopen_file
Module
Foundation