ModelInformationCollection class that aggregates the collection of Models inside a Minos Training Set.
More...
Inherits TrainingSet.TrainingSetObjectInfoCollection< TrainingSet, ModelInfo >.
|
bool | Contains (string name) |
| Check if the collection contains a model with the specified name. More...
|
|
void | Add (ImageInfo image, string name, Point2D location, Rect featureWindow) |
| Add a new model (plus the first instance of that model) to the training set. More...
|
|
bool | Remove (ModelInfo model) |
| Remove a model (and all the instances extracted for that model!) from the training set. More...
|
|
void | Remove (int index) |
| Remove a training set image along with its instances from the training set. More...
|
|
void | SetGlobalAdvanceVector (Point2Dd vec) |
| Set an advance vector for all available models. More...
|
|
int | IndexOf (TInfo obj) |
| Determine the index of an image information object inside this collection. More...
|
|
|
override int | GetCount () |
| Parent class calls this method to determine the number of objects in the collection. More...
|
|
override ModelInfo | GetInfo (int index) |
| Parent class calls this method to extract one info object by index. More...
|
|
ModelInformationCollection class that aggregates the collection of Models inside a Minos Training Set.
◆ Add()
Add a new model (plus the first instance of that model) to the training set.
- Parameters
-
image | image from which to extract the first instance (needs to be taken from the TrainingSet.Images collection) |
name | name of the model to be generation |
location | position in the image from which to extract the first instance |
featureWindow | feature of the model to be generated |
- Exceptions
-
ObjectDisposedException | If the training set has already been disposed |
ArgumentNullException | If image or name are null |
InvalidOperationException | when one of the following applies:
-
the image has been taken from a training set that is not the parent of this collection
-
the name is an empty string
-
location references a location that lies outside the image or too close to the image border to extract a model with the given feature window.
|
◆ Contains()
bool Contains |
( |
string |
name | ) |
|
Check if the collection contains a model with the specified name.
- Parameters
-
name | name for which to check the collection |
- Returns
- true if the collection contains at least one model with the specified name, false otherwise
- Exceptions
-
ObjectDisposedException | If the training set has already been disposed |
◆ GetCount()
override int GetCount |
( |
| ) |
|
|
protected |
Parent class calls this method to determine the number of objects in the collection.
- Returns
- number of objects in the collection
- Exceptions
-
ObjectDisposedException | If the TrainingSet has already been disposed |
◆ GetInfo()
Parent class calls this method to extract one info object by index.
- Parameters
-
index | index at which to extract |
- Returns
- extracted object
- Exceptions
-
ObjectDisposedException | If the TrainingSet has already been disposed |
ArgumentOutOfRangeException | If the index is invalid |
◆ Remove() [1/2]
Remove a training set image along with its instances from the training set.
Calling this method will potentially invalidate any references to training set images or instances you are currently holding - so make sure you renew those where necessary!
- Parameters
-
index | index of the training set image to be removed |
- Exceptions
-
ObjectDisposedException | If the TrainingSet has already been disposed |
ArgumentOutOfRangeException | If index exceeds the range [0...Count] |
◆ Remove() [2/2]
Remove a model (and all the instances extracted for that model!) from the training set.
Calling this method will likely invalidate any references to training set images or instances you are currently holding - so make sure you renew those where necessary!
- Parameters
-
model | model to be removed from the training set |
- Returns
- true if the model has been removed successfully, false otherwise
- Exceptions
-
ObjectDisposedException | If the TrainingSet has already been disposed |
ArgumentNullException | If model is null |
◆ SetGlobalAdvanceVector()
void SetGlobalAdvanceVector |
( |
Point2Dd |
vec | ) |
|
Set an advance vector for all available models.
- Parameters
-
vec | Advance vector to be set for all models. |
◆ this[int index]
Index-based item access.
- Parameters
-
index | index to be accessed |
- Returns
- indexed class object
- Exceptions
-
ObjectDisposedException | If the TrainingSet has already been disposed |
ArgumentOutOfRangeException | If the index is invalid |
◆ this[string name]
String-based item access.
Note that this will only return the first model with a matching model name. If several models by the same name exist, they will need to be accessed index-based.
- Parameters
-
name | Name of the model to retrieve. |
- Returns
- ModelInformation object.
- Exceptions
-
IndexOutOfRangeException | If the name does not exist in the model collection. |