private void SendSetImageBoxRequest(DicomClient client, ClientAssociationParameters association, DicomMessage responseMessage)
 {
     if (this._currentImageBoxIndex >= this._imageBoxPixelModuleIods.Count)
     {
         this._nextRequestType = RequestType.PrintAction;
         this.SendActionPrintRequest(client, association, responseMessage);
     }
     else
     {
         if (this._currentImageBoxIndex == 0)
         {
             this._firstFilmBoxResponseMessage = responseMessage.DataSet;
             this._imageBoxUid = responseMessage.AffectedSopInstanceUid;
         }
         BasicFilmBoxModuleIod iod = new BasicFilmBoxModuleIod(this._firstFilmBoxResponseMessage);
         if (this._currentImageBoxIndex > iod.ReferencedImageBoxSequenceList.Count)
         {
             throw new DicomException("Current Image Box Index is greater than number of Referenced ImageBox Sequences - set image box data");
         }
         ImageBoxPixelModuleIod iod2    = this._imageBoxPixelModuleIods[this._currentImageBoxIndex];
         DicomMessage           message = new DicomMessage(null, iod2.DicomAttributeCollection)
         {
             RequestedSopClassUid    = SopClass.BasicGrayscaleImageBoxSopClassUid,
             RequestedSopInstanceUid = iod.ReferencedImageBoxSequenceList[this._currentImageBoxIndex].ReferencedSopInstanceUid
         };
         byte presentationID = association.FindAbstractSyntax(SopClass.BasicGrayscalePrintManagementMetaSopClass);
         this._currentImageBoxIndex++;
         client.SendNSetRequest(presentationID, client.NextMessageID(), message);
     }
 }
