• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# StudyStorageLocation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中StudyStorageLocation的典型用法代码示例。如果您正苦于以下问题:C# StudyStorageLocation类的具体用法?C# StudyStorageLocation怎么用?C# StudyStorageLocation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StudyStorageLocation类属于命名空间,在下文中一共展示了StudyStorageLocation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SeriesSopUpdateCommand

		/// <summary>
		/// Constructor
		/// </summary>
		public SeriesSopUpdateCommand(StudyStorageLocation originalStudy, StudyStorageLocation targetStudy, UidMapper uidMapper)
			: base("SeriesSopUpdateCommand")
		{
		    _originalStudy = originalStudy;
		    _targetStudy = targetStudy;
			_uidMapper = uidMapper;
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:10,代码来源:SeriesSopUpdateCommand.cs


示例2: UpdateStudySizeInDBCommand

        public UpdateStudySizeInDBCommand(StudyStorageLocation location, RebuildStudyXmlCommand rebuildCommand)
            : base("Update Study Size In DB")
        {
            _location = location;

            _rebuildCommand = rebuildCommand;
        }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:7,代码来源:UpdateStudySizeInDBCommand.cs


示例3: LoadInstance

		/// <summary>
		/// Load the first instance from the first series of the StudyXml file for a study.
		/// </summary>
		/// <param name="location">The storage location of the study.</param>
		/// <returns></returns>
		protected static DicomFile LoadInstance(StudyStorageLocation location)
		{
			string studyXml = Path.Combine(location.GetStudyPath(), location.StudyInstanceUid + ".xml");

			if (!File.Exists(studyXml))
			{
				return null;
			}

			FileStream stream = FileStreamOpener.OpenForRead(studyXml, FileMode.Open);
			var theDoc = new XmlDocument();
			StudyXmlIo.Read(theDoc, stream);
			stream.Close();
			stream.Dispose();
			var xml = new StudyXml();
			xml.SetMemento(theDoc);
            
			IEnumerator<SeriesXml> seriesEnumerator = xml.GetEnumerator();
			if (seriesEnumerator.MoveNext())
			{
				SeriesXml seriesXml = seriesEnumerator.Current;
				IEnumerator<InstanceXml> instanceEnumerator = seriesXml.GetEnumerator();
				if (instanceEnumerator.MoveNext())
				{
					InstanceXml instance = instanceEnumerator.Current;
					var file = new DicomFile("file.dcm",new DicomAttributeCollection(), instance.Collection)
						{TransferSyntax = instance.TransferSyntax};
					return file;
				}
			}

			return null;
		}
开发者ID:jfphilbin,项目名称:ClearCanvas,代码行数:38,代码来源:BaseReapplyRulesServiceLockItemProcessor.cs


示例4: ValidateStudyState

        /// <summary>
        /// Validates the state of the study.
        /// </summary>
        /// <param name="context">Name of the application</param>
        /// <param name="studyStorage">The study to validate</param>
        /// <param name="modes">Specifying what validation to execute</param>
        public void ValidateStudyState(String context, StudyStorageLocation studyStorage, StudyIntegrityValidationModes modes)
        {
            Platform.CheckForNullReference(studyStorage, "studyStorage");
            if (modes == StudyIntegrityValidationModes.None)
                return;

            using (ServerExecutionContext scope = new ServerExecutionContext())
            {

                Study study = studyStorage.LoadStudy(scope.PersistenceContext);
                if (study!=null)
                {
                    StudyXml studyXml = studyStorage.LoadStudyXml();

                    if (modes == StudyIntegrityValidationModes.Default ||
                        (modes & StudyIntegrityValidationModes.InstanceCount) == StudyIntegrityValidationModes.InstanceCount)
                    {
                        if (studyXml != null && studyXml.NumberOfStudyRelatedInstances != study.NumberOfStudyRelatedInstances)
                        {
                            ValidationStudyInfo validationStudyInfo = new ValidationStudyInfo(study, studyStorage.ServerPartition);
                            
                            throw new StudyIntegrityValidationFailure(
                                ValidationErrors.InconsistentObjectCount, validationStudyInfo,
                                String.Format("Number of instances in database and xml do not match: {0} vs {1}.",
                                    study.NumberOfStudyRelatedInstances,
                                    studyXml.NumberOfStudyRelatedInstances
                                ));
                        }
                    }

                }
                
            }
        }
开发者ID:nhannd,项目名称:Xian,代码行数:40,代码来源:StudyIntegrityValidator.cs


示例5: StudyRulesEngine

		public StudyRulesEngine(ServerRulesEngine studyRulesEngine, StudyStorageLocation location, ServerPartition partition, StudyXml studyXml)
		{
			_studyRulesEngine = studyRulesEngine;
			_studyXml = studyXml;
			_location = location;
			_partition = partition ?? ServerPartition.Load(_location.ServerPartitionKey);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:7,代码来源:StudyRulesEngine.cs


示例6: UpdateHistorySeriesMappingCommand

	    public UpdateHistorySeriesMappingCommand(StudyHistory studyHistory, StudyStorageLocation destStudy, UidMapper map) 
            : base("Update Study History Series Mapping")
        {
            _map = map;
            _studyHistory = studyHistory;
            _destStudy = destStudy;
        }
开发者ID:nhannd,项目名称:Xian,代码行数:7,代码来源:UpdateHistoryCommand.cs


示例7: RemoveInstanceFromStudyXmlCommand

 public RemoveInstanceFromStudyXmlCommand(StudyStorageLocation location, StudyXml studyXml, DicomFile file)
     :base("Remove Instance From Study Xml", true)
 {
     _studyLocation = location;
     _file = file;
     _studyXml = studyXml;
 }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:7,代码来源:RemoveInstanceFromStudyXmlCommand.cs


示例8: UpdateInstanceCountCommand

 public UpdateInstanceCountCommand(StudyStorageLocation studyLocation, string seriesInstanceUid, string sopInstanceUid)
     :base("Update Study Count")
 {
     _studyLocation = studyLocation;
     _seriesInstanceUid = seriesInstanceUid;
     _sopInstanceUid = sopInstanceUid;
 }
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:7,代码来源:UpdateInstanceCountCommand.cs


示例9: RemoveStudyStorage

		private static void RemoveStudyStorage(StudyStorageLocation location)
		{
			// NOTE:  This was an IUpdateContext, however, it was modified to be an IReadContext
			// after having problems w/ locks on asystem with a fair amount of load.  The 
			// updates are just automatically committed within the stored procedure when it
			// runs...
			using (IReadContext updateContext = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
			{
				// Setup the delete parameters
				DeleteStudyStorageParameters parms = new DeleteStudyStorageParameters
				                                     	{
				                                     		ServerPartitionKey = location.ServerPartitionKey,
				                                     		StudyStorageKey = location.Key
				                                     	};

				// Get the Insert Instance broker and do the insert
				IDeleteStudyStorage delete = updateContext.GetBroker<IDeleteStudyStorage>();

				if (false == delete.Execute(parms))
				{
					Platform.Log(LogLevel.Error, "Unexpected error when trying to delete study: {0}",
								 location.StudyInstanceUid);
				}
			}
		}
开发者ID:yjsyyyjszf,项目名称:ClearCanvas-1,代码行数:25,代码来源:FilesystemReinventoryItemProcessor.cs


示例10: UpdateSeriesCommand

		/// <summary>
		/// Creates an instance of <see cref="UpdateSeriesCommand"/> to update the existing Series record in the database
		/// </summary>
		public UpdateSeriesCommand(StudyStorageLocation storageLocation, ServerActionContext sopContext)
			: base(String.Concat("Update Series Command"))
		{
			_storageLocation = storageLocation;
			_data = sopContext.Message.DataSet;
			_context = sopContext;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:10,代码来源:UpdateSeriesCommand.cs


示例11: BasePreprocessor

        /// <summary>
        /// Creates an instance of <see cref="AutoReconciler"/> to update
        /// a DICOM file according to the history.
        /// </summary>
        /// <param name="description"></param>
        /// <param name="storageLocation"></param>
        public BasePreprocessor(string description, StudyStorageLocation storageLocation)
        {
            Platform.CheckForEmptyString(description, "description");
            Platform.CheckForNullReference(storageLocation, "storageLocation");

            StorageLocation = storageLocation;
            Description = description;
        }
开发者ID:nhannd,项目名称:Xian,代码行数:14,代码来源:BasePreprocessor.cs


示例12: RemoveInstanceFromStudyXmlCommand

 public RemoveInstanceFromStudyXmlCommand(StudyStorageLocation location, StudyXml studyXml, string seriesInstanceUid, string sopInstanceUid)
     : base("RemoveInstanceFromStudyXmlCommand", true)
 {
     _studyLocation = location;
     _seriesInstanceUid = seriesInstanceUid;
     _sopInstanceUid = sopInstanceUid;
     _studyXml = studyXml;
 }
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:8,代码来源:RemoveInstanceFromStudyXmlCommand.cs


示例13: ReconcileStorage

        /// <summary>
        /// Creates an instance of <see cref="ReconcileStorage"/>
        /// </summary>
        /// <param name="studyLocation">The <see cref="StudyStorageLocation"/> of the study which contains the images to be reconciled.</param>
        /// <param name="folder">The name of the folder used for storing the images to be reconciled.</param>
        public ReconcileStorage(StudyStorageLocation studyLocation, string folder)
        {
            Platform.CheckForNullReference(studyLocation, "studyLocation");
            Platform.CheckForEmptyString(folder, "folder");

            _studyLocation = studyLocation;
            _folder = folder;
        }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:13,代码来源:ImageReconciler.cs


示例14: IsParitionDuplicatePolicyOverridden

        /// <summary>
        /// Indicates whether or not the ServerParition duplicate policy is overridden for the specified study 
        /// </summary>
        /// <param name="studyStorageLocation"></param>
        /// <returns></returns>
        public static bool IsParitionDuplicatePolicyOverridden(StudyStorageLocation studyStorageLocation)
        {
            var list = GetStudyUIDsWithDuplicatePolicyOverride();
            if (list != null && list.Any(uid => uid.Equals(studyStorageLocation.StudyInstanceUid)))
                return true;

            return false;
        }
开发者ID:nhannd,项目名称:Xian,代码行数:13,代码来源:DuplicatePolicy.cs


示例15: SopInstanceProcessorContext

		/// <summary>
		/// Creates an instance of <see cref="SopInstanceProcessorContext"/>
		/// </summary>
		/// <param name="commandProcessor">The <see cref="ServerCommandProcessor"/> used in the context</param>
		/// <param name="studyLocation">The <see cref="StudyStorageLocation"/> of the study being processed</param>
		/// <param name="uidGroup">A String value respresenting the group of SOP instances which are being processed.</param>
		/// <param name="request">An external request that may have triggered this item.</param>
		public SopInstanceProcessorContext(ServerCommandProcessor commandProcessor, StudyStorageLocation studyLocation,
									string uidGroup, ExternalRequestQueue request = null)
		{
			_commandProcessor = commandProcessor;
			_studyLocation = studyLocation;
			_group = uidGroup;
			_request = request;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:15,代码来源:SopInstanceProcessorContext.cs


示例16: Insert

        public void Insert(StudyStorageLocation storageLocation, string studyInstanceUid)
        {
            lock (_cache)
            {

                _cache.Add(studyInstanceUid, storageLocation, null, Cache.NoAbsoluteExpiration, _retentionTime, CacheItemPriority.Normal, null);
            }
        }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:8,代码来源:StudyStorageCache.cs


示例17: UpdateInstanceCommand

		public UpdateInstanceCommand(ServerPartition partition,
								  StudyStorageLocation studyLocation,
								  DicomFile file)
			: base("Update existing SOP Instance")
		{
			_partition = partition;
			_studyLocation = studyLocation;
			_file = file;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:9,代码来源:UpdateInstanceCommand.cs


示例18: ArchiveStudyCommand

		public ArchiveStudyCommand(StudyStorageLocation storageLocation, string hsmPath, string tempPath, PartitionArchive archive)
		{
			_storageLocation = storageLocation;
			_hsmPath = hsmPath;
			_tempPath = tempPath;
			_archive = archive;

			CreateSubCommands();
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:9,代码来源:ArchiveStudyCommand.cs


示例19: InsertInstanceCommand

		public InsertInstanceCommand(DicomFile file, StudyStorageLocation location)
			: base("Insert Instance into Database")
		{
			Platform.CheckForNullReference(file, "Dicom File object");
			Platform.CheckForNullReference(location, "Study Storage Location");

			_file = file;
			_storageLocation = location;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:9,代码来源:InsertInstanceCommand.cs


示例20: UpdateStudySizeInDBCommand

        public UpdateStudySizeInDBCommand(StudyStorageLocation location)
            : base("Update Study Size In DB", true)
        {
            _location = location;

            // this may take a few ms so it's better to do it here instead in OnExecute()
            StudyXml studyXml = _location.LoadStudyXml();
            _studySizeInKB = studyXml.GetStudySize() / KB;
        } 
开发者ID:fparisotto,项目名称:ClearCanvas-Contrib,代码行数:9,代码来源:UpdateStudySizeInDBCommand.cs



注:本文中的StudyStorageLocation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# StudyXml类代码示例发布时间:2022-05-24
下一篇:
C# Student类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap