Filters
Filter values by
Dataset context
  • Images
  • Features
| Customize Help
| Save Settings

MclassControlEntry



Function Map
Synopsis
Control an entry in a dataset context.
Syntax
void MclassControlEntry(
MIL_ID DatasetContextClassId, //in
MIL_INT64 EntryIndex, //in
MIL_UUID EntryKey, //in
MIL_INT64 RegionIndex, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue, //in
const void *ControlValuePtr, //in
MIL_INT ControlValuePtrSize //in
)
Description

This function allows you to control a setting of an entry in a dataset context using its index or key. You can typically inquire these settings, using MclassInquireEntry().

To add entries to, or delete entries from, a dataset context, use MclassControl(). You can also import data from a CSV file to a dataset context, using MclassImport(). Note that you can use MIL CoPilot to interactively create, modify, and export datasets and their entries.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
DatasetContextClassId

Specifies the dataset on which to control settings. These contexts are allocated using MclassAlloc() with M_DATASET_IMAGES or M_DATASET_FEATURES.

EntryIndex

Specifies the entry to control, using the entry's index. While EntryIndex is not in use, it must be set to M_DEFAULT.

Set this parameter to one of the following values.

Note that both EntryIndex and EntryKey cannot be set to M_DEFAULT simultaneously.

function map For specifying the index of the entry to control
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies that the entry index is not required. In this case, you must set the EntryKey parameter to the key (UUID) of the entry to control.

(summarize)
Click to summarize Value >= 0

Specifies the index of the entry to control. In this case, you must set the EntryKey parameter to M_DEFAULT_KEY.

(summarize)
EntryKey

Specifies the entry to control, using the entry's unique key (UUID). While EntryKey is not in use, it must be set to M_DEFAULT_KEY.

Set this parameter to one of the following values.

Note that both EntryIndex and EntryKey cannot be set to M_DEFAULT simultaneously.

function map For specifying the key (UUID) of the entry to control
Click to summarizeValue Description
Click to summarize M_DEFAULT_KEY

Specifies that the entry's key (UUID) is not required. In this case, you must set the EntryKey parameter to the index of the entry to control.

(summarize)
Click to summarize MIL_UUID Value

Specifies the key (UUID) of the entry to control. In this case, you must set the EntryIndex parameter to M_DEFAULT. The key is defined as a MIL universal unique identifier (UUID).

(summarize)
RegionIndex

Specifies to control the entry, or to control the entry's region. Set this parameter to one of the following values.

function map For specifying whether to control the entry or the entry's region
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies to control the entry.

You must specify M_DEFAULT if you are using a features dataset context.

(summarize)
Click to summarize

Specifies to control the entry's region.

This value only applies to an images dataset context.

(summarize)
Parameters

Set this parameter to the following:

0 <= Value < M_NUMBER_OF_REGIONS

Specifies a specific region within the entry.

Note that there is always at least one region in an entry.

ControlType

Specifies the type of control to set.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the value for the control. If this information is not required, set this parameter to M_DEFAULT. In this case, you cannot set the ControlValuePtr parameter to M_NULL.

See the Parameter associations section for possible values that can be specified.

ControlValuePtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a constant std::vector<MIL_DOUBLE> ]
  • M_NULL
  • MIL_CONST_TEXT_PTR [optionally, in C++: a reference to a MIL_STRING]

Specifies the address of the variable which contains information for the type of control to set. If this information is not required, set this parameter to M_NULL. In this case, you cannot set the ControlValue parameter to M_DEFAULT.

See the Parameter associations section for possible values that can be specified.

ControlValuePtrSize

Specifies the number of elements in ControlValuePtr. If this information is not needed, set this parameter to M_DEFAULT.

The tables below list possible values for the ControlType, ControlValue, and ControlValuePtr parameters.

To control an entry in a dataset, the ControlType and corresponding ControlValue and ControlValuePtr parameter settings can be set to the following values. In this case, set the DatasetContextClassId parameter to the identifier of either an images dataset context or a features dataset context, unless otherwise specified, and set the RegionIndex parameter to M_DEFAULT.

function map For an entry in a dataset context (images or features)
Click to summarize
ControlType
Description
ControlValue
ControlValuePtr
Click to summarize M_AUGMENTATION_SOURCE

Sets whether an entry is an augmented entry, according to its index. INQ

(summarize)
Click to summarize ControlValue

Specifies one of the following.

(summarize)
Click to summarize M_NOT_AUGMENTED

Specifies that the entry is not an augmented entry.

Click to summarize M_UNKNOWN

Specifies that the entry is augmented, however, the original data is not known.

Click to summarize Value >= 0

Specifies that the entry is augmented, and that it originates from (was performed with) the specified entry index. The entry from which the augmentation originates is considered a source or parent entry.

(summarize)
Click to summarize ControlValuePtr
Data type info: Data type: Set this parameter to M_NULL
Click to summarize M_AUGMENTATION_SOURCE_KEY

Sets whether an entry is an augmented entry, according to its key (UUID).

(summarize)
Click to summarize ControlValue

Specifies one of the following.INQ

(summarize)
Click to summarize M_NULL_KEY

Specifies that the entry is not an augmented entry.

Click to summarize M_UNKNOWN_KEY

Specifies that the entry is augmented, and that the entry key (UUID) from which it was augmented is not known.

Click to summarize MIL_UUID Value

Specifies that the entry is augmented, and that it originates from (was performed with) the specified key. The entry from which the augmentation originates is considered a source or parent entry. The key is defined as a MIL universal unique identifier (UUID).

To specify a MIL_UUID value when using a C compiler, you must call the MIL_UUID version of this function (MclassControlEntryMilUuid). When using a C++ or other compiler, MclassControlEntry() internally calls the MIL_UUID version of this function.

