CVB.Net 14.0
SampleClassificationImageList.ImageClassificationLabelInfo Class Reference

Classification label information More...

Inherits ILabelInfo< string >.

Public Member Functions

override string ToString ()
 Return the label information as a string. More...
 
void Add (Image srcImage, Point2D extractionLocation, SampleExtractionMode mode=SampleExtractionMode.TopLeftCorner)
 Add a new sample to an existing class. More...
 
void Relabel (string label)
 Modify the label of a sample set, but not to one that already exists in the SampleList. To Merge labels in the SampleList use the merge method(s) of the sample list. More...
 

Properties

ImageCollection Samples [get]
 Samples under this label. More...
 
int Index [get]
 Get the index of this label. Note that this index may change when samples are removed from the image list - therefore you should check this index often. Generally it is more recommendable to work label based, not index based. More...
 
string Label [get]
 Label under which this class is stored. You may change this label, but not to one that already exists in the SampleList. To Merge labels in the SampleList use the merge method(s) of the sample list. More...
 
bool IsExcluded [get, set]
 Get/set the exclusion state of this class. More...
 
Type LabelType [get]
 Type of the labels.
 
SampleList ParentList [get]
 Sample List object from which this information was taken.
 

Detailed Description

Classification label information

Member Function Documentation

◆ Add()

void Add ( Image  srcImage,
Point2D  extractionLocation,
SampleExtractionMode  mode = SampleExtractionMode.TopLeftCorner 
)

Add a new sample to an existing class.

Parameters
srcImageImage from which to extract the first sample for the new class.
extractionLocationLocation at which to extract the sample for the class. Note that what the extraction location actually refers dependent on the value of the mode parameter.
modeInterpretation hint for the extractionLocation parameter.
Exceptions
ObjectDisposedExceptionIf the image list has already been disposed.

◆ Relabel()

void Relabel ( string  label)

Modify the label of a sample set, but not to one that already exists in the SampleList. To Merge labels in the SampleList use the merge method(s) of the sample list.

Parameters
label
Exceptions
ObjectDisposedExceptionIf the parent list has already been disposed.
ArgumentNullExceptionwhen trying to set a null as class label
ArgumentExceptionwhen trying to set an empty class label
InvalidOperationExceptionwhen trying to set a class label that already exists in the parent SampleList

◆ ToString()

override string ToString ( )

Return the label information as a string.

Returns
Label string.

Property Documentation

◆ Index

int Index
get

Get the index of this label. Note that this index may change when samples are removed from the image list - therefore you should check this index often. Generally it is more recommendable to work label based, not index based.

Exceptions
ObjectDisposedExceptionIf the parent list has already been disposed.

◆ IsExcluded

bool IsExcluded
getset

Get/set the exclusion state of this class.

Exceptions
ObjectDisposedExceptionIf the parent list has already been disposed.

◆ Label

string Label
get

Label under which this class is stored. You may change this label, but not to one that already exists in the SampleList. To Merge labels in the SampleList use the merge method(s) of the sample list.

Exceptions
ObjectDisposedExceptionIf the parent list has already been disposed.
ArgumentNullExceptionwhen trying to set a null as class label
ArgumentExceptionwhen trying to set an empty class label
InvalidOperationExceptionwhen trying to set a class label that already exists in the parent SampleList

◆ Samples

ImageCollection Samples
get

Samples under this label.

Exceptions
ObjectDisposedExceptionIf the parent list has already been disposed.