MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The DatabaseTemporal is used to manage all temporal specific database objects. More...
Public Member Functions | |
DatabaseTemporal () | |
The constructor. More... | |
override void | Open (int nSrcId, FORCE_LOAD nForceLoad=FORCE_LOAD.NONE, ConnectInfo ci=null) |
Opens a data source. More... | |
void | EnableBulk (bool bEnable) |
Enable bulk inserts. More... | |
override void | Close () |
Close the current data source. More... | |
override bool | DeleteSource (int nSrcId=0) |
Delete a data source from the database. More... | |
override bool | DeleteSourceData (int nSrcId=0) |
Delete the data source data (images, means, results and parameters) from the database. More... | |
override void | DeleteDataset (string strDsName, bool bDeleteRelatedProjects, Log log, CancelEvent evtCancel) |
Delete a dataset. More... | |
void | DeleteRawValues (int nSrcId=0) |
Delete all RawValues in a data source. More... | |
void | DeleteValueItems (int nSrcId=0) |
Delete all ValueItems in a data source. More... | |
void | PutRawValue (int nSrcID, int nItemID, RawValueDataCollection data) |
Add static raw values for a data stream. More... | |
void | PutRawValue (int nSrcID, int nItemID, DateTime dt, RawValueDataCollection data, bool bActive) |
Add raw values for a data stream. More... | |
void | SaveRawValues () |
Save the raw values. More... | |
void | ClearRawValues () |
Clear the raw values. More... | |
RawValueSet | GetValues (int nSrcID, int nItemID) |
Load the static value stream categorical values for a given source and item. More... | |
int | AddValueItem (int nSrcId, int nItemIdx, string strName, DateTime? dtStart=null, DateTime? dtEnd=null, int? nSteps=null) |
Add a new value item to the database. More... | |
int | GetValueItemID (string strName) |
Returns the value item ID given the value item name if found, or 0. More... | |
string | GetValueItemName (int nID) |
Returns the value item ID given the value item name if found, or 0. More... | |
List< int > | GetAllItemIDs (int nSrcID) |
Returns a list of all value item IDs associated with a SourceID. More... | |
int | GetValueItemIndex (string strName) |
Returns the value item ID given the value item name if found, or 0. More... | |
string | GetValueItemNamByIndex (int nIdx) |
Returns the value item name given the value item index if found, or 0. More... | |
List< int > | GetAllItemIndices (int nSrcID) |
Returns a list of all value item Indices associated with a SourceID. More... | |
List< ValueItem > | GetAllValueItems (int nSrcID) |
Returns a list of all value items associated with a SourceID. More... | |
int | AddValueStream (int nSrcID, string strName, int nOrdering, STREAM_CLASS_TYPE classType, STREAM_VALUE_TYPE valType, DateTime? dtStart=null, DateTime? dtEnd=null, int? nSecPerStep=null, int nTotalSteps=1) |
Add a new value stream to the source ID. More... | |
List< ValueStream > | GetAllValueStreams (int nSrcID) |
Returns a list of all value streams associated with a SourceID. More... | |
Public Member Functions inherited from MyCaffe.db.image.Database | |
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... | |
void | Open (string strSrc, bool bForceLoadImageFilePath=false) |
Opens a 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... | |
void | DeleteSources (params string[] rgstrSrc) |
Delete the list of data sources, listed by name, 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... | |
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 void | DeleteDatasetTemporalTables (int nSrcIDTrain, int nSrcIDTest, Log log, CancelEvent evtCancel) |
Delete a dataset temporal tables.. More... | |
static bool | DeleteRawValuesEx (int nSrcId, Log log, CancelEvent evtCancel) |
Delete all RawValues in a data source. More... | |
Static Public Member Functions inherited from MyCaffe.db.image.Database | |
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... | |
Additional Inherited Members | |
Public Types inherited from MyCaffe.db.image.Database | |
enum | FORCE_LOAD { NONE , FROM_FILE , FROM_DB } |
Defines the force load type. More... | |
Protected Member Functions inherited from MyCaffe.db.image.Database | |
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 inherited from MyCaffe.db.image.Database | |
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 inherited from MyCaffe.db.image.Database | |
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 DatabaseTemporal is used to manage all temporal specific database objects.
Definition at line 24 of file DatabaseTemporal.cs.
MyCaffe.db.temporal.DatabaseTemporal.DatabaseTemporal | ( | ) |
The constructor.
Definition at line 36 of file DatabaseTemporal.cs.
int MyCaffe.db.temporal.DatabaseTemporal.AddValueItem | ( | int | nSrcId, |
int | nItemIdx, | ||
string | strName, | ||
DateTime? | dtStart = null , |
||
DateTime? | dtEnd = null , |
||
int? | nSteps = null |
||
) |
Add a new value item to the database.
nSrcId | Specifies the source ID of the value item. |
nItemIdx | Specifies the index of the item. |
strName | Specifies the name of the value item. |
dtStart | Optionally, specifies the start time. |
dtEnd | Optionally, specifies the end time. |
nSteps | Optionally, specifies the steps. |
Definition at line 382 of file DatabaseTemporal.cs.
int MyCaffe.db.temporal.DatabaseTemporal.AddValueStream | ( | int | nSrcID, |
string | strName, | ||
int | nOrdering, | ||
STREAM_CLASS_TYPE | classType, | ||
STREAM_VALUE_TYPE | valType, | ||
DateTime? | dtStart = null , |
||
DateTime? | dtEnd = null , |
||
int? | nSecPerStep = null , |
||
int | nTotalSteps = 1 |
||
) |
Add a new value stream to the source ID.
nSrcID | Specifies the source ID. |
strName | Specifies the value stream name. |
nOrdering | Specifies the value stream ordering. |
classType | Specifies the value stream class type (STATIC, OBSERVED or KNOWN) |
valType | Specifies the value stream type (NUMERIC or CATEGORICAL). |
dtStart | Optionally, specifies the value stream start date (null for STATIC). |
dtEnd | Optionally, specifies the value stream end date (null for STATIC). |
nSecPerStep | Optionally, specifies the value stream seconds per step (null for STATIC). |
nTotalSteps | Optionally, specifies the total number of steps (1 for STATIC). |
Definition at line 547 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.ClearRawValues | ( | ) |
Clear the raw values.
Definition at line 344 of file DatabaseTemporal.cs.
|
virtual |
Close the current data source.
Reimplemented from MyCaffe.db.image.Database.
Definition at line 83 of file DatabaseTemporal.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 from MyCaffe.db.image.Database.
Definition at line 151 of file DatabaseTemporal.cs.
|
static |
Delete a dataset temporal tables..
nSrcIDTrain | Specifies the train source ID. |
nSrcIDTest | Specifies the test source ID. |
log | Specifies the Log object for status output. |
evtCancel | Specifies the cancel event used to cancel the delete. |
Definition at line 172 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.DeleteRawValues | ( | int | nSrcId = 0 | ) |
Delete all RawValues 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 195 of file DatabaseTemporal.cs.
|
static |
Delete all RawValues in a data source.
nSrcId | Specifies the data source. |
log | Specifies the output log. |
evtCancel | Specifies the cancel event used to abort the operation. |
Definition at line 214 of file DatabaseTemporal.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 from MyCaffe.db.image.Database.
Definition at line 107 of file DatabaseTemporal.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 from MyCaffe.db.image.Database.
Definition at line 133 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.DeleteValueItems | ( | int | nSrcId = 0 | ) |
Delete all ValueItems 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 257 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.EnableBulk | ( | bool | bEnable | ) |
Enable bulk inserts.
bEnable | Enables the bulk mode. |
Definition at line 62 of file DatabaseTemporal.cs.
List< int > MyCaffe.db.temporal.DatabaseTemporal.GetAllItemIDs | ( | int | nSrcID | ) |
Returns a list of all value item IDs associated with a SourceID.
nSrcID | Specifies the source ID. |
Definition at line 453 of file DatabaseTemporal.cs.
List< int > MyCaffe.db.temporal.DatabaseTemporal.GetAllItemIndices | ( | int | nSrcID | ) |
Returns a list of all value item Indices associated with a SourceID.
nSrcID | Specifies the source ID. |
Definition at line 509 of file DatabaseTemporal.cs.
List< ValueItem > MyCaffe.db.temporal.DatabaseTemporal.GetAllValueItems | ( | int | nSrcID | ) |
Returns a list of all value items associated with a SourceID.
nSrcID | Specifies the source ID. |
Definition at line 522 of file DatabaseTemporal.cs.
List< ValueStream > MyCaffe.db.temporal.DatabaseTemporal.GetAllValueStreams | ( | int | nSrcID | ) |
Returns a list of all value streams associated with a SourceID.
nSrcID | Specifies the source ID. |
Definition at line 583 of file DatabaseTemporal.cs.
int MyCaffe.db.temporal.DatabaseTemporal.GetValueItemID | ( | string | strName | ) |
Returns the value item ID given the value item name if found, or 0.
strName | Specifies the value item to find. |
Definition at line 410 of file DatabaseTemporal.cs.
int MyCaffe.db.temporal.DatabaseTemporal.GetValueItemIndex | ( | string | strName | ) |
Returns the value item ID given the value item name if found, or 0.
strName | Specifies the value item to find. |
Definition at line 466 of file DatabaseTemporal.cs.
string MyCaffe.db.temporal.DatabaseTemporal.GetValueItemNamByIndex | ( | int | nIdx | ) |
Returns the value item name given the value item index if found, or 0.
nIdx | Specifies the index of the value item to find. |
Definition at line 484 of file DatabaseTemporal.cs.
string MyCaffe.db.temporal.DatabaseTemporal.GetValueItemName | ( | int | nID | ) |
Returns the value item ID given the value item name if found, or 0.
nID | Specifies the value item ID to find. |
Definition at line 428 of file DatabaseTemporal.cs.
RawValueSet MyCaffe.db.temporal.DatabaseTemporal.GetValues | ( | int | nSrcID, |
int | nItemID | ||
) |
Load the static value stream categorical values for a given source and item.
nSrcID | Specifies the source ID. |
nItemID | Specifies the item ID. |
Definition at line 355 of file DatabaseTemporal.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 from MyCaffe.db.image.Database.
Definition at line 51 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.PutRawValue | ( | int | nSrcID, |
int | nItemID, | ||
DateTime | dt, | ||
RawValueDataCollection | data, | ||
bool | bActive | ||
) |
Add raw values for a data stream.
nSrcID | Specifies the source ID. |
nItemID | Specifies the item ID. |
dt | Specifies the date/time associated with the value. |
data | Specifies the raw data values. |
bActive | Specifies the active state of the record. |
Exception | An exception is thrown on error. |
Definition at line 306 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.PutRawValue | ( | int | nSrcID, |
int | nItemID, | ||
RawValueDataCollection | data | ||
) |
Add static raw values for a data stream.
nSrcID | Specifies the source ID. |
nItemID | Specifies the item ID. |
data | Specifies the raw data values. |
Exception | An exception is thrown on error. |
Definition at line 283 of file DatabaseTemporal.cs.
void MyCaffe.db.temporal.DatabaseTemporal.SaveRawValues | ( | ) |
Save the raw values.
Definition at line 322 of file DatabaseTemporal.cs.