MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.AnnotationGroupCollection Class Reference

Defines a collection of AnnotationGroups. More...

Inheritance diagram for MyCaffe.basecode.AnnotationGroupCollection:

Public Member Functions

 AnnotationGroupCollection ()
 The constructor. More...
 
void Add (AnnotationGroupCollection col)
 Add another AnnotationGroupCollection to this one. More...
 
void Add (AnnotationGroup g)
 Add a new AnnotationGroup to the collection. More...
 
bool Remove (AnnotationGroup g)
 Remove an AnnotationGroup from the collection if it exists. More...
 
void RemoveAt (int nIdx)
 Remove an item at a given index. More...
 
void Clear ()
 Clear all items from the collection. More...
 
IEnumerator< AnnotationGroupGetEnumerator ()
 Returns the enumerator for the collection. More...
 
Annotation GetMaxScoringAnnotation ()
 Returns the maximum scoring annotation within a collection of groups. More...
 
AnnotationGroup Find (int nLabel)
 Find the annotation group with the given label. More...
 
AnnotationGroupCollection Clone ()
 Return a copy of the collection. More...
 
Tuple< int, int > GetMinMaxLabels ()
 Return the min/max labels found int the collection. More...
 
void Normalize (Rectangle rc)
 Normalize all annotations to the given rectangle. More...
 

Static Public Member Functions

static void SaveList (BinaryWriter bw, AnnotationGroupCollection rg)
 Save an AnnotationGroupCollection to a binary writer. More...
 
static void SaveLabels (BinaryWriter bw, AnnotationGroupCollection rg)
 Save the labels to a binary writer. More...
 
static AnnotationGroupCollection LoadList (BinaryReader br)
 Load an AnnotationGroupCollection from a binary stream. More...
 
static Dictionary< int, string > LoadLabels (BinaryReader br)
 Load the labels from a binary reader. More...
 
static byte[] ToByteArray (AnnotationGroupCollection rg, bool bIncludeLabels=false)
 Saves a AnnotationGroupCollection to a byte array. More...
 
static AnnotationGroupCollection FromByteArray (byte[] rg)
 Returns an AnnotationGroupCollection from a byte array. More...
 

Properties

bool HasDataCriteria [getset]
 Get/set whether or not the image has a data criteria associated with it. More...
 
bool HasDebugData [getset]
 Get/set whether or not the image has debug data associated with it. More...
 
int ImageID [getset]
 Specifies the ImageID. More...
 
int ImageIdx [getset]
 Specifies the Image Index. More...
 
int CreatorID [getset]
 Specifies the Dataset Creator ID. More...
 
int DatasetID [getset]
 Specifies the Dataset ID. More...
 
int SourceID [getset]
 Specifies the Data Source ID. More...
 
Dictionary< int, string > Labels [getset]
 Get/set the label name mappings. More...
 
int Count [get]
 Specifies the number of items in the collection. More...
 
AnnotationGroup this[int nIdx] [getset]
 Get/set a specific item within the collection at a given index. More...
 

Detailed Description

Defines a collection of AnnotationGroups.

Definition at line 255 of file Annotation.cs.

Constructor & Destructor Documentation

◆ AnnotationGroupCollection()

MyCaffe.basecode.AnnotationGroupCollection.AnnotationGroupCollection ( )

The constructor.

Definition at line 270 of file Annotation.cs.

Member Function Documentation

◆ Add() [1/2]

void MyCaffe.basecode.AnnotationGroupCollection.Add ( AnnotationGroup  g)

Add a new AnnotationGroup to the collection.

Parameters
gSpecifies the AnnotationGroup to add.

Definition at line 381 of file Annotation.cs.

◆ Add() [2/2]

void MyCaffe.basecode.AnnotationGroupCollection.Add ( AnnotationGroupCollection  col)

Add another AnnotationGroupCollection to this one.

Parameters
colSpecifies the annotation group to add.

Definition at line 369 of file Annotation.cs.

◆ Clear()

void MyCaffe.basecode.AnnotationGroupCollection.Clear ( )

Clear all items from the collection.

Definition at line 408 of file Annotation.cs.

◆ Clone()

AnnotationGroupCollection MyCaffe.basecode.AnnotationGroupCollection.Clone ( )

Return a copy of the collection.

Returns
A copy of the collection is returned.

Definition at line 474 of file Annotation.cs.

◆ Find()

AnnotationGroup MyCaffe.basecode.AnnotationGroupCollection.Find ( int  nLabel)

Find the annotation group with the given label.

Parameters
nLabelSpecifies the label to look for.
Returns
Either the AnnotationGroup with the group label is returned, or null.

Definition at line 459 of file Annotation.cs.

◆ FromByteArray()

static AnnotationGroupCollection MyCaffe.basecode.AnnotationGroupCollection.FromByteArray ( byte[]  rg)
static

Returns an AnnotationGroupCollection from a byte array.

Parameters
rgSpecifies the byte array to load.
Returns
The list of annotation groups is returned.

Definition at line 649 of file Annotation.cs.

◆ GetEnumerator()

IEnumerator< AnnotationGroup > MyCaffe.basecode.AnnotationGroupCollection.GetEnumerator ( )

Returns the enumerator for the collection.

Returns
The enumerator is returned.

Definition at line 417 of file Annotation.cs.

◆ GetMaxScoringAnnotation()

Annotation MyCaffe.basecode.AnnotationGroupCollection.GetMaxScoringAnnotation ( )

