Skip to content

read_tupleReadTupleReadTupleread_tupleread_tuple🔗

Short description🔗

read_tupleReadTupleReadTupleread_tupleread_tuple — Read a tuple from a file.

Signature🔗

read_tuple( filename.read FileName, out tuple Tuple )void ReadTuple( const HTuple& FileName, HTuple* Tuple )static void HOperatorSet.ReadTuple( HTuple fileName, out HTuple tuple )def read_tuple( file_name: str ) -> Sequence[Union[float, int, str]]

def read_tuple_s( file_name: str ) -> Union[float, int, str]Herror read_tuple( const char* FileName, double* Tuple )

Herror T_read_tuple( 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 HTuple HMisc.ReadTuple( string fileName )

static HTuple HTuple.ReadTuple( HTuple fileName )

Description🔗

The operator read_tupleReadTuple reads the contents of FileNamefileNamefile_name and converts it into Tupletupletuple. The default HALCON file extension for the tuple is 'tup'. The file has to be generated by write_tupleWriteTuple.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

FileNamefileNamefile_name (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the file to be read.

File extension: .tup

Tupletupletuple (output_control) tuple(-array) → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Tuple with any kind of data.

Result🔗

If the parameters are correct the operator read_tupleReadTuple returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Alternatives

fwrite_stringFwriteString

See also

write_tupleWriteTuple, write_imageWriteImage, write_regionWriteRegion, open_fileOpenFile

Module🔗

Foundation