Beispiel #1
0
 public void Set(int index, AnnotationRecordCache record)
 {
     if (index >= _size)
     {
         throw new IndexOutOfRangeException();
     }
     _batch.Put(Serialization.Serialize(index), Serialization.Serialize(record));
 }
 private static bool IsEmptyRecord(AnnotationRecordCache cache)
 {
     return(!cache.IsLabeled && cache.X == 0 && cache.Y == 0 && cache.W == 0 && cache.H == 0 &&
            !cache.IsFullyOccluded && !cache.IsOutOfView);
 }
 private static AnnotationRecord ConvertAnnotationRecordCacheToRecord(AnnotationRecordCache cache)
 {
     return(new AnnotationRecord(cache.IsLabeled, cache.X, cache.Y, cache.W, cache.H, cache.IsFullyOccluded, cache.IsOutOfView, null));
 }
 private static bool IsAnnotationRecordIdentityToCache(AnnotationRecord left, AnnotationRecordCache right)
 {
     return(!((left.IsLabeled != right.IsLabeled) || (left.X != right.X) || (left.Y != right.Y) ||
              (left.W != right.W) || (left.H != right.H) || (left.IsFullyOccluded != right.IsFullyOccluded) ||
              (left.IsOutOfView != right.IsOutOfView)));
 }
Beispiel #5
0
 public void Push(AnnotationRecordCache record)
 {
     _batch.Put(Serialization.Serialize(_size), Serialization.Serialize(record));
     ++_size;
 }
Beispiel #6
0
 public void Push(AnnotationRecordCache record)
 {
     _db.Put(Serialization.Serialize(_size), Serialization.Serialize(record), _writeOptions);
     ++_size;
 }