Returns the maximum scoring annotation within a collection of groups.

Returns
The annotation with the maximum score is returned, or null if there are no annotations.

Definition at line 435 of file Annotation.cs.

◆ GetMinMaxLabels()

Tuple< int, int > MyCaffe.basecode.AnnotationGroupCollection.GetMinMaxLabels ( )

Return the min/max labels found int the collection.

Returns
A tuple containing the min/max lable found is returned.

Definition at line 503 of file Annotation.cs.

◆ LoadLabels()

static Dictionary< int, string > MyCaffe.basecode.AnnotationGroupCollection.LoadLabels ( BinaryReader  br)
static

Load the labels from a binary reader.

Parameters
brSpecifies the binary reader.
Returns
The labels are returned in a Dictionary.

Definition at line 598 of file Annotation.cs.

◆ LoadList()

static AnnotationGroupCollection MyCaffe.basecode.AnnotationGroupCollection.LoadList ( BinaryReader  br)
static

Load an AnnotationGroupCollection from a binary stream.

Parameters
brSpecifies the binary reader.
Returns
The list of annotation groups is returned.

Definition at line 572 of file Annotation.cs.

◆ Normalize()

void MyCaffe.basecode.AnnotationGroupCollection.Normalize ( Rectangle  rc)

Normalize all annotations to the given rectangle.

Parameters
rcSpecifies the rectangle used to normalize all annotations.

Definition at line 521 of file Annotation.cs.

◆ Remove()

bool MyCaffe.basecode.AnnotationGroupCollection.Remove ( AnnotationGroup  g)

Remove an AnnotationGroup from the collection if it exists.

Parameters
gSpecifies the AnnotationGroup to remove.
Returns
If found and removed true is returned, otherwise false.

Definition at line 391 of file Annotation.cs.

◆ RemoveAt()

void MyCaffe.basecode.AnnotationGroupCollection.RemoveAt ( int  nIdx)

Remove an item at a given index.

Parameters
nIdxSpecifies the index of the item to remove.

Definition at line 400 of file Annotation.cs.

◆ SaveLabels()

static void MyCaffe.basecode.AnnotationGroupCollection.SaveLabels ( BinaryWriter  bw,
AnnotationGroupCollection  rg 
)
static

Save the labels to a binary writer.

Parameters
bwSpecifies the binary writer.
rgSpecifies the AnnotationGroupCollection to save.

Definition at line 557 of file Annotation.cs.

◆ SaveList()

static void MyCaffe.basecode.AnnotationGroupCollection.SaveList ( BinaryWriter  bw,
AnnotationGroupCollection  rg 
)
static

Save an AnnotationGroupCollection to a binary writer.

Parameters
bwSpecifies the binary writer.
rgSpecifies the AnnotationGroupCollection to save.

Definition at line 534 of file Annotation.cs.

◆ ToByteArray()

static byte[] MyCaffe.basecode.AnnotationGroupCollection.ToByteArray ( AnnotationGroupCollection  rg,
bool  bIncludeLabels = false 
)
static

Saves a AnnotationGroupCollection to a byte array.

Parameters
rgSpecifies the list of AnnotationGroup to save.
bIncludeLabelsOptionally, include the labels.
Returns
The byte array is returned.

Definition at line 620 of file Annotation.cs.

Property Documentation

◆ Count

int MyCaffe.basecode.AnnotationGroupCollection.Count
get

Specifies the number of items in the collection.

Definition at line 349 of file Annotation.cs.

◆ CreatorID

int MyCaffe.basecode.AnnotationGroupCollection.CreatorID
getset

Specifies the Dataset Creator ID.

Definition at line 313 of file Annotation.cs.

◆ DatasetID

int MyCaffe.basecode.AnnotationGroupCollection.DatasetID
getset

Specifies the Dataset ID.

Definition at line 322 of file Annotation.cs.

◆ HasDataCriteria

bool MyCaffe.basecode.AnnotationGroupCollection.HasDataCriteria
getset

Get/set whether or not the image has a data criteria associated with it.

Definition at line 277 of file Annotation.cs.

◆ HasDebugData

bool MyCaffe.basecode.AnnotationGroupCollection.HasDebugData
getset

Get/set whether or not the image has debug data associated with it.

Definition at line 286 of file Annotation.cs.

◆ ImageID

int MyCaffe.basecode.AnnotationGroupCollection.ImageID
getset

Specifies the ImageID.

Definition at line 295 of file Annotation.cs.

◆ ImageIdx

int MyCaffe.basecode.AnnotationGroupCollection.ImageIdx
getset

Specifies the Image Index.

Definition at line 304 of file Annotation.cs.

◆ Labels

Dictionary<int, string> MyCaffe.basecode.AnnotationGroupCollection.Labels
getset

Get/set the label name mappings.

Definition at line 340 of file Annotation.cs.

◆ SourceID

int MyCaffe.basecode.AnnotationGroupCollection.SourceID
getset

Specifies the Data Source ID.

Definition at line 331 of file Annotation.cs.

◆ this[int nIdx]

AnnotationGroup MyCaffe.basecode.AnnotationGroupCollection.this[int nIdx]
getset

Get/set a specific item within the collection at a given index.

Parameters
nIdxSpecifies the index of the item to get/set.
Returns
The item at the index is returned.

Definition at line 359 of file Annotation.cs.


The documentation for this class was generated from the following file: