write_sample_identifierT_write_sample_identifierWriteSampleIdentifierWriteSampleIdentifier (Operator)

Name

write_sample_identifierT_write_sample_identifierWriteSampleIdentifierWriteSampleIdentifier — Write a sample identifier to a file.

Signature

write_sample_identifier( : : SampleIdentifier, FileName : )

Herror T_write_sample_identifier(const Htuple SampleIdentifier, const Htuple FileName)

void WriteSampleIdentifier(const HTuple& SampleIdentifier, const HTuple& FileName)

void HSampleIdentifier::WriteSampleIdentifier(const HString& FileName) const

void HSampleIdentifier::WriteSampleIdentifier(const char* FileName) const

void HSampleIdentifier::WriteSampleIdentifier(const wchar_t* FileName) const   (Windows only)

static void HOperatorSet.WriteSampleIdentifier(HTuple sampleIdentifier, HTuple fileName)

void HSampleIdentifier.WriteSampleIdentifier(string fileName)

Description

The operator write_sample_identifierwrite_sample_identifierWriteSampleIdentifierWriteSampleIdentifierWriteSampleIdentifier writes a sample identifier to the file FileNameFileNameFileNameFileNamefileName. The sample identifier can be read again with read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifier. The default HALCON file extension for the sample identifier is 'sid'.

For an explanation of the concept of sample-based identification see the introduction of chapter Identification / Sample-Based.

Execution Information

Parameters

SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier (input_control)  sample_identifier HSampleIdentifier, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the sample identifier.

FileNameFileNameFileNameFileNamefileName (input_control)  filename.write HTupleHTupleHtuple (string) (string) (HString) (char*)

File name.

File extension: .sid

Result

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

Possible Predecessors

prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifierPrepareSampleIdentifier, train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier, add_sample_identifier_preparation_dataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationData, add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData, set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamSetSampleIdentifierParam

Possible Successors

clear_sample_identifierclear_sample_identifierClearSampleIdentifierClearSampleIdentifierClearSampleIdentifier

Alternatives

serialize_sample_identifierserialize_sample_identifierSerializeSampleIdentifierSerializeSampleIdentifierSerializeSampleIdentifier

See also

create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifier, prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifierPrepareSampleIdentifier, train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier, apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifier, get_sample_identifier_paramget_sample_identifier_paramGetSampleIdentifierParamGetSampleIdentifierParamGetSampleIdentifierParam, get_sample_identifier_object_infoget_sample_identifier_object_infoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfo, remove_sample_identifier_preparation_dataremove_sample_identifier_preparation_dataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationData, remove_sample_identifier_training_dataremove_sample_identifier_training_dataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingData, read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifier, deserialize_sample_identifierdeserialize_sample_identifierDeserializeSampleIdentifierDeserializeSampleIdentifierDeserializeSampleIdentifier, set_sample_identifier_object_infoset_sample_identifier_object_infoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfo

Module

Matching