read_tupleread_tupleReadTupleReadTupleread_tuple (算子名称)
名称
read_tupleread_tupleReadTupleReadTupleread_tuple — Read a tuple from a file.
参数签名
def read_tuple(file_name: str) -> Sequence[Union[float, int, str]]
def read_tuple_s(file_name: str) -> Union[float, int, str]
描述
该算子 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.
运行信息
- Multithreading type: independent (runs in parallel even with exclusive operators).
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
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.
结果
If the parameters are correct 该算子 read_tupleread_tupleReadTupleReadTupleReadTupleread_tuple
返回值 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
可替代算子
fwrite_stringfwrite_stringFwriteStringFwriteStringFwriteStringfwrite_string
参考其它
write_tuplewrite_tupleWriteTupleWriteTupleWriteTuplewrite_tuple,
write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image,
write_regionwrite_regionWriteRegionWriteRegionWriteRegionwrite_region,
open_fileopen_fileOpenFileOpenFileOpenFileopen_file
模块
Foundation