2using System.Collections.Generic;
18 string m_strSrc =
null;
33 public void Open(
string strSrc)
36 m_nSrcID = m_db.GetSourceID(strSrc);
55 return new Cursor<T>(m_db, transformer, m_strSrc, log);
83 m_transformer = transformer;
111 get {
return m_nCount; }
122 if (m_nIdx >= m_nCount)
146 SimpleDatum sd = m_db.
QueryItem(m_nSrcID, m_nIdx,
null, imgSel, nLabel, bLoadDataCriteria,
false);
149 m_log.WriteLine(m_strSrc +
": Idx = " + sd.
Index.ToString() +
" Label = " + sd.
Label.ToString());
The Log class provides general output in text form.
The SimpleDatum class holds a data input within host memory.
int Index
Returns the index of the SimpleDatum.
int Label
Return the known label of the data.
int ID
Get/set the database ID of the item.
string Name
Get/set the name of the item.
The SourceDescriptor class contains all information describing a data source.
int ImageCount
Returns the number of images within this data source.
The Cursor is used to traverse through a given data source within the database.
void Reset()
Resets the current index bact to the start.
void SeekToFirst()
Move the cursor to the beginning of the data source.
bool IsValid
Queryies to see if we are still within the bounds of the data source, if so true is returned,...
SimpleDatum GetValue(int? nLabel=null, bool bLoadDataCriteria=false, DB_ITEM_SELECTION_METHOD? imgSel=null)
Retrieve the Datum at the current cursor location within the data source.
int Count
Returns the number of items traversed.
void Next()
Traverses to the next item within the data source.
Cursor(IXImageDatabaseBase db, DataTransformer< T > transformer, string strSrc, Log log=null)
The Cursor constructor.
A generic database class used to connect to the underlying database and create a Cursor that traverse...
Cursor< T > NewCursor(DataTransformer< T > transformer, Log log=null)
Creates and returns a new Cursor used to traverse through a data source within the database.
DB(IXImageDatabaseBase imgDb)
The DB Constructor.
void Close()
Closes the last Open session.
void Open(string strSrc)
Opens the underlying database with a given data source.
SimpleDatum QueryItem(int nSrcId, int nIdx, DB_LABEL_SELECTION_METHOD? labelSelectionOverride=null, DB_ITEM_SELECTION_METHOD? imageSelectionOverride=null, int? nLabel=null, bool bLoadDataCriteria=false, bool bLoadDebugData=false)
Query an image in a given data source.
SourceDescriptor GetSourceByName(string strSrc)
Returns the SourceDescriptor for a given data source name.
The IXImageDatabaseBase interface defines the general interface to the in-memory image database.
The descriptors namespace contains all descriptor used to describe various items stored within the da...
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
DB_ITEM_SELECTION_METHOD
Defines the item (e.g., image or temporal item) selection method.
The MyCaffe.data namespace contains dataset creators used to create common testing datasets such as M...
The MyCaffe.db.image namespace contains all image database related classes.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...