コード例 #1
0
 /**
  * Decode the User Information
  * 
  * @param CDicomStreamReader $stream_reader The stream reader
  * 
  * @return null
  */
 function decodeItem(CDicomStreamReader $stream_reader)
 {
     $this->sub_items = CDicomPDUItemFactory::decodeConsecutiveItemsByLength($stream_reader, $this->length);
 }
コード例 #2
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);
 }
コード例 #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
 /**
  * Read the type of an item. If a item type has been read but not decoded, it returns this type.
  * 
  * @param CDicomStreamReader $stream_reader The stream reader
  * 
  * @return string The name of the item class
  */
 static function readItemType(CDicomStreamReader $stream_reader)
 {
     $item_type = null;
     if (!self::$next_item) {
         $tmp = $stream_reader->readUInt8();
         $stream_reader->skip(1);
         if (!$tmp) {
             return false;
         }
         $item_type = self::getItemClass($tmp);
         //$stream_reader->readHexByte()];
     } else {
         $item_type = self::$next_item;
         self::$next_item = null;
     }
     return $item_type;
 }
コード例 #5
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);
 }
コード例 #6
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);
 }