瀏覽代碼

Commit 17/10/2024

master
Alice Tossici 1 年之前
父節點
當前提交
6310d26780
共有 3 個文件被更改,包括 10 次插入8 次删除
  1. 4
    0
      App/Vendor/Helper.class.php
  2. 1
    3
      public_html/dicom/dicom.php
  3. 5
    5
      public_html/dicom/index.php

+ 4
- 0
App/Vendor/Helper.class.php 查看文件

return $wrapStart.$user.'<a data-options=\'{"hash":false}\' data-toggle="tooltip" data-placement="top" title="'.$attach['file_title'].'.'.$attach['file_ext'].'" data-fancybox data-type="iframe" data-src="/downlaod/?attach_id='.$attachId.'" href="#" class="'.$linkClass.'"><span class="icon-file-picture"></span> '.$this->truncate($attachTitle, $titleLength).'</a>'.$wrapEnd; return $wrapStart.$user.'<a data-options=\'{"hash":false}\' data-toggle="tooltip" data-placement="top" title="'.$attach['file_title'].'.'.$attach['file_ext'].'" data-fancybox data-type="iframe" data-src="/downlaod/?attach_id='.$attachId.'" href="#" class="'.$linkClass.'"><span class="icon-file-picture"></span> '.$this->truncate($attachTitle, $titleLength).'</a>'.$wrapEnd;
break; break;


case 'dicom':
return $wrapStart.$user.'<a data-options=\'{"hash":false}\' data-fancybox data-type="iframe" data-src="/dicom/index.php?attach_id='.$attachId.'" href="#" class="'.$linkClass.'"><span class="icon-file-picture"></span> '.$attachTitle.'</a>'.$wrapEnd;
break;

default: default:
return $wrapStart.$user.'<a data-options=\'{"hash":false}\' data-toggle="tooltip" data-placement="top" title="'.$attach['file_title'].'.'.$attach['file_ext'].'" data-fancybox data-type="iframe" data-src="/downlaod/?attach_id='.$attachId.'" href="#" class="'.$linkClass.'"><span class="icon-download3"></span> '.$this->truncate($attachTitle, $titleLength).'</a>'.$wrapEnd; return $wrapStart.$user.'<a data-options=\'{"hash":false}\' data-toggle="tooltip" data-placement="top" title="'.$attach['file_title'].'.'.$attach['file_ext'].'" data-fancybox data-type="iframe" data-src="/downlaod/?attach_id='.$attachId.'" href="#" class="'.$linkClass.'"><span class="icon-download3"></span> '.$this->truncate($attachTitle, $titleLength).'</a>'.$wrapEnd;
} }

+ 1
- 3
public_html/dicom/dicom.php 查看文件



$dicomFilePath = ATTACH_DIR . $file_name; $dicomFilePath = ATTACH_DIR . $file_name;


echo $dicomFilePath;
/*
// Verifica che il file DICOM esista // Verifica che il file DICOM esista
if (file_exists($dicomFilePath)) { if (file_exists($dicomFilePath)) {
// Imposta l'intestazione Content-Type per il file DICOM // Imposta l'intestazione Content-Type per il file DICOM
// Restituisci un errore 404 se il file non viene trovato // Restituisci un errore 404 se il file non viene trovato
http_response_code(404); http_response_code(404);
echo "File non trovato."; echo "File non trovato.";
}*/
}
?> ?>

+ 5
- 5
public_html/dicom/index.php 查看文件

//exit(0); //exit(0);
} }


$attach = $db->where('id', $attachId)->getOne('requests_attachments');
$file_name = $attach['file_name'];

?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="it"> <html lang="it">
<title>Dicom</title> <title>Dicom</title>


<style> <style>
html, body {width: 100%; height:100%; background-color: black; display:flex; justify-content:center;}
#dicomImage { #dicomImage {
width: 100%;
height: 100%;
width: 600px;
height: 600px;
position: relative; position: relative;
} }
</style> </style>
cornerstone.enable(element); cornerstone.enable(element);


// Carica l'immagine DICOM da un URL // Carica l'immagine DICOM da un URL
const dicomUrl = '/dicom-files/sample.dcm'; // Aggiorna questo con il tuo percorso
const dicomUrl = '/dicom/dicom.php?attach_id=<?php echo $attachId ?>'; // Aggiorna questo con il tuo percorso
const imageId = 'wadouri:' + dicomUrl; const imageId = 'wadouri:' + dicomUrl;


// Carica e visualizza l'immagine // Carica e visualizza l'immagine

Loading…
取消
儲存