Exemplo n.º 2
0
        private void SendSetImageBoxRequest(DicomClient client, ClientAssociationParameters association)
        {
            if (_currentImageBoxIndex >= _imageBoxPixelModuleIods.Count)
            {
                // done sending images box - send print request
                _nextRequestType = RequestType.PrintAction;
                SendActionPrintRequest(client, association);
            }
            else
            {
                // want to get first film box response - although not sure if CC is using .net 3.5.. prolly not so do it old way
                IEnumerator <DicomAttributeCollection> filmBoxResponseEnumerator = _filmBoxResponseMessages.Values.GetEnumerator();
                filmBoxResponseEnumerator.Reset();
                filmBoxResponseEnumerator.MoveNext();

                BasicFilmBoxModuleIod basicFilmBoxModuleIod = new BasicFilmBoxModuleIod(filmBoxResponseEnumerator.Current);

                if (_currentImageBoxIndex > basicFilmBoxModuleIod.ReferencedImageBoxSequenceList.Count)
                {
                    throw new DicomException("Current Image Box Index is greater than number of Referenced ImageBox Sequences - set image box data");
                }

                ImageBoxPixelModuleIod imageBoxPixelModuleIod = _imageBoxPixelModuleIods[_currentImageBoxIndex];

                DicomMessage newRequestMessage = new DicomMessage(null, (DicomAttributeCollection)imageBoxPixelModuleIod.DicomAttributeProvider);
                newRequestMessage.RequestedSopClassUid    = SopClass.BasicGrayscaleImageBoxSopClassUid;
                newRequestMessage.RequestedSopInstanceUid = basicFilmBoxModuleIod.ReferencedImageBoxSequenceList[_currentImageBoxIndex].ReferencedSopInstanceUid;

                byte pcid = association.FindAbstractSyntax(SopClass.BasicGrayscalePrintManagementMetaSopClass);

                _currentImageBoxIndex++;
                client.SendNSetRequest(pcid, client.NextMessageID(), newRequestMessage);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sends the find request.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="association">The association.</param>
        private void SendFindRequest(DicomClient client, ClientAssociationParameters association)
        {
            byte pcid = association.FindAbstractSyntax(FindSopClass);

            if (pcid > 0)
            {
                DicomMessage dicomMessage = new DicomMessage(new DicomAttributeCollection(), _requestAttributeCollection.Copy());
                client.SendCFindRequest(pcid, client.NextMessageID(), dicomMessage);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Sends the find request.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="association">The association.</param>
        private static void SendRequest(DicomClient client, ClientAssociationParameters association)
        {
            DicomMessage newRequestMessage = new DicomMessage();

            PrinterModuleIod.SetCommonTags(newRequestMessage.DataSet);
            byte pcid = association.FindAbstractSyntax(SopClass.PrinterSopClass);

            if (pcid > 0)
            {
                client.SendNGetRequest(DicomUids.PrinterSOPInstance, pcid, client.NextMessageID(), newRequestMessage);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Adds the verification presentation context.
        /// </summary>
        private void SetPresentationContexts()
        {
            byte pcid = _assocParams.FindAbstractSyntax(SopClass.VerificationSopClass);

            if (pcid == 0)
            {
                pcid = _assocParams.AddPresentationContext(SopClass.VerificationSopClass);

                _assocParams.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian);
                _assocParams.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Generic routine to send the next C-ECHO-RQ message.
        /// </summary>
        /// <param name="client">DICOM Client class</param>
        /// <param name="association">Association Parameters</param>
        private void SendVerificationRequest(DicomClient client, ClientAssociationParameters association)
        {
            byte pcid = association.FindAbstractSyntax(SopClass.VerificationSopClass);

            client.SendCEchoRequest(pcid, client.NextMessageID());
        }
Exemplo n.º 7
0
		/// <summary>
		/// Generic routine to send the next C-ECHO-RQ message.
		/// </summary>
		/// <param name="client">DICOM Client class</param>
		/// <param name="association">Association Parameters</param>
		private void SendVerificationRequest(DicomClient client, ClientAssociationParameters association)
		{
			byte pcid = association.FindAbstractSyntax(SopClass.VerificationSopClass);

			client.SendCEchoRequest(pcid, client.NextMessageID());
		}
Exemplo n.º 8
0
 /// <summary>
 /// Sends the find request.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="association">The association.</param>
 private static void SendRequest(DicomClient client, ClientAssociationParameters association)
 {
     DicomMessage newRequestMessage = new DicomMessage();
     PrinterModuleIod.SetCommonTags(newRequestMessage.DataSet);
     byte pcid = association.FindAbstractSyntax(SopClass.PrinterSopClass);
     if (pcid > 0)
     {
         client.SendNGetRequest(DicomUids.PrinterSOPInstance, pcid, client.NextMessageID(), newRequestMessage);
     }
 }
Exemplo n.º 9
0
        private void SendSetImageBoxRequest(DicomClient client, ClientAssociationParameters association)
        {
            if (_currentImageBoxIndex >= _imageBoxPixelModuleIods.Count)
            {
                // done sending images box - send print request
                _nextRequestType = RequestType.PrintAction;
                SendActionPrintRequest(client, association);
            }
            else
            {
                // want to get first film box response - although not sure if CC is using .net 3.5.. prolly not so do it old way
                IEnumerator<DicomAttributeCollection> filmBoxResponseEnumerator = _filmBoxResponseMessages.Values.GetEnumerator();
                filmBoxResponseEnumerator.Reset();
                filmBoxResponseEnumerator.MoveNext();

                BasicFilmBoxModuleIod basicFilmBoxModuleIod = new BasicFilmBoxModuleIod(filmBoxResponseEnumerator.Current);

                if (_currentImageBoxIndex > basicFilmBoxModuleIod.ReferencedImageBoxSequenceList.Count)
                {
                    throw new DicomException("Current Image Box Index is greater than number of Referenced ImageBox Sequences - set image box data");
                }

                ImageBoxPixelModuleIod imageBoxPixelModuleIod = _imageBoxPixelModuleIods[_currentImageBoxIndex];

                DicomMessage newRequestMessage = new DicomMessage(null, (DicomAttributeCollection)imageBoxPixelModuleIod.DicomAttributeProvider);
                newRequestMessage.RequestedSopClassUid = SopClass.BasicGrayscaleImageBoxSopClassUid;
                newRequestMessage.RequestedSopInstanceUid = basicFilmBoxModuleIod.ReferencedImageBoxSequenceList[_currentImageBoxIndex].ReferencedSopInstanceUid;

                byte pcid = association.FindAbstractSyntax(SopClass.BasicGrayscalePrintManagementMetaSopClass);

                _currentImageBoxIndex++;
                client.SendNSetRequest(pcid, client.NextMessageID(), newRequestMessage);
            }

        }