CVB.Net 14.0
TrainingSet.ImageInstanceInfoCollection Class Reference

Instance information collection that is attached to a training set image. More...

Inherits TrainingSet.InstanceInfoCollection.

Public Member Functions

 ImageInstanceInfoCollection (TrainingSet parent, IntPtr collectionParent)
 Constructor. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from TrainingSet.InstanceInfoCollection
bool Remove (InstanceInfo instance)
 Remove an instance from the training set. More...
 
void Remove (int index)
 Remove an instance from the training set. More...
 
- Public Member Functions inherited from TrainingSet.TrainingSetObjectInfoCollection< TrainingSet, InstanceInfo >
int IndexOf (TInfo obj)
 Determine the index of an image information object inside this collection. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TrainingSet.InstanceInfoCollection
override int GetCount ()
 Parent class calls this method to determine the number of objects in the collection. More...
 
override InstanceInfo GetInfo (int index)
 Parent class calls this method to extract one info object by index. More...
 
- Protected Attributes inherited from TrainingSet.InstanceInfoCollection
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.
 
- Properties inherited from TrainingSet.InstanceInfoCollection
InstanceInfo this[int index] [get]
 Index-based item access. More...
 

Detailed Description

Instance information collection that is attached to a training set image.

Constructor & Destructor Documentation

◆ ImageInstanceInfoCollection()

ImageInstanceInfoCollection ( TrainingSet  parent,
IntPtr  collectionParent 
)

Constructor.

Parameters
parentThe training set to which the collection to be created will belong.
collectionParentThe native handle through which this collection is to access the information.

Member Function Documentation

◆ Add()

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.

Parameters
namename of the model to which to add the instance
locationlocation from which to extract the new instance; upon return from this function, location will contain the corrected location as corrected by the correlation test
askForceflag 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
ObjectDisposedExceptionIf the parent training set has already been disposed
ArgumentNullExceptionIf name is null
InvalidOperationExceptionIf no model by the given name exists in this training set
ArgumentNullExceptionIf the name parameter is null
InvalidOperationExceptionIf the model name has not yet been defined for this training set
Returns
An InstanceInfo object that represents the newly added instance.

◆ TryAdd()

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.

Parameters
namename of the model to which to add the instance
locationlocation from which to extract the new instance; upon return from this function, location will contain the corrected location as corrected by the correlation test
askForceflag 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.