Example #1
0
        /// <summary>
        /// Add the given DicomServer using the Destination Actor Configuration.
        /// </summary>
        /// <param name="dicomServerType">Dicom Server Type.</param>
        /// <param name="fromActorType">From Actor Type.</param>
        /// <param name="commonConfig">Common Configuration.</param>
        /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param>
        protected void AddDicomServer(DicomServerTypeEnum dicomServerType, ActorTypeEnum fromActorType, CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection)
        {
            foreach (BasePeerToPeerConfig basePeerToPeerConfig in peerToPeerConfigCollection)
            {
                if ((basePeerToPeerConfig is DicomPeerToPeerConfig) &&
                    (basePeerToPeerConfig.ToActorName.TypeId == _actorName.TypeId) &&
                    (basePeerToPeerConfig.FromActorName.Type == fromActorType))
                {
                    DicomServer dicomServer = ClientServerFactory.CreateDicomServer(dicomServerType, this, basePeerToPeerConfig.FromActorName);
                    if (dicomServer != null)
                    {
                        dicomServer.ApplyConfig(commonConfig, (DicomPeerToPeerConfig)basePeerToPeerConfig);
                        SubscribeEvent(dicomServer);
                        _dicomServers.Add(dicomServer.ActorName.TypeId, dicomServer);

                        // Initialize the connection with the from actor as being active.
                        // - this can always be overruled by the application later.
                        SetActorDefaultConnectionActive(basePeerToPeerConfig.FromActorName);
                    }
                }
            }
        }
Example #2
0
        /// <summary>
        /// Create a Dicom Server of the given type.
        /// </summary>
        /// <param name="dicomServerType">Dicom Server Type - enum.</param>
        /// <param name="toActor">To Actor instance.</param>
        /// <param name="fromActorName">From Actor Name.</param>
        /// <returns>Dicom Server.</returns>
        public static DicomServer CreateDicomServer(DicomServerTypeEnum dicomServerType, BaseActor toActor, ActorName fromActorName)
        {
            DicomServer dicomServer = null;

            switch (dicomServerType)
            {
            case DicomServerTypeEnum.DicomMppsServer:
                dicomServer = new DicomMppsServer(toActor, fromActorName);
                break;

            case DicomServerTypeEnum.DicomPrintServer:
                dicomServer = new DicomPrintServer(toActor, fromActorName);
                break;

            case DicomServerTypeEnum.DicomQueryRetrieveServer:
                dicomServer = new DicomQueryRetrieveServer(toActor, fromActorName);
                break;

            case DicomServerTypeEnum.DicomStorageCommitServer:
                dicomServer = new DicomStorageCommitServer(toActor, fromActorName);
                break;

            case DicomServerTypeEnum.DicomStorageServer:
                dicomServer = new DicomStorageServer(toActor, fromActorName);
                break;

            case DicomServerTypeEnum.DicomWorklistServer:
                dicomServer = new DicomWorklistServer(toActor, fromActorName);
                break;

            case DicomServerTypeEnum.Unknown:
            default:
                break;
            }

            return(dicomServer);
        }
Example #3
0
        /// <summary>
        /// Add the given DicomServer using the Destination Actor Configuration.
        /// </summary>
        /// <param name="dicomServerType">Dicom Server Type.</param>
        /// <param name="fromActorType">From Actor Type.</param>
        /// <param name="commonConfig">Common Configuration.</param>
        /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param>
        protected void AddDicomServer(DicomServerTypeEnum dicomServerType, ActorTypeEnum fromActorType, CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection)
        {
            foreach (BasePeerToPeerConfig basePeerToPeerConfig in peerToPeerConfigCollection)
            {
                if ((basePeerToPeerConfig is DicomPeerToPeerConfig) &&
                    (basePeerToPeerConfig.ToActorName.TypeId == _actorName.TypeId) &&
                    (basePeerToPeerConfig.FromActorName.Type == fromActorType))
                {
                    DicomServer dicomServer = ClientServerFactory.CreateDicomServer(dicomServerType, this, basePeerToPeerConfig.FromActorName);
                    if (dicomServer != null)
                    {
                        dicomServer.ApplyConfig(commonConfig, (DicomPeerToPeerConfig)basePeerToPeerConfig);
                        SubscribeEvent(dicomServer);
                        _dicomServers.Add(dicomServer.ActorName.TypeId, dicomServer);

                        // Initialize the connection with the from actor as being active.
                        // - this can always be overruled by the application later.
                        SetActorDefaultConnectionActive(basePeerToPeerConfig.FromActorName);
                    }
                }
            }
        }
Example #4
0
		/// <summary>
		/// Create a Dicom Server of the given type.
		/// </summary>
		/// <param name="dicomServerType">Dicom Server Type - enum.</param>
		/// <param name="toActor">To Actor instance.</param>
		/// <param name="fromActorName">From Actor Name.</param>
		/// <returns>Dicom Server.</returns>
		public static DicomServer CreateDicomServer(DicomServerTypeEnum dicomServerType, BaseActor toActor, ActorName fromActorName)
		{
			DicomServer dicomServer = null;

			switch (dicomServerType)
			{
				case DicomServerTypeEnum.DicomMppsServer:
					dicomServer = new DicomMppsServer(toActor, fromActorName);
					break;
				case DicomServerTypeEnum.DicomPrintServer:
					dicomServer = new DicomPrintServer(toActor, fromActorName);
					break;
				case DicomServerTypeEnum.DicomQueryRetrieveServer:
					dicomServer = new DicomQueryRetrieveServer(toActor, fromActorName);
					break;
				case DicomServerTypeEnum.DicomStorageCommitServer:
					dicomServer = new DicomStorageCommitServer(toActor, fromActorName);
					break;
				case DicomServerTypeEnum.DicomStorageServer:
					dicomServer = new DicomStorageServer(toActor, fromActorName);
					break;
				case DicomServerTypeEnum.DicomWorklistServer:
					dicomServer = new DicomWorklistServer(toActor, fromActorName);
					break;
				case DicomServerTypeEnum.Unknown:
				default:
					break;
			}

			return dicomServer;
		}