/// <summary> /// Performs the find request to the specified remote dicom server with the specified attributes. /// </summary> /// <param name="clientAETitle">The client AE title.</param> /// <param name="remoteAE">The remote AE.</param> /// <param name="remoteHost">The remote host.</param> /// <param name="remotePort">The remote port.</param> /// <param name="requestAttributeCollection">The request attribute collection.</param> /// <returns></returns> public IList <DicomAttributeCollection> Find(string clientAETitle, string remoteAE, string remoteHost, int remotePort, DicomAttributeCollection requestAttributeCollection) { if (requestAttributeCollection == null) { throw new ArgumentNullException("requestAttributeCollection"); } _requestAttributeCollection = requestAttributeCollection; if (!ValidateQuery()) { throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Invalid query for SCU type {0}", GetType().FullName.Substring(GetType().FullName.LastIndexOf(".") + 1))); } _results = new List <DicomAttributeCollection>(); if (ReuseAssociation && Status == ScuOperationStatus.Running) { ProgressEvent.Reset(); SendFindRequest(_dicomClient, _associationParameters); ProgressEvent.WaitOne(); } else { ClientAETitle = clientAETitle; RemoteAE = remoteAE; RemoteHost = remoteHost; RemotePort = remotePort; Connect(); } return(_results); }