本文整理汇总了C#中StudyStorageLocation.GetKey方法的典型用法代码示例。如果您正苦于以下问题:C# StudyStorageLocation.GetKey方法的具体用法?C# StudyStorageLocation.GetKey怎么用?C# StudyStorageLocation.GetKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StudyStorageLocation
的用法示例。
在下文中一共展示了StudyStorageLocation.GetKey方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Insert
static public void Insert(StudyStorageLocation storageLocation, string studyInstanceUId, string seriesInstanceUid, string sopInstanceUid, DicomPixelData pixeldata)
{
lock (_cache)
{
string key =
String.Format("{0}/{1}/{2}/{3}", storageLocation.GetKey().Key, studyInstanceUId, seriesInstanceUid, sopInstanceUid);
_cache.Add(key, pixeldata, null, Cache.NoAbsoluteExpiration, _retentionTime, CacheItemPriority.Normal, null);
}
}
示例2: Find
static public DicomPixelData Find(StudyStorageLocation storageLocation, string studyInstanceUId, string seriesInstanceUid, string sopInstanceUid )
{
lock (_cache)
{
string key =
String.Format("{0}/{1}/{2}/{3}", storageLocation.GetKey().Key, studyInstanceUId, seriesInstanceUid, sopInstanceUid);
object cachedPD = _cache.Get(key);
if (cachedPD != null)
{
//Platform.Log(LogLevel.Info, "Pixel data found in cache");
return cachedPD as DicomPixelData;
}
else
return null;
}
}
示例3: UpdateStudyStatus
/// <summary>
/// Updates the status of a study to a new status
/// </summary>
protected virtual void UpdateStudyStatus(StudyStorageLocation theStudyStorage, StudyStatusEnum theStatus, TransferSyntax theSyntax)
{
DBUpdateTime.Add(
delegate
{
using (
IUpdateContext updateContext =
PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
{
// Select the Server Transfer Syntax
ServerTransferSyntaxSelectCriteria syntaxCriteria = new ServerTransferSyntaxSelectCriteria();
IServerTransferSyntaxEntityBroker syntaxBroker =
updateContext.GetBroker<IServerTransferSyntaxEntityBroker>();
syntaxCriteria.Uid.EqualTo(theSyntax.UidString);
ServerTransferSyntax serverSyntax = syntaxBroker.FindOne(syntaxCriteria);
if (serverSyntax == null)
{
Platform.Log(LogLevel.Error, "Unable to load ServerTransferSyntax for {0}. Unable to update study status.", theSyntax.Name);
return;
}
// Get the FilesystemStudyStorage update broker ready
IFilesystemStudyStorageEntityBroker filesystemQueueBroker =
updateContext.GetBroker<IFilesystemStudyStorageEntityBroker>();
FilesystemStudyStorageUpdateColumns filesystemQueueUpdate = new FilesystemStudyStorageUpdateColumns
{
ServerTransferSyntaxKey = serverSyntax.GetKey()
};
FilesystemStudyStorageSelectCriteria filesystemQueueCriteria = new FilesystemStudyStorageSelectCriteria();
filesystemQueueCriteria.StudyStorageKey.EqualTo(theStudyStorage.GetKey());
// Get the StudyStorage update broker ready
IStudyStorageEntityBroker studyStorageBroker =
updateContext.GetBroker<IStudyStorageEntityBroker>();
StudyStorageUpdateColumns studyStorageUpdate = new StudyStorageUpdateColumns
{
StudyStatusEnum = theStatus,
LastAccessedTime = Platform.Time
};
if (!filesystemQueueBroker.Update(filesystemQueueCriteria,filesystemQueueUpdate))
{
Platform.Log(LogLevel.Error, "Unable to update FilesystemQueue row: Study {0}, Server Entity {1}",
theStudyStorage.StudyInstanceUid, theStudyStorage.ServerPartitionKey);
}
else if (!studyStorageBroker.Update(theStudyStorage.GetKey(),studyStorageUpdate))
{
Platform.Log(LogLevel.Error, "Unable to update StudyStorage row: Study {0}, Server Entity {1}",
theStudyStorage.StudyInstanceUid, theStudyStorage.ServerPartitionKey);
}
else
updateContext.Commit();
}
}
);
}
示例4: CreateStudyHistoryRecord
public static StudyHistory CreateStudyHistoryRecord(IUpdateContext updateContext,
StudyStorageLocation primaryStudyLocation, StudyStorageLocation secondaryStudyLocation,
StudyHistoryTypeEnum type, object entryInfo, object changeLog)
{
StudyHistoryUpdateColumns columns = new StudyHistoryUpdateColumns
{
InsertTime = Platform.Time,
StudyHistoryTypeEnum = type,
StudyStorageKey = primaryStudyLocation.GetKey(),
DestStudyStorageKey =
secondaryStudyLocation != null
? secondaryStudyLocation.GetKey()
: primaryStudyLocation.GetKey(),
StudyData = XmlUtils.SerializeAsXmlDoc(entryInfo) ?? new XmlDocument(),
ChangeDescription = XmlUtils.SerializeAsXmlDoc(changeLog) ?? new XmlDocument()
};
IStudyHistoryEntityBroker broker = updateContext.GetBroker<IStudyHistoryEntityBroker>();
return broker.Insert(columns);
}
示例5: Find
static public DicomPixelData Find(StudyStorageLocation storageLocation, string studyInstanceUId, string seriesInstanceUid, string sopInstanceUid )
{
string key = String.Format("{0}/{1}/{2}/{3}", storageLocation.GetKey().Key, studyInstanceUId, seriesInstanceUid, sopInstanceUid);
return _cache.Get(key) as DicomPixelData;
}