/** * Decode the SOP class common extended negociation item * * @param CDicomStreamReader $stream_reader The stream reader * * @return null */ function decodeItem(CDicomStreamReader $stream_reader) { $this->sop_uid_length = $stream_reader->readUInt16(); $this->sop_class_uid = $stream_reader->readUID($this->sop_uid_length); $this->service_uid_length = $stream_reader->readUInt16(); $this->service_class_uid = $stream_reader->readUID($this->service_uid_length); $this->related_sop_classes_id_length = $stream_reader->readUInt16(); if ($this->related_sop_classes_id_length > 0) { $related_sop_classes_content = $stream_reader->read($this->related_sop_classes_id_length); $handle = fopen("php://temp", "w+"); fwrite($handle, $related_sop_classes_content); $related_sop_classes_stream = new CDicomStreamReader($handle); $this->related_sop_classes_id = array(); while ($related_sop_classes_stream->tell() <= $this->related_sop_classes_id_length) { $related_sop_class_id = new CDicomSubFieldRelatedSopClassIdentification(); $related_sop_class_id->decodeField($related_sop_classes_stream); } } }