| @@ -277,6 +277,10 @@ | |||
| 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; | |||
| 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: | |||
| 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; | |||
| } | |||
| @@ -12,8 +12,6 @@ $file_name = $attach['file_name']; | |||
| $dicomFilePath = ATTACH_DIR . $file_name; | |||
| echo $dicomFilePath; | |||
| /* | |||
| // Verifica che il file DICOM esista | |||
| if (file_exists($dicomFilePath)) { | |||
| // Imposta l'intestazione Content-Type per il file DICOM | |||
| @@ -33,5 +31,5 @@ if (file_exists($dicomFilePath)) { | |||
| // Restituisci un errore 404 se il file non viene trovato | |||
| http_response_code(404); | |||
| echo "File non trovato."; | |||
| }*/ | |||
| } | |||
| ?> | |||
| @@ -6,8 +6,7 @@ if (!$user->isLogged()) { | |||
| //exit(0); | |||
| } | |||
| $attach = $db->where('id', $attachId)->getOne('requests_attachments'); | |||
| $file_name = $attach['file_name']; | |||
| ?> | |||
| <!DOCTYPE html> | |||
| <html lang="it"> | |||
| @@ -18,9 +17,10 @@ $file_name = $attach['file_name']; | |||
| <title>Dicom</title> | |||
| <style> | |||
| html, body {width: 100%; height:100%; background-color: black; display:flex; justify-content:center;} | |||
| #dicomImage { | |||
| width: 100%; | |||
| height: 100%; | |||
| width: 600px; | |||
| height: 600px; | |||
| position: relative; | |||
| } | |||
| </style> | |||
| @@ -55,7 +55,7 @@ $file_name = $attach['file_name']; | |||
| cornerstone.enable(element); | |||
| // 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; | |||
| // Carica e visualizza l'immagine | |||