Instance information collection that is attached to a training set image.
More...
Inherits TrainingSet.InstanceInfoCollection.
|
| ImageInstanceInfoCollection (TrainingSet parent, IntPtr collectionParent) |
| Constructor.
|
|
InstanceInfo | Add (string name, bool askForce, ref Point2Dd location) |
| Extract a new instance from the parent image and added it to the model with the specified name.
|
|
InstanceInfo | TryAdd (string name, bool askForce, ref Point2Dd location) |
| Extract a new instance from the parent image and added it to the model with the specified name.
|
|
bool | Remove (InstanceInfo instance) |
| Remove an instance from the training set.
|
|
void | Remove (int index) |
| Remove an instance from the training set.
|
|
int | IndexOf (TInfo obj) |
| Determine the index of an image information object inside this collection.
|
|
TInfo[] | ToArray () |
| Converts this collection into an array.
|
|
|
override int | GetCount () |
| Parent class calls this method to determine the number of objects in the collection.
|
|
override InstanceInfo | GetInfo (int index) |
| Parent class calls this method to extract one info object by index.
|
|
| InfoCollection (TParent parent) |
| Constructor.
|
|
int | GetCount () |
| Function with which the collection queries the number of elements.
|
|
TInfo | GetInfo (int index) |
| Function with which the collection retrieves the information object with the given index.
|
|
readonly IntPtr | collectionParent_ |
| The instance collection needs the collection parent handle in addition to the MTS handle as the instance collection appears twice: once inside the model, and once inside the image.
|
|
readonly TParent | Parent |
| Parent image reference helps keeping track of the lifetime and provides the information basis for index access.
|
|
InstanceInfo | this[int index] [get] |
| Index-based item access.
|
|
int | Count [get] |
| Number of elements in the collection.
|
|
Instance information collection that is attached to a training set image.
◆ ImageInstanceInfoCollection()
Constructor.
- Parameters
-
parent | The training set to which the collection to be created will belong. |
collectionParent | The native handle through which this collection is to access the information. |
◆ Add()
Extract a new instance from the parent image and added it to the model with the specified name.
- Parameters
-
name | name of the model to which to add the instance |
location | location from which to extract the new instance; upon return from this function, location will contain the corrected location as corrected by the correlation test |
askForce | flag controlling the response to a failed correlation test; if AskForce is true, a messagebox appears asking if the user wants to force creation of a model, even though the sample has failed the correlation test |
- Exceptions
-
ObjectDisposedException | If the parent training set has already been disposed |
ArgumentNullException | If name is null |
InvalidOperationException | If no model by the given name exists in this training set |
ArgumentNullException | If the name parameter is null |
InvalidOperationException | If the model name has not yet been defined for this training set |
- Returns
- An InstanceInfo object that represents the newly added instance.
◆ TryAdd()
Extract a new instance from the parent image and added it to the model with the specified name.
- Parameters
-
name | name of the model to which to add the instance |
location | location from which to extract the new instance; upon return from this function, location will contain the corrected location as corrected by the correlation test |
askForce | flag controlling the response to a failed correlation test; if AskForce is true, a messagebox appears asking if the user wants to force creation of a model, even though the sample has failed the correlation test |
- Returns
- Newly trained instance or null.