MIL_UUID version of MclassControlEntry

void MclassControlEntryMilUuid

(MIL_ID DatasetContextClassId, MIL_INT64 EntryIndex, MIL_UUID EntryKey, MIL_INT64 RegionIndex, MIL_INT64 ControlType, MIL_UUID ControlValue, const void *ControlValuePtr, MIL_INT ControlValuePtrSize)

(summarize)
Click to summarize ControlValuePtr
Data type info: Data type: Set this parameter to M_NULL
Click to summarize M_ENTRY_USER_STRING

Sets a user string to store meta information. INQ

(summarize)
Click to summarize ControlValue

This parameter must be set to M_DEFAULT.

Click to summarize ControlValuePtr
Data type info: Data type: address of a MIL_CONST_TEXT_PTR [optionally, in C++: MIL_STRING ]

Specifies the following.

(summarize)
Click to summarize MIL_TEXT("String") 1

Specifies a string containing meta information. This string must not contain commas.

(summarize)
Click to summarize M_ENTRY_WEIGHT

Sets a weight that indicates the importance of the feature entry.

This value only applies to a features dataset context. INQ

(summarize)
Click to summarize ControlValue

Specifies one of the following.

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 1.0.

Click to summarize Value >= 0.0

Specifies the weight, as a double.

Click to summarize ControlValuePtr
Data type info: Data type: Set this parameter to M_NULL
Click to summarize M_FILE_PATH

Sets the location from which to get the entry's image, such that M_ROOT_PATH + M_FILE_PATH gives a valid path. If M_ROOT_PATH is empty, M_FILE_PATH should be an absolute path, otherwise it should be a relative path to M_ROOT_PATH. The maximum size of the entire file path (M_ROOT_PATH + M_FILE_PATH) is 259 characters.

In this case, set the DatasetContextClassId parameter to the identifier of an images dataset context.

This value only applies to an images dataset context. INQ

(summarize)
Click to summarize ControlValue

This parameter must be set to M_DEFAULT.

Click to summarize ControlValuePtr
Data type info: Data type: address of a MIL_CONST_TEXT_PTR [optionally, in C++: MIL_STRING ]

Specifies one of the following.

(summarize)
Click to summarize MIL_TEXT("///DATASET///") 1

Specifies the path where the dataset is saved after calling MclassSave(). If this path does not exist, MIL uses the path in which your application's executable file is located.

(summarize)
Click to summarize MIL_TEXT("FilePath") 1

Specifies the file path.

Click to summarize M_RAW_DATA

Sets an array of values (a set of features).

In this case, set the DatasetContextClassId parameter to the identifier of a features dataset context.

This value only applies to a features dataset context. INQ

(summarize)
Click to summarize ControlValue

Specifies the following.

(summarize)
Click to summarize M_DEFAULT

Specifies that this parameter is not required.

Click to summarize ControlValuePtr
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a constant std::vector<MIL_DOUBLE> ] MORE

Specifies the feature values.

Click to summarize M_USER_CONFIDENCE

Sets how confident you are in the entry's ground truth (M_CLASS_INDEX_GROUND_TRUTH). The confidence is not used in any calculations; it is for information purposes only. For example, when sharing datasets among multiple users, it can be useful to know how confident you should be of an entry's ground truth.

You must decide the confidence scale to use; all confidence values should follow the chosen convention.

This value only applies to an images dataset context. INQ

(summarize)
Click to summarize ControlValue

Specifies one of the following.

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 0.0.

Click to summarize Value

Specifies the user confidence.

Click to summarize ControlValuePtr
Data type info: Data type: Set this parameter to M_NULL

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

To control an entry or to control a region of an entry, the ControlType and corresponding ControlValue and ControlValuePtr parameter settings can be set to the following values. In this case, set the DatasetContextClassId parameter to the identifier of a dataset context and, for an images dataset context, set the RegionIndex parameter to M_REGION_INDEX() with an index of 0, and for a features dataset context, set the RegionIndex parameter to M_DEFAULT.

function map For an entry or a region of an entry in a dataset context (images or features)
Click to summarizeControlType Description
ControlValue
ControlValuePtr
Click to summarize M_AUTHOR_NAME

Sets the author's name. INQ

(summarize)
Click to summarize ControlValue

This parameter must be set to M_DEFAULT.

Click to summarize ControlValuePtr
Data type info: Data type: address of a MIL_CONST_TEXT_PTR [optionally, in C++: MIL_STRING ]

Specifies the following.

(summarize)
Click to summarize MIL_TEXT("Name") 1

Specifies the author's name.

Click to summarize M_CLASS_INDEX_GROUND_TRUTH

Sets the index of the class definition that represents the entry's ground truth. INQ

(summarize)
Click to summarize ControlValue

Specifies the following.

(summarize)
Click to summarize Value >= 0

Specifies the class definition index (ground truth), as an integer. Note, the index value must be less than the number of class definitions (M_NUMBER_OF_CLASSES), or you will get an error.

(summarize)
Click to summarize ControlValuePtr
Data type info: Data type: Set this parameter to M_NULL

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

Compilation information
Header Include mil.h.
Library Use mil.lib; milclass.lib.
DLL Requires mil.dll; milclass.dll.
DEFAULT DEFAULT KEY DEFAULT NUMBER OF REGIONS AUGMENTATION SOURCE NOT AUGMENTED UNKNOWN AUGMENTATION SOURCE KEY NULL KEY UNKNOWN KEY ENTRY USER STRING ENTRY WEIGHT DEFAULT FILE PATH RAW DATA DEFAULT USER CONFIDENCE DEFAULT AUTHOR NAME CLASS INDEX GROUND TRUTH