コード例 #1
0
 /**
  * Decode the Presentation Syntax
  * 
  * @param CDicomStreamReader $stream_reader The stream reader
  * 
  * @return void
  */
 function decodeItem(CDicomStreamReader $stream_reader)
 {
     $this->id = $stream_reader->readUInt8();
     $stream_reader->skip(3);
     $this->abstract_syntax = CDicomPDUItemFactory::decodeItem($stream_reader);
     $this->transfer_syntaxes = CDicomPDUItemFactory::decodeConsecutiveItemsByType($stream_reader, 0x40);
 }
コード例 #2
0
 /**
  * Decode the PDU
  * 
  * @param CDicomStreamReader $stream_reader The stream reader
  *  
  * @return void
  */
 function decodePDU(CDicomStreamReader $stream_reader)
 {
     $this->protocol_version = $stream_reader->readUInt16();
     $stream_reader->skip(2);
     $this->called_AE_title = $stream_reader->readString(16);
     // On test si called_AE_title = AE title du serveur
     $this->calling_AE_title = $stream_reader->readString(16);
     // On passe 32 octets, réservés par Dicom
     $stream_reader->skip(32);
     $this->application_context = CDicomPDUItemFactory::decodeItem($stream_reader);
     $this->presentation_contexts = CDicomPDUItemFactory::decodeConsecutiveItemsByType($stream_reader, 0x20);
     $this->user_info = CDicomPDUItemFactory::decodeItem($stream_reader);
 }
コード例 #3
0
 /**
  * Decode the Presentation Syntax
  * 
  * @param CDicomStreamReader $stream_reader The stream reader
  * 
  * @return null
  */
 function decodeItem(CDicomStreamReader $stream_reader)
 {
     $this->id = $stream_reader->readUInt8();
     $stream_reader->skip(1);
     $this->reason = $stream_reader->readUInt8();
     $stream_reader->skip(1);
     $this->transfer_syntax = CDicomPDUItemFactory::decodeItem($stream_reader);
 }
コード例 #4
0
 /**
  * Decode the PDU
  * 
  * @param CDicomStreamReader $stream_reader The stream reader
  *  
  * @return void
  */
 function decodePDU(CDicomStreamReader $stream_reader)
 {
     $this->protocol_version = $stream_reader->readUInt16();
     // On vérifie que la version du protocole est bien 0001
     if ($this->protocol_version != 0x1) {
         // Erreur
         echo "Protocol version differente de 1";
     }
     $stream_reader->skip(2);
     $this->called_AE_title = $stream_reader->readString(16);
     // On test si called_AE_title = AE title du serveur
     $this->calling_AE_title = $stream_reader->readString(16);
     // On passe 32 octets, réservés par Dicom
     $stream_reader->skip(32);
     $this->application_context = CDicomPDUItemFactory::decodeItem($stream_reader);
     $this->presentation_contexts = CDicomPDUItemFactory::decodeConsecutiveItemsByType($stream_reader, 0x21);
     $this->user_info = CDicomPDUItemFactory::decodeItem($stream_reader);
 }