MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The Database class manages the actual connection to the physical database using Entity Framworks from Microsoft. More...
Public Types | |
enum | FORCE_LOAD { NONE , FROM_FILE , FROM_DB } |
Defines the force load type. More... | |
Public Member Functions | |
Database () | |
The Database constructor. More... | |
void | Dispose () |
Release any resources used. More... | |
bool | VerifyDataConnection (string strSrc, ConnectInfo ci) |
Verify the data connection information. More... | |
void | SaveChanges () |
Saves any changes on the open satabase. More... | |
virtual void | Open (int nSrcId, FORCE_LOAD nForceLoad=FORCE_LOAD.NONE, ConnectInfo ci=null) |
Opens a data source. More... | |
void | Open (string strSrc, bool bForceLoadImageFilePath=false) |
Opens a data source. More... | |
virtual void | Close () |
Close the previously opened data source. More... | |
void | Refresh () |
Close and re Open with the current data source. More... | |
string | GetDatabaseFilePath (string strName) |
Query the physical database file path. More... | |
string | GetDatabaseImagePath (string strName) |
Query the physical database file path for Images. More... | |
void | UpdateLabelName (int nLabel, string strName, int nSrcId=0) |
Update the name of a label. More... | |
Label | GetLabel (int nID) |
Return the Label with the given ID. More... | |
string | GetLabelName (int nLabel, int nSrcId=0) |
Get the Label name of a label within a data source. More... | |
Label | FindLabelInCache (int nLabel) |
Search for a Label in the label cache. More... | |
int | GetLabelID (int nLabel) |
Returns the label ID associated with a label value. More... | |
int | GetLabelCount (int nLabel) |
Returns the number of images under a given label. More... | |
void | AddLabelToCache (int nLabel) |
Adds a label to the label cache. More... | |
void | SaveLabelCache () |
Saves the label cache to the database. More... | |
void | UpdateLabelCounts (Dictionary< int, int > rgCounts, DNNEntities entities) |
Updates the label counts in the database for the open data source. More... | |
void | LoadLabelCounts (Dictionary< int, int > rgCounts, int nSrcId=0) |
Load the label counts from the database for a data source. More... | |
string | GetLabelCountsAsText (int nSrcId=0, ConnectInfo ci=null) |
Returns the label counts for a given data source. More... | |
void | UpdateLabelCounts (Dictionary< int, int > rgCounts, int nSrcId=0) |
Update the label counts for a given data source. More... | |
void | UpdateLabelCounts (int nSrcId=0, int nProjectId=0, ConnectInfo ci=null) |
Update the label counts for a given data source and project (optionally) by querying the database for the actual counts. More... | |
List< Label > | GetLabels (bool bSort=true, bool bWithImagesOnly=false, int nSrcId=0, ConnectInfo ci=null) |
Returns a list of all labels used by a data source. More... | |
void | DeleteLabels (int nSrcId=0) |
Delete the labels of a data source from the database. More... | |
int | AddLabel (int nLabel, string strName="", int nSrcId=0, ConnectInfo ci=null) |
Add a label to the database for a data source. More... | |
void | AddLabelBoost (int nProjectId, int nLabel, double dfBoost, int nSrcId=0) |
Add a label boost to the database for a given project. More... | |
void | SetLabelMapping (LabelMapping map, int nSrcId=0) |
Saves a label mapping in the database for a data source. More... | |
void | UpdateLabelMapping (int nNewLabel, List< int > rgOriginalLabels, int nSrcId=0) |
Update a label mapping in the database for a data source. More... | |
void | ResetLabels (int nProjectId=0, int nSrcId=0) |
Resets all labels back to their original labels for a project. More... | |
void | DeleteLabelBoosts (int nProjectId, int nSrcId=0) |
Delete all label boosts for a project. More... | |
void | DeleteLabelBoosts (int nProjectId) |
Delete all label boosts for a project. More... | |
void | ResetLabelBoosts (int nProjectId) |
Reset all label boosts to their orignal settings for a project. More... | |
List< LabelBoost > | GetLabelBoosts (int nProjectId, bool bSort=true, int nSrcId=0) |
Returns a list of all label boosts set on a project. More... | |
string | GetLabelBoostsAsText (int nProjectId, int nSrcId=0, bool bSort=true) |
Returns the Label boosts as a string. More... | |
void | ActivateLabels (List< int > rgLabels, bool bActive, params int[] rgSrcId) |
Activate (or deactivate) the labels specified for each of the source ID's specified. More... | |
void | UpdateLabelBoost (int? nTgtLbl, bool bTgtLblExact, int? nTgtBst, bool bTgtBstExact, int? nNewLbl, int? nNewBst, params int[] rgSrcId) |
Update the label and boost for a given search target criteria. More... | |
int | GetImageCount () |
Returns the number of raw images in the database for the open data source. More... | |
List< DbItem > | GetAllRawImageIndexes (bool bBoostedOnly, bool bIncludeActive=true, bool bIncludeInactive=false) |
Returns the list of the image indexes of all images. More... | |
List< RawImage > | QueryRawImages (params int[] rgSrcId) |
Returns the list of raw images that have a source ID from a selected list. More... | |
List< RawImageParameter > | QueryRawImageParameters (int nSrcId, string strName) |
Query a list of all raw image parameters of a give name stored with a given source ID. More... | |
List< RawImageParameter > | QueryRawImageParameters (int nImageID) |
Query all image parameters for a given image. More... | |
List< RawImage > | QueryRawImages (int nSrcId, bool? bActive=null, int nBoostVal=0, bool bExactBoostVal=false) |
Returns the list of raw images that have a source ID from a selected list. More... | |
List< RawImage > | GetRawImagesAt (int nIdx, int nCount, int nSrcId=0, string strDescription=null) |
Returns a list of RawImages from the database for a data source. More... | |
List< RawImage > | GetRawImagesAt (List< int > rgImageIdx, int nSrcId=0, string strDescription=null) |
Returns a list of RawImages from the database for a data source. More... | |
List< RawImage > | GetRawImagesAtID (List< int > rgImageID, int nSrcId=0, string strDescription=null) |
Returns a list of RawImages from the database for a data source. More... | |
RawImage | GetRawImageAt (int nIdx, int nSrcId=0) |
Returns the RawImage at a given image index. More... | |
int | GetRawImageID (DateTime dt, int nSrcId=0) |
Returns the RawImage ID for the image with the given time-stamp. More... | |
byte[] | GetRawImageData (RawImage img, bool bLoadDataCriteria, bool bLoadDebugData, out byte[] rgDataCriteria, out int? nDataCriteriaFmtId, out byte[] rgDebugData, out int? nDebugDataFmtId) |
Returns the raw data of the RawImage. More... | |
byte[] | GetRawImageDataCriteria (RawImage img, out int? nDataCriteriaFmtId) |
Returns the raw data criteria data of the RawImage. More... | |
byte[] | GetRawImageDebugData (RawImage img, out int? nDebugDataFormatId) |
Returns the raw debug data data of the RawImage. More... | |
byte[] | GetRawImageDebugData (byte[] rgData, int? nOriginalSourceID=null) |
Converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data. More... | |
byte[] | GetRawImageDebugData (int nImgID, int? nOriginalSourceID=null) |
Queries the Debug Data for an image an Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data. More... | |
byte[] | GetRawImageDataCriteria (byte[] rgData, int? nOriginalSourceID=null) |
Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data. More... | |
byte[] | GetRawImageDataCriteria (int nImgID, int? nOriginalSourceID=null) |
Queries the Data Criteria for an image an Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data. More... | |
bool | ChangeRawImageSourceID (int nID, int nNewSrcID, bool bSave=true) |
Change the data source ID on a raw image - currently only allowed on virtual raw images. More... | |
bool | UpdateActiveLabel (int nID, int nLabel, bool bActivate=true, bool bSaveChanges=true) |
Update the label value of a label. More... | |
void | UpdateActiveLabelByID (int nID, int nLabel) |
Update the label value of a label. More... | |
void | UpdateActiveLabelByIndex (int nSrcId, int nIdx, int nLabel) |
Update the label value of a label. More... | |
void | UpdateAllActiveLabels (int nSrcId, int nLabel, int? nOriginalLabel) |
Update the all items to a label value for the given nSrcId. More... | |
void | ResetAllActiveLabels (int nSrcId) |
Reset the all active labels to their original label within a source. More... | |
void | DisableLabel (int nSrcId, int nLabel, bool bOriginalLabel=false) |
Disable a set of labels within the source specified by the ID. More... | |
void | DisableAllLabels (int nSrcId) |
Disable all labels within the source specified by the ID. More... | |
int | DisableAllNonMatchingImages (int nSrcId, int nWidth, int nHeight) |
Disable all images that do not have a matching widxht size. More... | |
void | ActivateRawImageByIndex (int nSrcId, int nIdx, bool bActive) |
Activate/deactivate a raw image based on its index. More... | |
void | UpdateActiveLabelDirect (int nID, int nLabel) |
Directly update the active label and activate the image with the specified ID. More... | |
bool | UpdateRawImageDescription (int nID, string strDescription) |
Update the description of a RawImage. More... | |
bool | UpdateRawImageDescriptionFromParameter (int nID, string strParamName) |
Update the RawImage description from a RawImage parameter. More... | |
List< int > | QueryAllRawImageIDs (int nSrcId=0, int nMax=int.MaxValue, int nLabel=-1, int nBoost=-1, bool bBoostIsExact=false, bool bAnnotatedOnly=false, bool bActiveOnly=true) |
Returns the ID's of all RawImages within a data source. More... | |
RawImage | CreateRawImage (int nIdx, SimpleDatum d, int nBackgroundWritingThreadCount, string strDescription=null, int? nOriginalSourceID=null, bool bActive=true) |
Create a new RawImage but do not add it to the database. More... | |
bool | WaitForFileWriter (int nWait=int.MaxValue) |
Wait for the file writer to complete writing all files. More... | |
bool | ConvertRawImagesSaveToFile (int nIdx, int nCount, CancelEvent evtCancel=null) |
The ConvertRawImagesSaveToFile method saves the image in the database to the file system and replaces the database data with the path to the saved image, thus saving database space. More... | |
bool | ConvertRawImagesSaveToDatabase (int nIdx, int nCount, CancelEvent evtCancel=null) |
The ConvertRawImagesSaveToDatabase method saves the image in the file system to the database and deletes the file from the file system. More... | |
void | FixupRawImageCopy (int nImageID, int nSecondarySrcId) |
The FixupRawImageCopy method is used to fixup the OriginalSourceId by setting it to a secondary source ID in the event that the path created using the PrimarySourceID does not have the image data file. More... | |
void | PutRawImageParameters (List< ParameterData > rgParam, ConnectInfo ci=null) |
Save a list of raw image parameters. More... | |
void | PutRawImages (List< RawImage > rgImg, List< List< ParameterData > > rgrgParam=null, ConnectInfo ci=null) |
Saves a List of RawImages to the database. More... | |
int | PutRawImage (int nIdx, SimpleDatum d, string strDescription=null) |
Save a SimpleDatum as a RawImage in the database. More... | |
RawImage | GetRawImage (int nID) |
Returns the RawImage with a given ID. More... | |
int | QueryRawImageCount (int nSrcId=0) |
Returns the number of RawImages in a data source. More... | |
void | DeleteRawImages (int nSrcId=0) |
Delete all RawImages in a data source. More... | |
void | DeleteRawImageResults (int nSrcId=0) |
Delete all RawImageResults for a data source. More... | |
RawImageMean | GetRawImageMean (int nSrcId=0, ConnectInfo ci=null) |
Return the RawImageMean for the image mean from the open data source. More... | |
int | PutRawImageMean (SimpleDatum sd, bool bUpdate, int nSrcId=0, ConnectInfo ci=null) |
Save the SimpleDatum as a RawImageMean in the database. More... | |
bool | CopyImageMean (int nSrcIdSrc, int nSrcIdDst, ConnectInfo ci=null) |
Copy the raw image mean from one source to another. More... | |
void | DeleteRawImageMeans (int nSrcId=0) |
Delete all RawImageMeans for a data source. More... | |
int | GetBoostCount (int nSrcId=0, string strFilterVal=null, int? nBoostVal=null) |
Return the number of boosted images for a data source. More... | |
int | ActivateFiltered (int nSrcId=0, string strFilterVal=null, int? nBoostVal=null) |
Activate the images that meet the filtering criteria in the Data Source. If no filtering criteria is set, all images are activated. More... | |
int | GetImageCount (int nSrcId=0, bool bActive=true, bool bInactive=true, ConnectInfo ci=null) |
Get the number of images in the source. More... | |
void | ResetAllBoosts (int nSrcId=0, int nMinBoost=0, bool bExactVal=false, int nDesiredBoostVal=-1) |
Reset all image boosts for a data set. More... | |
void | UpdateBoost (long nImageID, int nBoost) |
Update the image boost of a given image. More... | |
void | UpdateBoosts (int nSrcId, DateTime dtStart, DateTime dtEnd, int nBoost) |
Update the boost of all images between a date range. More... | |
List< RawImage > | ReindexRawImages (Log log, CancelEvent evtCancel, int nSrcId=0) |
Reindex the RawImages of a data source. More... | |
bool | UpdateRawImageSourceID (int nImageID, int nSrcID) |
Updates a given image's source ID. More... | |
bool | ActivateRawImage (int nImageID, bool bActivate, bool bSave=true) |
Activate/Deactivate a given image. More... | |
void | ActivateAllRawImages (bool bActive, bool bAnnotatedOnly, params int[] rgSrcId) |
Activate all raw images associated with a set of source ID's. More... | |
void | ActivateAllRawImages (bool bActive, bool bAnnotatedOnly, int? nTgtLabel, bool bTargetLabelExact, int? nTgtBoost, bool bTargetBoostExact, params int[] rgSrcId) |
Activate all raw images associated with a set of source ID's. More... | |
void | UpdateDatasetImageAnnotations (int nSrcId, int nImageId, AnnotationGroupCollection annotations, bool bSetLabelOnly) |
Update the annotations of a given raw image. More... | |
int | PutRawImageResults (int nSrcId, int nIdx, int nLabel, DateTime dt, List< Result > rgResults, bool bInvert, List< Tuple< DateTime, int > > rgExtra=null) |
Save the results of a Run as a RawImageResult. More... | |
int | PutRawImageResults (int nSrcId, int nIdx, int nLabel, DateTime dt, List< Tuple< SimpleDatum, List< Result > > > rgrgResults, List< Tuple< DateTime, int > > rgExtra=null) |
Save the results of a Run as a RawImageResult. More... | |
List< Tuple< SimpleDatum, List< Result > > > | GetRawImageResultBatch (int nBatchCount, byte[] rgResults) |
Extracts the raw image result batch from the result binary data. More... | |
int | PutRawImageResultExtraData (int nRawImageResultID, byte[] rgExtraData) |
Set the raw image result extra data field. More... | |
List< RawImageResult > | GetRawImageResults (int nSrcId=0, bool bRequireExtraData=false, int nMax=-1) |
Returns the RawImageResults for a data source. More... | |
string | GetRawImageParameter (int nRawImageID, string strName, string strDefault) |
Return the string value of a RawImage parameter. More... | |
int | GetRawImageParameter (int nRawImageID, string strName, int nDefault) |
Return the int value of a RawImage parameter. More... | |
double | GetRawImageParameter (int nRawImageID, string strName, double dfDefault) |
Return the double value of a RawImage parameter. More... | |
bool | GetRawImageParameter (int nRawImageID, string strName, bool bDefault) |
Return the bool value of a RawImage parameter. More... | |
byte[] | GetRawImageParameterData (int nRawImageID, string strName) |
Return the byte array data of a RawImage parameter. More... | |
RawImageParameter | GetRawImageParameterEx (int nRawImageID, string strName) |
Returns the RawImageParameter entity given the image ID and parameter name.. More... | |
int | SetRawImageParameter (int nRawImageID, string strName, string strValue, double? dfVal=null, byte[] rgData=null, bool bSave=true, bool bOnlyAddNew=false, DNNEntities entities=null) |
Add a new RawImage parameter (or update an existing if found). More... | |
int | SetRawImageParameter (int nSrcId, int nRawImageID, string strName, string strValue, double? dfVal=null, byte[] rgData=null) |
Add a new RawImage parameter (or update an existing if found). More... | |
int | SetRawImageParameterAt (DateTime dt, string strName, string strValue, double? dfVal, byte[] rgData) |
Set the RawImage parameter for all RawImages with the given time-stamp in the data source. More... | |
void | DeleteRawImageParameters (int nSrcId) |
Delete all RawImage parameters within a data source. More... | |
int | GetRawImageParameterCount (string strName, int nSrcId=0, string strType="TEXT") |
Returns the RawImage parameter count for a data source. More... | |
bool | GetRawImageParameterExist (string strName, int nSrcId=0, string strType="TEXT") |
Returns whether or not a given RawImage parameter exists. More... | |
List< string > | GetRawImageDistinctParameterDescriptions (int nSrcId=0) |
Returns a list of distinct RawImage parameter descriptions for a data source. More... | |
int | AddRawImageGroup (Image img, int nIdx, DateTime dtStart, DateTime dtEnd, List< double > rgProperties) |
Adds a new RawImage group to the database. More... | |
int | PutRawImageGroup (RawImageGroup g) |
Adds a RawImageGroup to the database. More... | |
RawImageGroup | FindRawImageGroup (int nIdx, DateTime dtStart, DateTime dtEnd) |
Searches for a RawImageGroup by index, start time-stamp and end time-stamp. More... | |
int | FindRawImageGroupID (int nIdx, DateTime dtStart, DateTime dtEnd) |
Searches fro the RawImageGroup ID. More... | |
void | DeleteRawImageGroups () |
Deletes all RawImage groups More... | |
void | DeleteSourceData () |
Deletes the data source data for the open data source. More... | |
void | UpdateSaveImagesToFile (bool bSaveToFile, int nSrcId=0) |
Update the SaveImagesToFile flag in a given Data Source. More... | |
void | UpdateSource (int nChannels, int nWidth, int nHeight, bool bDataIsReal, int nSrcId=0) |
Updates a data source. More... | |
void | UpdateSourceCounts (int nImageCount, ConnectInfo ci=null) |
Updates the source counts for the open data source. More... | |
void | UpdateSourceCounts (ConnectInfo ci=null) |
Updates the source counts for the open data source by querying the database for the counts. More... | |
int | GetSourceID (string strName, ConnectInfo ci=null) |
Returns the ID of a data source given its name. More... | |
string | GetSourceName (int nID, ConnectInfo ci=null) |
Returns the name of a data source given its ID. More... | |
Source | GetSource (string strName, ConnectInfo ci=null) |
Returns the Source entity given a data source name. More... | |
Source | GetSource (int nID, ConnectInfo ci=null) |
Returns the Source entity given a data source ID. More... | |
int | PutSource (Source src, ConnectInfo ci=null) |
Adds or updates (if exists) a data source to the database. More... | |
int | AddSource (string strName, int nChannels, int nWidth, int nHeight, bool bDataIsReal, int nCopyOfSourceID=0, bool bSaveImagesToFile=true, ConnectInfo ci=null) |
Adds a new data source to the database. More... | |
virtual bool | DeleteSource (int nSrcId=0) |
Delete a data source from the database. More... | |
void | DeleteSources (params string[] rgstrSrc) |
Delete the list of data sources, listed by name, from the database. More... | |
virtual bool | DeleteSourceData (int nSrcId=0) |
Delete the data source data (images, means, results and parameters) from the database. More... | |
void | DeleteSourceData (string strSrc) |
Delete the data source data (images, means, results and parameters) from the database. More... | |
Dictionary< string, string > | GetSourceParameters (int nSrcId=0, ConnectInfo ci=null) |
Returns a dictionary of the data source parameters. More... | |
string | GetSourceParameter (string strName, int nSrcId=0) |
Return the data source parameter as a string. More... | |
int | GetSourceParameter (string strName, int nDefault, int nSrcId=0) |
Return the data source parameter as an int. More... | |
double | GetSourceParameter (string strName, double dfDefault, int nSrcId=0) |
Return the data source parameter as a double. More... | |
bool | GetSourceParameter (string strName, bool bDefault, int nSrcId=0) |
Return the data source parameter as a bool. More... | |
void | SetSourceParameter (string strName, string strValue, int nSrcId=0) |
Set the value of a data source parameter. More... | |
DateTime | GetFirstTimeStamp (int nSrcId=0, string strDesc=null) |
Returns the first time-stamp in the data source. More... | |
DateTime | GetLastTimeStamp (int nSrcId=0, string strDesc=null) |
Returns the last time-stamp in the data source. More... | |
DateTime | GetLastTimeStamp (DateTime dtStart, DateTime dtEnd, bool bEndInclusive, int nSrcId=0, string strDesc=null) |
Returns the last time-stamp in the data source. More... | |
DateTime | GetLastTimeStamp (out int nIndex, int nSrcId=0, string strDesc=null) |
Returns the last time-stamp and index in the data source. More... | |
DateTime | GetLastTimeStamp (DateTime dtStart, DateTime dtEnd, bool bEndInclusive, out int nIndex, int nSrcId=0, string strDesc=null) |
Returns the last time-stamp and index in the data source falling within a time range. More... | |
string | FindDatasetNameFromSourceName (string strTrainSrc, string strTestSrc) |
Searches for the data set name based on the training and testing source names. More... | |
int | FindDatasetFromSourceId (int nSourceId) |
Searches for the dataset containing the sourceId. More... | |
int | GetDatasetID (string strName, ConnectInfo ci=null) |
Returns a datasets ID given its name. More... | |
string | GetDatasetName (int nID, ConnectInfo ci=null) |
Returns the name of a dataset given its ID. More... | |
Dataset | GetDataset (int nID, ConnectInfo ci=null) |
Returns the Dataset entity for a dataset ID. More... | |
Dataset | GetDataset (string strName) |
Returns the Dataset entity for a dataset name. More... | |
Dataset | GetDataset (string strTestingSrc, string strTrainingSrc) |
Returns the Dataset entity containing the training and testing source names. More... | |
int | AddDataset (int nDsCreatorID, string strName, int nTestSrcId, int nTrainSrcId, int nDsGroupID=0, int nModelGroupID=0, ConnectInfo ci=null, bool bVerify=true) |
Add a new (or update an existing if exists) dataset to the database. More... | |
void | UpdateDatasetDescription (int nDsId, string strDesc) |
Update the description of a given dataset. More... | |
void | UpdateDatasetCounts (int nDsId, ConnectInfo ci=null) |
Update the dataset counts. More... | |
int | PutDataset (Dataset ds) |
Save the Dataset entity to the database. More... | |
DatasetGroup | GetDatasetGroup (int nGroupID, ConnectInfo ci=null) |
Returns the DatasetGroup entity given a group ID. More... | |
string | GetDatasetGroupName (int nGroupID) |
Returns the name of a dataset group given its ID. More... | |
Dictionary< string, string > | GetDatasetParameters (int nDsId, ConnectInfo ci=null) |
Returns all dataset parameters for a given dataset. More... | |
string | GetDatasetParameter (int nDsId, string strName) |
Returns the value of a dataset parameter as a string. More... | |
int | GetDatasetParameter (int nDsId, string strName, int nDefault) |
Returns the value of a dataset parameter as an int. More... | |
double | GetDatasetParameter (int nDsId, string strName, double dfDefault) |
Returns the value of a dataset parameter as a double. More... | |
bool | GetDatasetParameter (int nDsId, string strName, bool bDefault) |
Returns the value of a dataset parameter as a bool. More... | |
void | SetDatasetParameter (int nDsId, string strName, string strValue) |
Adds a new parameter or Sets the value of an existing dataset parameter. More... | |
void | SetDatasetParameters (int nDsId, Dictionary< string, string > rgP) |
Adds a batch of new parametes. More... | |
virtual void | DeleteDataset (string strDsName, bool bDeleteRelatedProjects, Log log, CancelEvent evtCancel) |
Delete a dataset. More... | |
List< Dataset > | GetAllDatasets (int nDatasetGroupID) |
Returns a list of all datasets within a group. More... | |
List< Dataset > | GetAllDatasetsWithCreators (int nDatasetGroupID) |
Returns a list of all datasets within a group with dataset creators. More... | |
List< Dataset > | GetAllDatasetsWithCreator (int nDsCreatorID, bool? bRelabeled=null) |
Returns a list of all datasets within a group with dataset creators. More... | |
int | GetDatasetGroupID (string strName) |
Returns the ID of a dataset group given its name. More... | |
string | GetDatasetCreatorName (int nDatasetCreatorID, ConnectInfo ci=null) |
Returns the name of a dataset creator given its ID. More... | |
int | GetDatasetCreatorID (string strName) |
Returns the ID of a dataset creator given its name. More... | |
void | ResetAllDatasetRelabelWithCreator (int nDsCreatorID) |
Reset all dataset relabel flags with a given creator. More... | |
void | UpdateDatasetRelabel (int nDsID, bool bRelabel) |
Update the dataset relabel flag for a dataset. More... | |
DateTime | GetDatasetMinimumTimestamp (int nDsID) |
Returns the minimum time-stamp for a dataset. More... | |
DateTime | GetDatasetMaximumTimestamp (int nDsID) |
Returns the maximum time-stamp for a dataset. More... | |
void | UpdateDatasetCounts (CancelEvent evtCancel, Log log, int nDatasetCreatorID, List< string > rgstrDs, string strParamNameForDescription) |
Updates the dataset counts for a set of datasets. More... | |
ModelGroup | GetModelGroup (int nGroupID, ConnectInfo ci=null) |
Returns the ModelGroup entity given the ID of a model group. More... | |
string | GetModelGroupName (int nGroupID) |
Returns the name of a model group given its ID. More... | |
int | GetModelGroupID (string strGroup) |
Retruns the ID of a model group given its name. More... | |
List< Dataset > | GetAllDatasetsInModelGroup (int nModelGroupId) |
Returns all Dataset entities within a given model group. More... | |
void | DeleteModelGroup (string strGroup, Log log, CancelEvent evtCancel) |
Deletes a model group from the database. More... | |
Static Public Member Functions | |
static byte[] | PackExtraData (List< Tuple< DateTime, int > > rg) |
Pack the extra data into a byte array. More... | |
static List< Tuple< DateTime, int > > | UnpackExtraData (byte[] rg) |
Unpack the extra data from a byte array. More... | |
Protected Member Functions | |
virtual void | setImagePath (FORCE_LOAD nForceLoad) |
Sets the image path member to the path used when saving binary data to the file system. More... | |
virtual string | getImagePath (string strSrcName=null) |
Returns the base image path used when saving binary data to the file system. More... | |
byte[] | getRawImage (byte[] rgData, int? nSecondarySrcId=null, ConnectInfo ci=null, DNNEntities entities=null, bool bTestConnection=false) |
Converts a set of bytes from a file path-name by loading its bytes and returning them, or if the original bytes do not contain a path, just returns the original bytes. More... | |
string | getImagePath (byte[] rgData) |
Returns the file path contained within a byte array or null if no path is found. More... | |
byte[] | setImageByteData (byte[] rgImg, string strType=null, string strGuid=null, int nBackgroundWritingThreadCount=0) |
When enabled, saves the bytes to file and returns the file name of the binary file saved as an array of bytes.. More... | |
Protected Attributes | |
Source | m_src = null |
Specifies the default data source. More... | |
string | m_strPrimaryImgPath = null |
Specifies the base path to the file based data. More... | |
string | m_strSecondaryImgPath = null |
Specifies the secondary base path to the file based data (used when copying a data source) More... | |
bool | m_bEnableFileBasedData = false |
Specifies whether or not file based data is enabled. More... | |
int | m_nLastIndex = -1 |
Specifies the last index added to the data source. More... | |
Properties | |
int | LastIndex [get] |
Returns the last image index added to the database. More... | |
Source | CurrentSource [get] |
Returns the current entity framwork Source object set during the previous call to Open(). More... | |
The Database class manages the actual connection to the physical database using Entity Framworks from Microsoft.
Definition at line 22 of file Database.cs.
Defines the force load type.
Enumerator | |
---|---|
NONE | Specifies that no force load is specified. |
FROM_FILE | Specifies to force load from file. |
FROM_DB | Specifies to force load from db. |
Definition at line 56 of file Database.cs.
MyCaffe.db.image.Database.Database | ( | ) |
The Database constructor.
Definition at line 75 of file Database.cs.
void MyCaffe.db.image.Database.ActivateAllRawImages | ( | bool | bActive, |
bool | bAnnotatedOnly, | ||
int? | nTgtLabel, | ||
bool | bTargetLabelExact, | ||
int? | nTgtBoost, | ||
bool | bTargetBoostExact, | ||
params int[] | rgSrcId | ||
) |
Activate all raw images associated with a set of source ID's.
bActive | Specifies whether or not to activate the images. |
bAnnotatedOnly | Specifies to activate annotated images only. |
nTgtLabel | If not null, specifies the target label. |
bTargetLabelExact | Specifies that the exact nTgtLabel value should be used, otherwise the nTgtLabel value or greater is used. |
nTgtBoost | If not null, specifies the target boost. |
bTargetBoostExact | Specifies that the exact nTgtBoost value should be used, otherwise the nTgtBoost value or greater is used. |
rgSrcId | Specifies the source ID's. |
Definition at line 3064 of file Database.cs.
void MyCaffe.db.image.Database.ActivateAllRawImages | ( | bool | bActive, |
bool | bAnnotatedOnly, | ||
params int[] | rgSrcId | ||
) |
Activate all raw images associated with a set of source ID's.
bActive | Specifies whether or not to activate the images. |
bAnnotatedOnly | Specifies to activate annotated images only. |
rgSrcId | Specifies the source ID's. |
Definition at line 3024 of file Database.cs.
int MyCaffe.db.image.Database.ActivateFiltered | ( | int | nSrcId = 0 , |
string | strFilterVal = null , |
||
int? | nBoostVal = null |
||
) |
Activate the images that meet the filtering criteria in the Data Source. If no filtering criteria is set, all images are activated.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strFilterVal | Optionally, specifies a parameter filtering value (default = null). |
nBoostVal | Optionally, specifies a boost filtering value (default = null). |
Definition at line 2768 of file Database.cs.
void MyCaffe.db.image.Database.ActivateLabels | ( | List< int > | rgLabels, |
bool | bActive, | ||
params int[] | rgSrcId | ||
) |
Activate (or deactivate) the labels specified for each of the source ID's specified.
rgLabels | Specifies the labels. |
bActive | Specifies whether to activate (true) or deactivate (false) the labels. |
rgSrcId | Specifies the source ID's who's labels are to be activated. |
Definition at line 1013 of file Database.cs.
bool MyCaffe.db.image.Database.ActivateRawImage | ( | int | nImageID, |
bool | bActivate, | ||
bool | bSave = true |
||
) |
Activate/Deactivate a given image.
nImageID | Specifies the ID of the image to activate/deactivate. |
bActivate | Specifies whether to activate (true) or deactivate (false) the image. |
bSave | Specifies whether or not to save the changes (when false, calling SaveChanges() is needed). |
Definition at line 2998 of file Database.cs.
void MyCaffe.db.image.Database.ActivateRawImageByIndex | ( | int | nSrcId, |
int | nIdx, | ||
bool | bActive | ||
) |
Activate/deactivate a raw image based on its index.
nSrcId | Specifies the source ID. |
nIdx | Specifies the ID of the label. |
bActive | Specifies the new active state to set. |
Definition at line 1866 of file Database.cs.
int MyCaffe.db.image.Database.AddDataset | ( | int | nDsCreatorID, |
string | strName, | ||
int | nTestSrcId, | ||
int | nTrainSrcId, | ||
int | nDsGroupID = 0 , |
||
int | nModelGroupID = 0 , |
||
ConnectInfo | ci = null , |
||
bool | bVerify = true |
||
) |
Add a new (or update an existing if exists) dataset to the database.
nDsCreatorID | Specifies the ID of the creator. |
strName | Specifies the name of the dataset. |
nTestSrcId | Specifies the ID of the testing data source. |
nTrainSrcId | Specifies the ID of the training data source. |
nDsGroupID | Optionally, specifies the ID of the dataset group (default = 0). |
nModelGroupID | Optionally, specifies the ID of the model group (default = 0). |
ci | Optionally, specifies a specific connection to use (default = null). |
bVerify | Optionally, specifies to verify the image sizings CxHxW (default = true). |
Definition at line 4719 of file Database.cs.
int MyCaffe.db.image.Database.AddLabel | ( | int | nLabel, |
string | strName = "" , |
||
int | nSrcId = 0 , |
||
ConnectInfo | ci = null |
||
) |
Add a label to the database for a data source.
nLabel | Specifies the label. |
strName | Optionally, specifies a label name (default = ""). |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 753 of file Database.cs.
void MyCaffe.db.image.Database.AddLabelBoost | ( | int | nProjectId, |
int | nLabel, | ||
double | dfBoost, | ||
int | nSrcId = 0 |
||
) |
Add a label boost to the database for a given project.
nProjectId | Specifies the ID of the project for which the label boost is to be added. |
nLabel | Specifies the label. |
dfBoost | Specifies the boost. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 794 of file Database.cs.
void MyCaffe.db.image.Database.AddLabelToCache | ( | int | nLabel | ) |
Adds a label to the label cache.
nLabel | Specifies the label. |
Definition at line 494 of file Database.cs.
int MyCaffe.db.image.Database.AddRawImageGroup | ( | Image | img, |
int | nIdx, | ||
DateTime | dtStart, | ||
DateTime | dtEnd, | ||
List< double > | rgProperties | ||
) |
Adds a new RawImage group to the database.
img | Specifies an image associated with the group. |
nIdx | Specifies an index associated with the group. |
dtStart | Specifies the start time stamp for the group. |
dtEnd | Specifies the end time stamp for the group. |
rgProperties | Specifies the properties of the group. |
Definition at line 3755 of file Database.cs.
int MyCaffe.db.image.Database.AddSource | ( | string | strName, |
int | nChannels, | ||
int | nWidth, | ||
int | nHeight, | ||
bool | bDataIsReal, | ||
int | nCopyOfSourceID = 0 , |
||
bool | bSaveImagesToFile = true , |
||
ConnectInfo | ci = null |
||
) |
Adds a new data source to the database.
strName | Specifies the data source name. |
nChannels | Specifies the number of channels per item. |
nWidth | Specifies the width of each item. |
nHeight | Specifies the height of each item. |
bDataIsReal | Specifies whether or not the item uses real or byte data. |
nCopyOfSourceID | Optionally, specifies the ID of the source from which this source was copied. If this is an original source, this parameter should be 0. |
bSaveImagesToFile | Optionally, specifies whether or not to save the images to the file system (true) or directly into the database (false) The default = true. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4134 of file Database.cs.
bool MyCaffe.db.image.Database.ChangeRawImageSourceID | ( | int | nID, |
int | nNewSrcID, | ||
bool | bSave = true |
||
) |
Change the data source ID on a raw image - currently only allowed on virtual raw images.
nID | Specifies the raw image ID. |
nNewSrcID | Specifies the ID of the new source. |
bSave | Optionally, specifies whether or not to save the changes (default = true). |
Definition at line 1713 of file Database.cs.
|
virtual |
Close the previously opened data source.
Reimplemented in MyCaffe.db.temporal.DatabaseTemporal.
Definition at line 277 of file Database.cs.
bool MyCaffe.db.image.Database.ConvertRawImagesSaveToDatabase | ( | int | nIdx, |
int | nCount, | ||
CancelEvent | evtCancel = null |
||
) |
The ConvertRawImagesSaveToDatabase method saves the image in the file system to the database and deletes the file from the file system.
nIdx | Specifies the first index of a RawImage to convert. |
nCount | Specifies the number of RawImages to convert including and following the RawImage at the index. |
evtCancel | Optionally, specifies a cancellation event. |
Definition at line 2226 of file Database.cs.
bool MyCaffe.db.image.Database.ConvertRawImagesSaveToFile | ( | int | nIdx, |
int | nCount, | ||
CancelEvent | evtCancel = null |
||
) |
The ConvertRawImagesSaveToFile method saves the image in the database to the file system and replaces the database data with the path to the saved image, thus saving database space.
nIdx | Specifies the first index of a RawImage to convert. |
nCount | Specifies the number of RawImages to convert including and following the RawImage at the index. |
evtCancel | Optionally, specifies a cancellation event. |
Definition at line 2126 of file Database.cs.
bool MyCaffe.db.image.Database.CopyImageMean | ( | int | nSrcIdSrc, |
int | nSrcIdDst, | ||
ConnectInfo | ci = null |
||
) |
Copy the raw image mean from one source to another.
nSrcIdSrc | Specifies the Data Source ID with the source image mean to copy. |
nSrcIdDst | Specifies the Data Source ID with the destination image mean where the source is copied to. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2662 of file Database.cs.
RawImage MyCaffe.db.image.Database.CreateRawImage | ( | int | nIdx, |
SimpleDatum | d, | ||
int | nBackgroundWritingThreadCount, | ||
string | strDescription = null , |
||
int? | nOriginalSourceID = null , |
||
bool | bActive = true |
||
) |
Create a new RawImage but do not add it to the database.
nIdx | Specifies the image index. |
d | Specifies the SimpleDatum containing the data. |
nBackgroundWritingThreadCount | Optionally, specifies the background writing thread count, or 0 for to disable background writing (default = 0). |
strDescription | Optionally, specifies the description (default = null). |
nOriginalSourceID | Optionally, specifies the original source ID (default = null) |
bActive | Optionally, specifies whether the image is active or not (default = true). |
Definition at line 1998 of file Database.cs.
|
virtual |
Delete a dataset.
strDsName | Specifies the dataset name. |
bDeleteRelatedProjects | Specifies whether or not to also delete all projects using the dataset. WARNING! Use this with caution for it will permenantly delete the projects and their results. |
log | Specifies the Log object for status output. |
evtCancel | Specifies the cancel event used to cancel the delete. |
Reimplemented in MyCaffe.db.temporal.DatabaseTemporal.
Definition at line 5088 of file Database.cs.
void MyCaffe.db.image.Database.DeleteLabelBoosts | ( | int | nProjectId | ) |
Delete all label boosts for a project.
nProjectId | Specifies the ID of a project. |
Definition at line 932 of file Database.cs.
void MyCaffe.db.image.Database.DeleteLabelBoosts | ( | int | nProjectId, |
int | nSrcId = 0 |
||
) |
Delete all label boosts for a project.
nProjectId | Specifies the ID of a project. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 916 of file Database.cs.
void MyCaffe.db.image.Database.DeleteLabels | ( | int | nSrcId = 0 | ) |
Delete the labels of a data source from the database.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 733 of file Database.cs.
void MyCaffe.db.image.Database.DeleteModelGroup | ( | string | strGroup, |
Log | log, | ||
CancelEvent | evtCancel | ||
) |
Deletes a model group from the database.
strGroup | Specifies the name of the group. |
log | Specifies the Log object for status output. |
evtCancel | Specifies the cancel event used to cancel the delete. |
Definition at line 5554 of file Database.cs.
void MyCaffe.db.image.Database.DeleteRawImageGroups | ( | ) |
Deletes all RawImage groups
Definition at line 3863 of file Database.cs.
void MyCaffe.db.image.Database.DeleteRawImageMeans | ( | int | nSrcId = 0 | ) |
Delete all RawImageMeans for a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 2702 of file Database.cs.
void MyCaffe.db.image.Database.DeleteRawImageParameters | ( | int | nSrcId | ) |
Delete all RawImage parameters within a data source.
nSrcId | Specifies the ID of the data source. |
Definition at line 3637 of file Database.cs.
void MyCaffe.db.image.Database.DeleteRawImageResults | ( | int | nSrcId = 0 | ) |
Delete all RawImageResults for a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 2564 of file Database.cs.
void MyCaffe.db.image.Database.DeleteRawImages | ( | int | nSrcId = 0 | ) |
Delete all RawImages in a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 2527 of file Database.cs.
|
virtual |
Delete a data source from the database.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Reimplemented in MyCaffe.db.temporal.DatabaseTemporal.
Definition at line 4155 of file Database.cs.
void MyCaffe.db.image.Database.DeleteSourceData | ( | ) |
Deletes the data source data for the open data source.
Definition at line 3896 of file Database.cs.
|
virtual |
Delete the data source data (images, means, results and parameters) from the database.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Reimplemented in MyCaffe.db.temporal.DatabaseTemporal.
Definition at line 4225 of file Database.cs.
void MyCaffe.db.image.Database.DeleteSourceData | ( | string | strSrc | ) |
Delete the data source data (images, means, results and parameters) from the database.
strSrc | Specifies the data source name. |
Definition at line 4247 of file Database.cs.
void MyCaffe.db.image.Database.DeleteSources | ( | params string[] | rgstrSrc | ) |
Delete the list of data sources, listed by name, from the database.
rgstrSrc | Specifies the list of data sources. |
Definition at line 4197 of file Database.cs.
void MyCaffe.db.image.Database.DisableAllLabels | ( | int | nSrcId | ) |
Disable all labels within the source specified by the ID.
nSrcId | Specifies the source ID. |
Definition at line 1833 of file Database.cs.
int MyCaffe.db.image.Database.DisableAllNonMatchingImages | ( | int | nSrcId, |
int | nWidth, | ||
int | nHeight | ||
) |
Disable all images that do not have a matching widxht size.
nSrcId | Specifies the source ID. |
nWidth | Specifies the expected image width. |
nHeight | Specifies the expected image height. |
Definition at line 1847 of file Database.cs.
void MyCaffe.db.image.Database.DisableLabel | ( | int | nSrcId, |
int | nLabel, | ||
bool | bOriginalLabel = false |
||
) |
Disable a set of labels within the source specified by the ID.
nSrcId | Specifies the source ID. |
nLabel | Specifies the label to disable. |
bOriginalLabel | Specifies whether the label is the original label (true) or the active label (false). |
Definition at line 1816 of file Database.cs.
void MyCaffe.db.image.Database.Dispose | ( | ) |
Release any resources used.
Definition at line 82 of file Database.cs.
int MyCaffe.db.image.Database.FindDatasetFromSourceId | ( | int | nSourceId | ) |
Searches for the dataset containing the sourceId.
nSourceId | Specifies the source ID to look for. |
Definition at line 4594 of file Database.cs.
string MyCaffe.db.image.Database.FindDatasetNameFromSourceName | ( | string | strTrainSrc, |
string | strTestSrc | ||
) |
Searches for the data set name based on the training and testing source names.
strTrainSrc | Specifies the data source name for training. |
strTestSrc | Specifies the data source name for testing. |
Definition at line 4560 of file Database.cs.
Label MyCaffe.db.image.Database.FindLabelInCache | ( | int | nLabel | ) |
Search for a Label in the label cache.
nLabel | Specifies the label. |
Definition at line 447 of file Database.cs.
RawImageGroup MyCaffe.db.image.Database.FindRawImageGroup | ( | int | nIdx, |
DateTime | dtStart, | ||
DateTime | dtEnd | ||
) |
Searches for a RawImageGroup by index, start time-stamp and end time-stamp.
nIdx | Specifies the index of the raw image group. |
dtStart | Specifies the start time-stamp of the image group. |
dtEnd | Specifies the end time-stamp of the image group. |
Definition at line 3830 of file Database.cs.
int MyCaffe.db.image.Database.FindRawImageGroupID | ( | int | nIdx, |
DateTime | dtStart, | ||
DateTime | dtEnd | ||
) |
Searches fro the RawImageGroup ID.
nIdx | Specifies the index of the raw image group. |
dtStart | Specifies the start time-stamp of the image group. |
dtEnd | Specifies the end time-stamp of the image group. |
Definition at line 3850 of file Database.cs.
void MyCaffe.db.image.Database.FixupRawImageCopy | ( | int | nImageID, |
int | nSecondarySrcId | ||
) |
The FixupRawImageCopy method is used to fixup the OriginalSourceId by setting it to a secondary source ID in the event that the path created using the PrimarySourceID does not have the image data file.
When creating a copy of a Data Source that uses both training and testing Data Sources (e.g., re-arranging the time period used for training vs testing), it is important that the OriginalSourceID be set with the Data Source ID that holds the data file.
nImageID | Specifies the image to update. |
nSecondarySrcId | Specifies the secondary Source ID to use if the data file is not found. |
Definition at line 2324 of file Database.cs.
List< Dataset > MyCaffe.db.image.Database.GetAllDatasets | ( | int | nDatasetGroupID | ) |
Returns a list of all datasets within a group.
nDatasetGroupID | Specifies the ID of the dataset group. |
Definition at line 5144 of file Database.cs.
List< Dataset > MyCaffe.db.image.Database.GetAllDatasetsInModelGroup | ( | int | nModelGroupId | ) |
Returns all Dataset entities within a given model group.
nModelGroupId | Specifies the ID of a model group. |
Definition at line 5540 of file Database.cs.
List< Dataset > MyCaffe.db.image.Database.GetAllDatasetsWithCreator | ( | int | nDsCreatorID, |
bool? | bRelabeled = null |
||
) |
Returns a list of all datasets within a group with dataset creators.
nDsCreatorID | Specifies the ID of the dataset creator. |
bRelabeled | Optionally, specifies whether or not only re-labeled datasets should be returned. |
Definition at line 5185 of file Database.cs.
List< Dataset > MyCaffe.db.image.Database.GetAllDatasetsWithCreators | ( | int | nDatasetGroupID | ) |
Returns a list of all datasets within a group with dataset creators.
nDatasetGroupID | Specifies the ID of the dataset group. |
Definition at line 5160 of file Database.cs.
List< DbItem > MyCaffe.db.image.Database.GetAllRawImageIndexes | ( | bool | bBoostedOnly, |
bool | bIncludeActive = true , |
||
bool | bIncludeInactive = false |
||
) |
Returns the list of the image indexes of all images.
bBoostedOnly | Specifies to only retrieve boosted images. |
bIncludeActive | Optionally, specifies to query active images (default = true). |
bIncludeInactive | Optionally, specifies to query inactive images (default = false). |
Definition at line 1132 of file Database.cs.
int MyCaffe.db.image.Database.GetBoostCount | ( | int | nSrcId = 0 , |
string | strFilterVal = null , |
||
int? | nBoostVal = null |
||
) |
Return the number of boosted images for a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strFilterVal | Optionally, specifies a parameter filtering value (default = null). |
nBoostVal | Optionally, specifies a boost filtering value (default = null). |
Definition at line 2748 of file Database.cs.
string MyCaffe.db.image.Database.GetDatabaseFilePath | ( | string | strName | ) |
Query the physical database file path.
strName | Specifies the name of the database. |
Definition at line 306 of file Database.cs.
string MyCaffe.db.image.Database.GetDatabaseImagePath | ( | string | strName | ) |
Query the physical database file path for Images.
strName | Specifies the name of the database. |
Definition at line 339 of file Database.cs.
Dataset MyCaffe.db.image.Database.GetDataset | ( | int | nID, |
ConnectInfo | ci = null |
||
) |
Returns the Dataset entity for a dataset ID.
nID | Specifies the dataset ID. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4648 of file Database.cs.
Dataset MyCaffe.db.image.Database.GetDataset | ( | string | strName | ) |
Returns the Dataset entity for a dataset name.
strName | Specifies the dataset name. |
Definition at line 4671 of file Database.cs.
Dataset MyCaffe.db.image.Database.GetDataset | ( | string | strTestingSrc, |
string | strTrainingSrc | ||
) |
Returns the Dataset entity containing the training and testing source names.
strTestingSrc | Specifies the data source name for testing. |
strTrainingSrc | Specifies the data source name for training. |
Definition at line 4691 of file Database.cs.
int MyCaffe.db.image.Database.GetDatasetCreatorID | ( | string | strName | ) |
Returns the ID of a dataset creator given its name.
strName | Specifies the name of the dataset creator. |
Definition at line 5249 of file Database.cs.
string MyCaffe.db.image.Database.GetDatasetCreatorName | ( | int | nDatasetCreatorID, |
ConnectInfo | ci = null |
||
) |
Returns the name of a dataset creator given its ID.
nDatasetCreatorID | Specifies the ID of the dataset creator. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 5225 of file Database.cs.
DatasetGroup MyCaffe.db.image.Database.GetDatasetGroup | ( | int | nGroupID, |
ConnectInfo | ci = null |
||
) |
Returns the DatasetGroup entity given a group ID.
nGroupID | Specifies the ID of the group. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4897 of file Database.cs.
int MyCaffe.db.image.Database.GetDatasetGroupID | ( | string | strName | ) |
Returns the ID of a dataset group given its name.
strName | Specifies the name of the group. |
Definition at line 5206 of file Database.cs.
string MyCaffe.db.image.Database.GetDatasetGroupName | ( | int | nGroupID | ) |
Returns the name of a dataset group given its ID.
nGroupID | Specifies the ID of the group. |
Definition at line 4915 of file Database.cs.
int MyCaffe.db.image.Database.GetDatasetID | ( | string | strName, |
ConnectInfo | ci = null |
||
) |
Returns a datasets ID given its name.
strName | Specifies the dataset name. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4612 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetDatasetMaximumTimestamp | ( | int | nDsID | ) |
Returns the maximum time-stamp for a dataset.
nDsID | Specifies the ID of the dataset. |
Definition at line 5328 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetDatasetMinimumTimestamp | ( | int | nDsID | ) |
Returns the minimum time-stamp for a dataset.
nDsID | Specifies the ID of the dataset. |
Definition at line 5306 of file Database.cs.
string MyCaffe.db.image.Database.GetDatasetName | ( | int | nID, |
ConnectInfo | ci = null |
||
) |
Returns the name of a dataset given its ID.
nID | Specifies the dataset ID. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4632 of file Database.cs.
string MyCaffe.db.image.Database.GetDatasetParameter | ( | int | nDsId, |
string | strName | ||
) |
Returns the value of a dataset parameter as a string.
nDsId | Specifies the ID of the dataset. |
strName | Specifies the name of the parameter. |
Definition at line 4957 of file Database.cs.
bool MyCaffe.db.image.Database.GetDatasetParameter | ( | int | nDsId, |
string | strName, | ||
bool | bDefault | ||
) |
Returns the value of a dataset parameter as a bool.
nDsId | Specifies the ID of the dataset. |
strName | Specifies the name of the parameter. |
bDefault | Specifies the default value to return if not found. |
Definition at line 5011 of file Database.cs.
double MyCaffe.db.image.Database.GetDatasetParameter | ( | int | nDsId, |
string | strName, | ||
double | dfDefault | ||
) |
Returns the value of a dataset parameter as a double.
nDsId | Specifies the ID of the dataset. |
strName | Specifies the name of the parameter. |
dfDefault | Specifies the default value to return if not found. |
Definition at line 4994 of file Database.cs.
int MyCaffe.db.image.Database.GetDatasetParameter | ( | int | nDsId, |
string | strName, | ||
int | nDefault | ||
) |
Returns the value of a dataset parameter as an int.
nDsId | Specifies the ID of the dataset. |
strName | Specifies the name of the parameter. |
nDefault | Specifies the default value to return if not found. |
Definition at line 4977 of file Database.cs.
Dictionary< string, string > MyCaffe.db.image.Database.GetDatasetParameters | ( | int | nDsId, |
ConnectInfo | ci = null |
||
) |
Returns all dataset parameters for a given dataset.
nDsId | Specifies the ID of the dataset. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4934 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetFirstTimeStamp | ( | int | nSrcId = 0 , |
string | strDesc = null |
||
) |
Returns the first time-stamp in the data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 4399 of file Database.cs.
int MyCaffe.db.image.Database.GetImageCount | ( | ) |
Returns the number of raw images in the database for the open data source.
Definition at line 1120 of file Database.cs.
int MyCaffe.db.image.Database.GetImageCount | ( | int | nSrcId = 0 , |
bool | bActive = true , |
||
bool | bInactive = true , |
||
ConnectInfo | ci = null |
||
) |
Get the number of images in the source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
bActive | Optionally, specifies to get the active image count. |
bInactive | Optionally, specifies to get the inactive image count. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2820 of file Database.cs.
|
protected |
Returns the file path contained within a byte array or null if no path is found.
rgData | Specifies the bytes to check. |
Definition at line 1688 of file Database.cs.
|
protectedvirtual |
Returns the base image path used when saving binary data to the file system.
Definition at line 250 of file Database.cs.
Label MyCaffe.db.image.Database.GetLabel | ( | int | nID | ) |
Return the Label with the given ID.
nID | Specifies the Label ID. |
Definition at line 399 of file Database.cs.
List< LabelBoost > MyCaffe.db.image.Database.GetLabelBoosts | ( | int | nProjectId, |
bool | bSort = true , |
||
int | nSrcId = 0 |
||
) |
Returns a list of all label boosts set on a project.
nProjectId | Specifies the ID of a project. |
bSort | Optionally, specifies whether or not to sort the labels by active label (default = true). |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 967 of file Database.cs.
string MyCaffe.db.image.Database.GetLabelBoostsAsText | ( | int | nProjectId, |
int | nSrcId = 0 , |
||
bool | bSort = true |
||
) |
Returns the Label boosts as a string.
nProjectId | Specifies the ID of a project. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
bSort | Optionally, specifies whether or not to sort the labels by active label (default = true). |
Definition at line 990 of file Database.cs.
int MyCaffe.db.image.Database.GetLabelCount | ( | int | nLabel | ) |
Returns the number of images under a given label.
nLabel | Specifies the label. |
Definition at line 479 of file Database.cs.
string MyCaffe.db.image.Database.GetLabelCountsAsText | ( | int | nSrcId = 0 , |
ConnectInfo | ci = null |
||
) |
Returns the label counts for a given data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 592 of file Database.cs.
int MyCaffe.db.image.Database.GetLabelID | ( | int | nLabel | ) |
Returns the label ID associated with a label value.
nLabel | Specifies the label. |
Definition at line 463 of file Database.cs.
string MyCaffe.db.image.Database.GetLabelName | ( | int | nLabel, |
int | nSrcId = 0 |
||
) |
Get the Label name of a label within a data source.
nLabel | Specifies the label. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 416 of file Database.cs.
List< Label > MyCaffe.db.image.Database.GetLabels | ( | bool | bSort = true , |
bool | bWithImagesOnly = false , |
||
int | nSrcId = 0 , |
||
ConnectInfo | ci = null |
||
) |
Returns a list of all labels used by a data source.
bSort | Specifies to sort the labels by label. |
bWithImagesOnly | Specifies to only return labels that actually have images associated with them. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 710 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetLastTimeStamp | ( | DateTime | dtStart, |
DateTime | dtEnd, | ||
bool | bEndInclusive, | ||
int | nSrcId = 0 , |
||
string | strDesc = null |
||
) |
Returns the last time-stamp in the data source.
dtStart | Specifies the start of the time range. |
dtEnd | Specifies the end of the time range. |
bEndInclusive | Specifies whether or not to include the end time in the range. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 4452 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetLastTimeStamp | ( | DateTime | dtStart, |
DateTime | dtEnd, | ||
bool | bEndInclusive, | ||
out int | nIndex, | ||
int | nSrcId = 0 , |
||
string | strDesc = null |
||
) |
Returns the last time-stamp and index in the data source falling within a time range.
dtStart | Specifies the start of the time range. |
dtEnd | Specifies the end of the time range. |
bEndInclusive | Specifies whether or not to include the end time in the range. |
nIndex | Returns the index of the last item. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 4517 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetLastTimeStamp | ( | int | nSrcId = 0 , |
string | strDesc = null |
||
) |
Returns the last time-stamp in the data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 4424 of file Database.cs.
DateTime MyCaffe.db.image.Database.GetLastTimeStamp | ( | out int | nIndex, |
int | nSrcId = 0 , |
||
string | strDesc = null |
||
) |
Returns the last time-stamp and index in the data source.
nIndex | Returns the index of the last item. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 4484 of file Database.cs.
ModelGroup MyCaffe.db.image.Database.GetModelGroup | ( | int | nGroupID, |
ConnectInfo | ci = null |
||
) |
Returns the ModelGroup entity given the ID of a model group.
nGroupID | Specifies the ID of the model group. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 5487 of file Database.cs.
int MyCaffe.db.image.Database.GetModelGroupID | ( | string | strGroup | ) |
Retruns the ID of a model group given its name.
strGroup | Specifies the name of the model group. |
Definition at line 5523 of file Database.cs.
string MyCaffe.db.image.Database.GetModelGroupName | ( | int | nGroupID | ) |
Returns the name of a model group given its ID.
nGroupID | Specifies the ID of the model group. |
Definition at line 5505 of file Database.cs.
|
protected |
Converts a set of bytes from a file path-name by loading its bytes and returning them, or if the original bytes do not contain a path, just returns the original bytes.
rgData | Specifies the original bytes. |
nSecondarySrcId | Optionally, specifies a secondary data Source ID (default = null). |
ci | Optionally, specifies a specific connection to use (default = null). |
entities | Optionally, specifies the entities to use. |
bTestConnection | Optionally, specifies that the connection is being tested. |
Definition at line 1588 of file Database.cs.
RawImage MyCaffe.db.image.Database.GetRawImage | ( | int | nID | ) |
Returns the RawImage with a given ID.
nID | Specifies the RawImage ID. |
Definition at line 2494 of file Database.cs.
RawImage MyCaffe.db.image.Database.GetRawImageAt | ( | int | nIdx, |
int | nSrcId = 0 |
||
) |
Returns the RawImage at a given image index.
nIdx | Specifies the image index to retrieve. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1334 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageData | ( | RawImage | img, |
bool | bLoadDataCriteria, | ||
bool | bLoadDebugData, | ||
out byte[] | rgDataCriteria, | ||
out int? | nDataCriteriaFmtId, | ||
out byte[] | rgDebugData, | ||
out int? | nDebugDataFmtId | ||
) |
Returns the raw data of the RawImage.
If the RawImage uses its Virtual ID, the RawImage with that ID is queried from the database and its raw data is returned.
img | Specifies the RawImage to use. |
bLoadDataCriteria | Specifies whether or not to load the data criteria data if any exists. When false, the data criteria data is not loaded from file. |
bLoadDebugData | Specifies whether or not to load the debug data if any exists. When false, the debug data is not loaded from file. |
rgDataCriteria | Returns the image data criteria (if any). |
nDataCriteriaFmtId | Returns the image data criteria format (if any). |
rgDebugData | Returns the image debug data (if any). |
nDebugDataFmtId | Returns the debug data format (if any). |
Definition at line 1389 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageDataCriteria | ( | byte[] | rgData, |
int? | nOriginalSourceID = null |
||
) |
Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data.
rgData | Specifies the raw data, which may contain an image path. |
nOriginalSourceID | Optionally, specifies the original source ID that stores the image. |
Definition at line 1538 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageDataCriteria | ( | int | nImgID, |
int? | nOriginalSourceID = null |
||
) |
Queries the Data Criteria for an image an Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data.
nImgID | Specifies the image ID that has the raw data, which may contain an image path. |
nOriginalSourceID | Optionally, specifies the original source ID that stores the image. |
You must Open the database with the source under which the image is stored.
Definition at line 1552 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageDataCriteria | ( | RawImage | img, |
out int? | nDataCriteriaFmtId | ||
) |
Returns the raw data criteria data of the RawImage.
If the RawImage uses its Virtual ID, the RawImage with that ID is queried from the database and its raw data is returned.
img | Specifies the RawImage to use. |
nDataCriteriaFmtId | Returns the image data criteria format (if any). |
Definition at line 1431 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageDebugData | ( | byte[] | rgData, |
int? | nOriginalSourceID = null |
||
) |
Converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data.
rgData | Specifies the raw data, which may contain an image path. |
nOriginalSourceID | Optionally, specifies the original source ID that stores the image. |
You must Open the database with the source under which the image is stored.
Definition at line 1495 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageDebugData | ( | int | nImgID, |
int? | nOriginalSourceID = null |
||
) |
Queries the Debug Data for an image an Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data.
nImgID | Specifies the image ID that has the raw data, which may contain an image path. |
nOriginalSourceID | Optionally, specifies the original source ID that stores the image. |
Definition at line 1506 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageDebugData | ( | RawImage | img, |
out int? | nDebugDataFormatId | ||
) |
Returns the raw debug data data of the RawImage.
If the RawImage uses its Virtual ID, the RawImage with that ID is queried from the database and its raw data is returned.
img | Specifies the RawImage to use. |
nDebugDataFormatId | Returns the image debug data format (if any). |
Definition at line 1463 of file Database.cs.
List< string > MyCaffe.db.image.Database.GetRawImageDistinctParameterDescriptions | ( | int | nSrcId = 0 | ) |
Returns a list of distinct RawImage parameter descriptions for a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 3715 of file Database.cs.
int MyCaffe.db.image.Database.GetRawImageID | ( | DateTime | dt, |
int | nSrcId = 0 |
||
) |
Returns the RawImage ID for the image with the given time-stamp.
dt | Specifies the image time-stamp. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1359 of file Database.cs.
RawImageMean MyCaffe.db.image.Database.GetRawImageMean | ( | int | nSrcId = 0 , |
ConnectInfo | ci = null |
||
) |
Return the RawImageMean for the image mean from the open data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2583 of file Database.cs.
bool MyCaffe.db.image.Database.GetRawImageParameter | ( | int | nRawImageID, |
string | strName, | ||
bool | bDefault | ||
) |
Return the bool value of a RawImage parameter.
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
bDefault | Specifies the default value to return if the RawImage or parameter are not found. |
Definition at line 3467 of file Database.cs.
double MyCaffe.db.image.Database.GetRawImageParameter | ( | int | nRawImageID, |
string | strName, | ||
double | dfDefault | ||
) |
Return the double value of a RawImage parameter.
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
dfDefault | Specifies the default value to return if the RawImage or parameter are not found. |
Definition at line 3450 of file Database.cs.
int MyCaffe.db.image.Database.GetRawImageParameter | ( | int | nRawImageID, |
string | strName, | ||
int | nDefault | ||
) |
Return the int value of a RawImage parameter.
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
nDefault | Specifies the default value to return if the RawImage or parameter are not found. |
Definition at line 3433 of file Database.cs.
string MyCaffe.db.image.Database.GetRawImageParameter | ( | int | nRawImageID, |
string | strName, | ||
string | strDefault | ||
) |
Return the string value of a RawImage parameter.
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
strDefault | Specifies the default value to return if the RawImage or parameter are not found. |
Definition at line 3413 of file Database.cs.
int MyCaffe.db.image.Database.GetRawImageParameterCount | ( | string | strName, |
int | nSrcId = 0 , |
||
string | strType = "TEXT" |
||
) |
Returns the RawImage parameter count for a data source.
strName | Specifies the parameter name. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strType | Optionally, specifies the parameter type of 'TEXT', 'NUMERIC' or 'VALUE' (default = "TEXT"). |
Definition at line 3654 of file Database.cs.
byte[] MyCaffe.db.image.Database.GetRawImageParameterData | ( | int | nRawImageID, |
string | strName | ||
) |
Return the byte array data of a RawImage parameter.
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
Definition at line 3483 of file Database.cs.
RawImageParameter MyCaffe.db.image.Database.GetRawImageParameterEx | ( | int | nRawImageID, |
string | strName | ||
) |
Returns the RawImageParameter entity given the image ID and parameter name..
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the parameter name. |
Definition at line 3502 of file Database.cs.
bool MyCaffe.db.image.Database.GetRawImageParameterExist | ( | string | strName, |
int | nSrcId = 0 , |
||
string | strType = "TEXT" |
||
) |
Returns whether or not a given RawImage parameter exists.
strName | Specifies the parameter name. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strType | Optionally, specifies the parameter type of 'TEXT', 'NUMERIC' or 'VALUE' (default = "TEXT"). |
Definition at line 3681 of file Database.cs.
List< Tuple< SimpleDatum, List< Result > > > MyCaffe.db.image.Database.GetRawImageResultBatch | ( | int | nBatchCount, |
byte[] | rgResults | ||
) |
Extracts the raw image result batch from the result binary data.
nBatchCount | Specifies the number of results in the batch. |
rgResults | Specifies the binary batch data. |
Definition at line 3293 of file Database.cs.
List< RawImageResult > MyCaffe.db.image.Database.GetRawImageResults | ( | int | nSrcId = 0 , |
bool | bRequireExtraData = false , |
||
int | nMax = -1 |
||
) |
Returns the RawImageResults for a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
bRequireExtraData | Optionally, specifies whether or not the Extra 'target' data is required or not. |
nMax | Optionally, specifies the maximum number of items to load. |
Definition at line 3329 of file Database.cs.
List< RawImage > MyCaffe.db.image.Database.GetRawImagesAt | ( | int | nIdx, |
int | nCount, | ||
int | nSrcId = 0 , |
||
string | strDescription = null |
||
) |
Returns a list of RawImages from the database for a data source.
nIdx | Specifies the starting image index. |
nCount | Specifies the number of images to retrieve from the starting index nIdx. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 1243 of file Database.cs.
List< RawImage > MyCaffe.db.image.Database.GetRawImagesAt | ( | List< int > | rgImageIdx, |
int | nSrcId = 0 , |
||
string | strDescription = null |
||
) |
Returns a list of RawImages from the database for a data source.
rgImageIdx | Specifies the list of image indexes to query (maximum of 100). |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 1265 of file Database.cs.
List< RawImage > MyCaffe.db.image.Database.GetRawImagesAtID | ( | List< int > | rgImageID, |
int | nSrcId = 0 , |
||
string | strDescription = null |
||
) |
Returns a list of RawImages from the database for a data source.
rgImageID | Specifies the list of image IDs to query (maximum of 100). |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 1299 of file Database.cs.
Source MyCaffe.db.image.Database.GetSource | ( | int | nID, |
ConnectInfo | ci = null |
||
) |
Returns the Source entity given a data source ID.
nID | Specifies the ID of the data source. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4071 of file Database.cs.
Source MyCaffe.db.image.Database.GetSource | ( | string | strName, |
ConnectInfo | ci = null |
||
) |
Returns the Source entity given a data source name.
strName | Specifies the data source name. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4051 of file Database.cs.
int MyCaffe.db.image.Database.GetSourceID | ( | string | strName, |
ConnectInfo | ci = null |
||
) |
Returns the ID of a data source given its name.
strName | Specifies the data source name. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4018 of file Database.cs.
string MyCaffe.db.image.Database.GetSourceName | ( | int | nID, |
ConnectInfo | ci = null |
||
) |
Returns the name of a data source given its ID.
nID | Specifies the ID of the data source. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4035 of file Database.cs.
bool MyCaffe.db.image.Database.GetSourceParameter | ( | string | strName, |
bool | bDefault, | ||
int | nSrcId = 0 |
||
) |
Return the data source parameter as a bool.
strName | Specifies the parameter name. |
bDefault | Specifies the default value returned if the parameter is not found. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 4344 of file Database.cs.
double MyCaffe.db.image.Database.GetSourceParameter | ( | string | strName, |
double | dfDefault, | ||
int | nSrcId = 0 |
||
) |
Return the data source parameter as a double.
strName | Specifies the parameter name. |
dfDefault | Specifies the default value returned if the parameter is not found. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 4326 of file Database.cs.
int MyCaffe.db.image.Database.GetSourceParameter | ( | string | strName, |
int | nDefault, | ||
int | nSrcId = 0 |
||
) |
Return the data source parameter as an int.
strName | Specifies the parameter name. |
nDefault | Specifies the default value returned if the parameter is not found. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 4308 of file Database.cs.
string MyCaffe.db.image.Database.GetSourceParameter | ( | string | strName, |
int | nSrcId = 0 |
||
) |
Return the data source parameter as a string.
strName | Specifies the parameter name. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 4283 of file Database.cs.
Dictionary< string, string > MyCaffe.db.image.Database.GetSourceParameters | ( | int | nSrcId = 0 , |
ConnectInfo | ci = null |
||
) |
Returns a dictionary of the data source parameters.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4258 of file Database.cs.
void MyCaffe.db.image.Database.LoadLabelCounts | ( | Dictionary< int, int > | rgCounts, |
int | nSrcId = 0 |
||
) |
Load the label counts from the database for a data source.
rgCounts | Specifies where the counts are loaded. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 569 of file Database.cs.
|
virtual |
Opens a data source.
nSrcId | Specifies the ID of the data source to open. |
nForceLoad | Optionally, specifies how to force load the data (default = NONE). |
ci | Optionally, specifies a specific connection to use (default = null). |
Reimplemented in MyCaffe.db.temporal.DatabaseTemporal.
Definition at line 188 of file Database.cs.
void MyCaffe.db.image.Database.Open | ( | string | strSrc, |
bool | bForceLoadImageFilePath = false |
||
) |
Opens a data source.
strSrc | Specifies the name of the data source to open. |
bForceLoadImageFilePath | Optionally, specifies to force load the image file path (default = false) and use file-based data. |
Definition at line 211 of file Database.cs.
|
static |
Pack the extra data into a byte array.
rg | Specifies the extra data. |
Definition at line 3353 of file Database.cs.
int MyCaffe.db.image.Database.PutDataset | ( | Dataset | ds | ) |
Save the Dataset entity to the database.
ds | Specifies the Dataset entity. |
Definition at line 4855 of file Database.cs.
int MyCaffe.db.image.Database.PutRawImage | ( | int | nIdx, |
SimpleDatum | d, | ||
string | strDescription = null |
||
) |
Save a SimpleDatum as a RawImage in the database.
nIdx | Specifies the image index. |
d | Specifies the SimpleDatum containing the data. |
strDescription | Optionally, specifies a description for the RawImage (default = null). |
Definition at line 2469 of file Database.cs.
int MyCaffe.db.image.Database.PutRawImageGroup | ( | RawImageGroup | g | ) |
Adds a RawImageGroup to the database.
g | Specifies the group to add. |
Definition at line 3790 of file Database.cs.
int MyCaffe.db.image.Database.PutRawImageMean | ( | SimpleDatum | sd, |
bool | bUpdate, | ||
int | nSrcId = 0 , |
||
ConnectInfo | ci = null |
||
) |
Save the SimpleDatum as a RawImageMean in the database.
sd | Specifies the data. |
bUpdate | Specifies whether or not to update the mean image. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2607 of file Database.cs.
void MyCaffe.db.image.Database.PutRawImageParameters | ( | List< ParameterData > | rgParam, |
ConnectInfo | ci = null |
||
) |
Save a list of raw image parameters.
rgParam | Specifies the list of parameters to save. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2368 of file Database.cs.
int MyCaffe.db.image.Database.PutRawImageResultExtraData | ( | int | nRawImageResultID, |
byte[] | rgExtraData | ||
) |
Set the raw image result extra data field.
nRawImageResultID | Specifies the ID of the raw image result to update. |
rgExtraData | Specifies the extra data to set. |
Definition at line 3307 of file Database.cs.
int MyCaffe.db.image.Database.PutRawImageResults | ( | int | nSrcId, |
int | nIdx, | ||
int | nLabel, | ||
DateTime | dt, | ||
List< Result > | rgResults, | ||
bool | bInvert, | ||
List< Tuple< DateTime, int > > | rgExtra = null |
||
) |
Save the results of a Run as a RawImageResult.
nSrcId | Specifies the ID of the data source. |
nIdx | Specifies the index of the result. |
nLabel | Specifies the expected label of the result. |
dt | Specifies the time-stamp of the result. |
rgResults | Specifies the results of the run as a list of (int nLabel, double dfReult) values. |
bInvert | Specifies whether or not the results are inverted. |
rgExtra | Optionally, specifies the extra target data. |
Definition at line 3199 of file Database.cs.
int MyCaffe.db.image.Database.PutRawImageResults | ( | int | nSrcId, |
int | nIdx, | ||
int | nLabel, | ||
DateTime | dt, | ||
List< Tuple< SimpleDatum, List< Result > > > | rgrgResults, | ||
List< Tuple< DateTime, int > > | rgExtra = null |
||
) |
Save the results of a Run as a RawImageResult.
nSrcId | Specifies the ID of the data source. |
nIdx | Specifies the index of the result. |
nLabel | Specifies the expected label of the result. |
dt | Specifies the time-stamp of the result. |
rgrgResults | Specifies the time-synchronized batch of results of the run as a list of (int nLabel, double dfReult) values. |
rgExtra | Optionally, specifies the extra target data. |
Definition at line 3248 of file Database.cs.
void MyCaffe.db.image.Database.PutRawImages | ( | List< RawImage > | rgImg, |
List< List< ParameterData > > | rgrgParam = null , |
||
ConnectInfo | ci = null |
||
) |
Saves a List of RawImages to the database.
rgImg | Specifies the list of RawImages. |
rgrgParam | Optionally, specifies the List of parameters to also save for each RawImage (default = null). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2413 of file Database.cs.
int MyCaffe.db.image.Database.PutSource | ( | Source | src, |
ConnectInfo | ci = null |
||
) |
Adds or updates (if exists) a data source to the database.
src | Specifies the Source entity to add. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4090 of file Database.cs.
List< int > MyCaffe.db.image.Database.QueryAllRawImageIDs | ( | int | nSrcId = 0 , |
int | nMax = int.MaxValue , |
||
int | nLabel = -1 , |
||
int | nBoost = -1 , |
||
bool | bBoostIsExact = false , |
||
bool | bAnnotatedOnly = false , |
||
bool | bActiveOnly = true |
||
) |
Returns the ID's of all RawImages within a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
nMax | Optionally, specifies the maximum number of ID's to query (default = int.MaxValue). |
nLabel | Optionally, specifies a label from which images are to be queried (default = -1, which ignores this parameter). |
nBoost | Optionally, specifies a boost from which images are to be queried (default = -1, which ignores this parameter). |
bBoostIsExact | Optionally, specifies whether the boost value is exact (true) or the minimum boost where all values equal are greater are retrieved (false). Default = false. |
bAnnotatedOnly | Optionally, specifies to query annotated images only (default = false). |
bActiveOnly | Optionally, specifies to query all images or only active images (default = true). |
Definition at line 1959 of file Database.cs.
int MyCaffe.db.image.Database.QueryRawImageCount | ( | int | nSrcId = 0 | ) |
Returns the number of RawImages in a data source.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 2512 of file Database.cs.
List< RawImageParameter > MyCaffe.db.image.Database.QueryRawImageParameters | ( | int | nImageID | ) |
Query all image parameters for a given image.
nImageID | Specifies the image ID who's image parameters are to be queried. |
Definition at line 1193 of file Database.cs.
List< RawImageParameter > MyCaffe.db.image.Database.QueryRawImageParameters | ( | int | nSrcId, |
string | strName | ||
) |
Query a list of all raw image parameters of a give name stored with a given source ID.
nSrcId | Specifies the source ID. |
strName | Specifies the parameter name. |
Definition at line 1179 of file Database.cs.
List< RawImage > MyCaffe.db.image.Database.QueryRawImages | ( | int | nSrcId, |
bool? | bActive = null , |
||
int | nBoostVal = 0 , |
||
bool | bExactBoostVal = false |
||
) |
Returns the list of raw images that have a source ID from a selected list.
nSrcId | Specifies the source ID. |
bActive | Optionally, specifies to query active (or non active) images (default = null, which queries all images). |
nBoostVal | Optionally, specifies a boost value to query (default = 0, which ignores this filter). |
bExactBoostVal | Optionally, specifies whether or not the boost value is an exact value or to be treated as a value greater than or equal to (default = false). |
Definition at line 1211 of file Database.cs.
List< RawImage > MyCaffe.db.image.Database.QueryRawImages | ( | params int[] | rgSrcId | ) |
Returns the list of raw images that have a source ID from a selected list.
rgSrcId | Specifies the list of source ID. |
Definition at line 1158 of file Database.cs.
void MyCaffe.db.image.Database.Refresh | ( | ) |
Close and re Open with the current data source.
Definition at line 294 of file Database.cs.
List< RawImage > MyCaffe.db.image.Database.ReindexRawImages | ( | Log | log, |
CancelEvent | evtCancel, | ||
int | nSrcId = 0 |
||
) |
Reindex the RawImages of a data source.
log | Specifies the Log to use for status output. |
evtCancel | Specifies the cancel event used to cancel the operation. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 2915 of file Database.cs.
void MyCaffe.db.image.Database.ResetAllActiveLabels | ( | int | nSrcId | ) |
Reset the all active labels to their original label within a source.
nSrcId | Specifies the source ID. |
Definition at line 1803 of file Database.cs.
void MyCaffe.db.image.Database.ResetAllBoosts | ( | int | nSrcId = 0 , |
int | nMinBoost = 0 , |
||
bool | bExactVal = false , |
||
int | nDesiredBoostVal = -1 |
||
) |
Reset all image boosts for a data set.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
nMinBoost | Optionally, specifies a minimum boost where all ActiveBoost values of this value or higher are reset (default = 0 which resets all boosts to their original setting). |
bExactVal | Optionally, specifies that the min boost value is an exact value instead of a minimum value. |
nDesiredBoostVal | Optionally, specifies the desired boost value (default = -1, which resets to the OriginalBoost value). |
Definition at line 2848 of file Database.cs.
void MyCaffe.db.image.Database.ResetAllDatasetRelabelWithCreator | ( | int | nDsCreatorID | ) |
Reset all dataset relabel flags with a given creator.
nDsCreatorID | Specifies the ID of the dataset creator. |
Definition at line 5266 of file Database.cs.
void MyCaffe.db.image.Database.ResetLabelBoosts | ( | int | nProjectId | ) |
Reset all label boosts to their orignal settings for a project.
nProjectId | Specifies the ID of a project. |
Definition at line 945 of file Database.cs.
void MyCaffe.db.image.Database.ResetLabels | ( | int | nProjectId = 0 , |
int | nSrcId = 0 |
||
) |
Resets all labels back to their original labels for a project.
nProjectId | Optionally, specifies the ID of a project (default = 0). |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 894 of file Database.cs.
void MyCaffe.db.image.Database.SaveChanges | ( | ) |
Saves any changes on the open satabase.
Definition at line 168 of file Database.cs.
void MyCaffe.db.image.Database.SaveLabelCache | ( | ) |
Saves the label cache to the database.
Definition at line 517 of file Database.cs.
void MyCaffe.db.image.Database.SetDatasetParameter | ( | int | nDsId, |
string | strName, | ||
string | strValue | ||
) |
Adds a new parameter or Sets the value of an existing dataset parameter.
nDsId | Specifies the ID of the dataset. |
strName | Specifies the name of the parameter. |
strValue | Specifies the value of the parameter. |
Definition at line 5027 of file Database.cs.
void MyCaffe.db.image.Database.SetDatasetParameters | ( | int | nDsId, |
Dictionary< string, string > | rgP | ||
) |
Adds a batch of new parametes.
nDsId | Specifies the ID of the dataset. |
rgP | Specifies a dictionary of name,value pairs. |
Definition at line 5059 of file Database.cs.
|
protected |
When enabled, saves the bytes to file and returns the file name of the binary file saved as an array of bytes..
The path format returned is 'FILE:filepath'
rgImg | Specifies the bytes to check for a path. |
strType | Specifies an extra name to add to the file name. |
strGuid | Specifies an optional guid string to use as the file name. |
nBackgroundWritingThreadCount | Optionally, specifies the background writing thread count, or 0 for to disable background writing (default = 0). |
Definition at line 2082 of file Database.cs.
|
protectedvirtual |
Sets the image path member to the path used when saving binary data to the file system.
nForceLoad | Optionally, specifies how to force load the data (default = NONE). |
Definition at line 224 of file Database.cs.
void MyCaffe.db.image.Database.SetLabelMapping | ( | LabelMapping | map, |
int | nSrcId = 0 |
||
) |
Saves a label mapping in the database for a data source.
map | Specifies the label mapping. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 830 of file Database.cs.
int MyCaffe.db.image.Database.SetRawImageParameter | ( | int | nRawImageID, |
string | strName, | ||
string | strValue, | ||
double? | dfVal = null , |
||
byte[] | rgData = null , |
||
bool | bSave = true , |
||
bool | bOnlyAddNew = false , |
||
DNNEntities | entities = null |
||
) |
Add a new RawImage parameter (or update an existing if found).
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
strValue | Specifies the value of the parameter as a string. |
dfVal | Specifies the value of the parameter as a numeric value (default = null). |
rgData | Optionally, specifies the byte data associated with the parameter (default = null). |
bSave | Optionally, specifies to save the data to the database (default = true). |
bOnlyAddNew | Optionally, specifies to only add the parameter if it doesnt exist (default = false). |
entities | Optionally, specifies the entities to use (default = null in which case the open data source entities are used). |
Definition at line 3527 of file Database.cs.
int MyCaffe.db.image.Database.SetRawImageParameter | ( | int | nSrcId, |
int | nRawImageID, | ||
string | strName, | ||
string | strValue, | ||
double? | dfVal = null , |
||
byte[] | rgData = null |
||
) |
Add a new RawImage parameter (or update an existing if found).
nSrcId | Specifies the ID of the data source. |
nRawImageID | Specifies the ID of the RawImage. |
strName | Specifies the name of the parameter. |
strValue | Specifies the value of the parameter as a string. |
dfVal | Specifies the value of the parameter as a numeric value (default = null). |
rgData | Optionally, specifies the byte data associated with the parameter (default = null). |
Definition at line 3582 of file Database.cs.
int MyCaffe.db.image.Database.SetRawImageParameterAt | ( | DateTime | dt, |
string | strName, | ||
string | strValue, | ||
double? | dfVal, | ||
byte[] | rgData | ||
) |
Set the RawImage parameter for all RawImages with the given time-stamp in the data source.
dt | Specifies the time-stamp. |
strName | Specifies the name of the parameter. |
strValue | Specifies the value of the parameter as a string. |
dfVal | Specifies the value of the parameter as a numeric value. |
rgData | Optionally, specifies the byte data associated with the parameter (default = null). |
Definition at line 3623 of file Database.cs.
void MyCaffe.db.image.Database.SetSourceParameter | ( | string | strName, |
string | strValue, | ||
int | nSrcId = 0 |
||
) |
Set the value of a data source parameter.
strName | Specifies the parameter name. |
strValue | Specifies the value of the parameter. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 4361 of file Database.cs.
|
static |
Unpack the extra data from a byte array.
rg | Specifies the byte array containing the extra data. |
Definition at line 3376 of file Database.cs.
bool MyCaffe.db.image.Database.UpdateActiveLabel | ( | int | nID, |
int | nLabel, | ||
bool | bActivate = true , |
||
bool | bSaveChanges = true |
||
) |
Update the label value of a label.
nID | Specifies the ID of the label. |
nLabel | Specifies the new label value. |
bActivate | Specifies whether or not to activate the image, the default = true. |
bSaveChanges | Specifies whether or not to save the changes, the default = true. |
Definition at line 1739 of file Database.cs.
void MyCaffe.db.image.Database.UpdateActiveLabelByID | ( | int | nID, |
int | nLabel | ||
) |
Update the label value of a label.
nID | Specifies the ID of the image. |
nLabel | Specifies the new label value. |
Definition at line 1760 of file Database.cs.
void MyCaffe.db.image.Database.UpdateActiveLabelByIndex | ( | int | nSrcId, |
int | nIdx, | ||
int | nLabel | ||
) |
Update the label value of a label.
nSrcId | Specifies the source ID. |
nIdx | Specifies the index of the image. |
nLabel | Specifies the new label value. |
Definition at line 1774 of file Database.cs.
void MyCaffe.db.image.Database.UpdateActiveLabelDirect | ( | int | nID, |
int | nLabel | ||
) |
Directly update the active label and activate the image with the specified ID.
nID | Specifies the image ID. |
nLabel | Specifies the new active label. |
Definition at line 1880 of file Database.cs.
void MyCaffe.db.image.Database.UpdateAllActiveLabels | ( | int | nSrcId, |
int | nLabel, | ||
int? | nOriginalLabel | ||
) |
Update the all items to a label value for the given nSrcId.
nSrcId | Specifies the source ID. |
nLabel | Specifies the new label value. |
nOriginalLabel | Optionally, specifies the original label to relabel. |
Definition at line 1788 of file Database.cs.
void MyCaffe.db.image.Database.UpdateBoost | ( | long | nImageID, |
int | nBoost | ||
) |
Update the image boost of a given image.
nImageID | Specifies the ID of the RawImage. |
nBoost | Specifies the new boost value. |
Definition at line 2883 of file Database.cs.
void MyCaffe.db.image.Database.UpdateBoosts | ( | int | nSrcId, |
DateTime | dtStart, | ||
DateTime | dtEnd, | ||
int | nBoost | ||
) |
Update the boost of all images between a date range.
nSrcId | Specifies the data source ID. |
dtStart | Specifies the start of the date range. |
dtEnd | Specifies the end of the date range. |
nBoost | Specifies the new boost value. |
Definition at line 2899 of file Database.cs.
void MyCaffe.db.image.Database.UpdateDatasetCounts | ( | CancelEvent | evtCancel, |
Log | log, | ||
int | nDatasetCreatorID, | ||
List< string > | rgstrDs, | ||
string | strParamNameForDescription | ||
) |
Updates the dataset counts for a set of datasets.
evtCancel | Specifies a cancel event used to abort the process. |
log | Specifies the Log used for status output. |
nDatasetCreatorID | Specifies the ID of the dataset creator. |
rgstrDs | Specifies a list of the dataset names to update. |
strParamNameForDescription | Specifies the parameter name used for descriptions. |
Definition at line 5353 of file Database.cs.
void MyCaffe.db.image.Database.UpdateDatasetCounts | ( | int | nDsId, |
ConnectInfo | ci = null |
||
) |
Update the dataset counts.
nDsId | Specifies the ID of the dataset to update. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 4821 of file Database.cs.
void MyCaffe.db.image.Database.UpdateDatasetDescription | ( | int | nDsId, |
string | strDesc | ||
) |
Update the description of a given dataset.
nDsId | Specifies the ID of the dataset to update. |
strDesc | Specifies the new description. |
Definition at line 4802 of file Database.cs.
void MyCaffe.db.image.Database.UpdateDatasetImageAnnotations | ( | int | nSrcId, |
int | nImageId, | ||
AnnotationGroupCollection | annotations, | ||
bool | bSetLabelOnly | ||
) |
Update the annotations of a given raw image.
nSrcId | Specifies the ID of the data source. |
nImageId | Specifies the ID of the RawImage to update. |
annotations | Specifies the new annotations to update. |
bSetLabelOnly | Specifies to only set the label. |
Definition at line 3125 of file Database.cs.
void MyCaffe.db.image.Database.UpdateDatasetRelabel | ( | int | nDsID, |
bool | bRelabel | ||
) |
Update the dataset relabel flag for a dataset.
nDsID | Specifies the ID of the dataset. |
bRelabel | Specifies the re-label flag. |
Definition at line 5286 of file Database.cs.
void MyCaffe.db.image.Database.UpdateLabelBoost | ( | int? | nTgtLbl, |
bool | bTgtLblExact, | ||
int? | nTgtBst, | ||
bool | bTgtBstExact, | ||
int? | nNewLbl, | ||
int? | nNewBst, | ||
params int[] | rgSrcId | ||
) |
Update the label and boost for a given search target criteria.
nTgtLbl | Specifies the target label to replace, or null to ignore. |
bTgtLblExact | When a target label is specified, this parameter specifies whether to treat the target label as an exact value (true) for a minimum value (false). |
nTgtBst | Specifies the target boost to replace, or null to ignore. |
bTgtBstExact | When a target boost is specified, this parameter specifies whether to treat the target boost as an exact value (true) for a minimum value (false). |
nNewLbl | Specifies the new label, or null to ignore. |
nNewBst | Specifies the new boost, or null to ignore. |
rgSrcId | Specifies the SourceID's on which to alter the label and/or boost. |
Definition at line 1053 of file Database.cs.
void MyCaffe.db.image.Database.UpdateLabelCounts | ( | Dictionary< int, int > | rgCounts, |
DNNEntities | entities | ||
) |
Updates the label counts in the database for the open data source.
rgCounts | Specifies a dictionary containing (int nLabel, int nCount) pairs. |
entities | Optionally, specifies the entities to use. |
Definition at line 543 of file Database.cs.
void MyCaffe.db.image.Database.UpdateLabelCounts | ( | Dictionary< int, int > | rgCounts, |
int | nSrcId = 0 |
||
) |
Update the label counts for a given data source.
rgCounts | Specifies the counts. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 627 of file Database.cs.
void MyCaffe.db.image.Database.UpdateLabelCounts | ( | int | nSrcId = 0 , |
int | nProjectId = 0 , |
||
ConnectInfo | ci = null |
||
) |
Update the label counts for a given data source and project (optionally) by querying the database for the actual counts.
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
nProjectId | Optionally, specifies the ID of a project to use (default = 0). |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 659 of file Database.cs.
void MyCaffe.db.image.Database.UpdateLabelMapping | ( | int | nNewLabel, |
List< int > | rgOriginalLabels, | ||
int | nSrcId = 0 |
||
) |
Update a label mapping in the database for a data source.
nNewLabel | Specifies the new label. |
rgOriginalLabels | Specifies the original labels that are to be mapped to the new label. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 866 of file Database.cs.
void MyCaffe.db.image.Database.UpdateLabelName | ( | int | nLabel, |
string | strName, | ||
int | nSrcId = 0 |
||
) |
Update the name of a label.
nLabel | Specifies the label. |
strName | Specifies the new name. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 363 of file Database.cs.
bool MyCaffe.db.image.Database.UpdateRawImageDescription | ( | int | nID, |
string | strDescription | ||
) |
Update the description of a RawImage.
nID | Specifies the ID of the RawImage. |
strDescription | Specifies the new description. |
Definition at line 1902 of file Database.cs.
bool MyCaffe.db.image.Database.UpdateRawImageDescriptionFromParameter | ( | int | nID, |
string | strParamName | ||
) |
Update the RawImage description from a RawImage parameter.
nID | Specifies the ID of the RawImage. |
strParamName | Specifies the RawImage parameter name. |
Definition at line 1921 of file Database.cs.
bool MyCaffe.db.image.Database.UpdateRawImageSourceID | ( | int | nImageID, |
int | nSrcID | ||
) |
Updates a given image's source ID.
nImageID | Specifies the ID of the image to update. |
nSrcID | Specifies the new source ID. |
Definition at line 2968 of file Database.cs.
void MyCaffe.db.image.Database.UpdateSaveImagesToFile | ( | bool | bSaveToFile, |
int | nSrcId = 0 |
||
) |
Update the SaveImagesToFile flag in a given Data Source.
bSaveToFile | Specifies whether images are saved to the file system (true), or the directly to the database (false). |
nSrcId | Optionally, specifies a source ID to use. When 0, this parameter is ignored and the open Source is used instead. |
Definition at line 3906 of file Database.cs.
void MyCaffe.db.image.Database.UpdateSource | ( | int | nChannels, |
int | nWidth, | ||
int | nHeight, | ||
bool | bDataIsReal, | ||
int | nSrcId = 0 |
||
) |
Updates a data source.
nChannels | Specifies the number of channels per item. |
nWidth | Specifies the width of each item. |
nHeight | Specifies the height of each item. |
bDataIsReal | Specifies whether or not the item uses real or byte data. |
nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 3934 of file Database.cs.
void MyCaffe.db.image.Database.UpdateSourceCounts | ( | ConnectInfo | ci = null | ) |
Updates the source counts for the open data source by querying the database for the counts.
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 3988 of file Database.cs.
void MyCaffe.db.image.Database.UpdateSourceCounts | ( | int | nImageCount, |
ConnectInfo | ci = null |
||
) |
Updates the source counts for the open data source.
nImageCount | Specifies the new image count. |
ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 3967 of file Database.cs.
bool MyCaffe.db.image.Database.VerifyDataConnection | ( | string | strSrc, |
ConnectInfo | ci | ||
) |
Verify the data connection information.
strSrc | Specifies the data source name to verify. |
ci | Specifies the data connection information to verify. |
Definition at line 94 of file Database.cs.
bool MyCaffe.db.image.Database.WaitForFileWriter | ( | int | nWait = int.MaxValue | ) |
Wait for the file writer to complete writing all files.
nWait | Optionally, specifies an amount of time to wait. |
Definition at line 2062 of file Database.cs.
|
protected |
Specifies whether or not file based data is enabled.
Definition at line 41 of file Database.cs.
|
protected |
Specifies the last index added to the data source.
Definition at line 45 of file Database.cs.
|
protected |
Specifies the default data source.
Definition at line 27 of file Database.cs.
|
protected |
Specifies the base path to the file based data.
Definition at line 33 of file Database.cs.
|
protected |
Specifies the secondary base path to the file based data (used when copying a data source)
Definition at line 37 of file Database.cs.
|
get |
Returns the current entity framwork Source object set during the previous call to Open().
Definition at line 177 of file Database.cs.
|
get |
Returns the last image index added to the database.
Definition at line 142 of file Database.cs.