Skip to content

Commit

Permalink
Added html5 doctype and charset. Changed page generation. Relates to
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Jul 11, 2013
1 parent e6480d2 commit 575ccd8
Showing 1 changed file with 132 additions and 150 deletions.
282 changes: 132 additions & 150 deletions tests/pacs/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,102 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My (fake) PACS</title>
<style>
body {
background-color: #efefef;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
ul {list-style-type: none;}
ul img {float:left; padding:0px 10px 10px 0px;}
ul li {clear:both;}
ul li h2 {font-size:90%;}
ul a {text-decoration:none;}
ul li p {font-size:80%;}
</style>
<!-- Can't make it work, problem of DOM loading
<!-- Can't make it work, problem of DOM loading, all pages loaded after are messed up...
(see http://jquerymobile.com/demos/1.3.0/docs/faq/dom-ready-not-working.html )...-->
<!--<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>-->
<script type="text/javascript">
var dataDicom = [
{
title: "Baby MRI",
uri: "http://x.babymri.org/?53320924&.dcm",
img: "babymri.png",
desc: "Brain MR, 256*256*1, LittleEndianExplicit [1.2.840.10008.1.2.1]"
}];
var dataDicomSop = [
{
title: "Toutatix",
uri: "https://github.com/ivmartel/dwv/blob/master/data/cta.dcm?raw=true",
img: "toutatix.png",
desc: "Chest CT(A), 512*512*1, LittleEndianExplicit [1.2.840.10008.1.2.1], from the Osirix examples, hosted on the dwv github."
},
{
title: "Goudurix",
uri: "https://github.com/ivmartel/dwv/blob/master/data/cta2.dcm?raw=true",
img: "goudurix.png",
desc: "Chest CT(A), 512*512*1, LittleEndianExplicit [1.2.840.10008.1.2.1], from the Osirix examples, hosted on the dwv github.",
comment: "NOT SUPPORTED YET..."
},
{
title: "US",
uri: "https://github.com/ivmartel/dwv/blob/master/data/us.dcm?raw=true",
img: "us.png",
desc: "US, 640*480*1, BigEndianExplicit [1.2.840.10008.1.2.2], from the GDCM examples, hosted on the dwv github.",
},
{
title: "Cerebrix",
uri: "https://github.com/ivmartel/dwv/blob/master/data/mr.dcm?raw=true",
img: "cerebrix.png",
desc: "Brain SC (Secondary Capture), 176*224*1, JPEG2000 [1.2.840.10008.1.2.4.91], from the Osirix examples, hosted on the dwv github.",
comment: "NOT SUPPORTED YET..."
},
{
title: "JPEG 2000",
uri: "http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=2.16.840.1.113669.632.20.1211.10000744858&seriesUID=1.3.6.1.4.1.19291.2.1.2.2413568109772100001&objectUID=1.3.6.1.4.1.19291.2.1.3.2413568110716100007",
img: "vitalitch0.png",
desc: "Via wado, 176*224*1, JPEG2000 [1.2.840.10008.1.2.4.91], from the dicom.vital-it.ch examples.",
comment: "NOT SUPPORTED YET..."
},
{
title: "Anonymised",
uri: "http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=1.3.6.1.4.1.19291.2.1.1.2675258517533100002&seriesUID=1.2.392.200036.9116.2.6.1.48.1215564802.1245749034.88493&objectUID=1.2.392.200036.9116.2.6.1.48.1215564802.1245749034.96207",
img: "vitalitch2.png",
desc: "Via wado, 512x512x1, LittleEndianExplicit [1.2.840.10008.1.2.1], MONOCHROME2, 16 bits, from the dicom.vital-it.ch examples."
},
{
title: "Anonymous",
uri: "http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=1.2.840.113564.3.1.2.20110912134402.100261&seriesUID=1.2.840.113564.1921680151.20110912125724093870&objectUID=1.2.840.113564.1921680151.20110912125724093880.2003000225000",
img: "vitalitch3.png",
desc: "Via wado, 2018x4915x1, LittleEndianExplicit [1.2.840.10008.1.2.1], MONOCHROME1, 16 bits,from the dicom.vital-it.ch examples.",
comment: "Carefull, big!"
}
];
var dataImg = [
{
title: "JPEG",
uri: "http://upload.wikimedia.org/wikipedia/commons/c/c6/PET-image.jpg",
img: "brainpet-jpg.png",
desc: "Brain PET from wikipedia (http://en.wikipedia.org/wiki/File:PET-image.jpg), 531*600*1."
},
{
title: "PNG",
uri: "http://upload.wikimedia.org/wikipedia/commons/7/7f/Brain_MRI_112010_rgbca.png",
img: "brainmri-png.png",
desc: "Brain MRI from wikipedia (http://en.wikipedia.org/wiki/File:Brain_MRI_112010_rgbca.png), 389*504*1."
},
{
title: "JPG",
uri: "http://upload.wikimedia.org/wikipedia/commons/0/0e/Acute_leukemia-ALL.jpg",
img: "acute_leukemia.png",
desc: "Acute Leukimia from wikipedia (http://en.wikipedia.org/wiki/File:Acute_leukemia-ALL.jpg), 347*395*1."
}
];

function setDwv(obj)
{
// update page links
Expand All @@ -42,6 +121,49 @@
}
return "<a href='"+getDwvBaseUrl(flag)+"?input="+encodeURIComponent(uri)+"' class=\"dwvlink\">";
}
function getDwvUrl2(uri)
{
var flag = "dwvmobile";
if( document.getElementById('select-dwv') ) {
var select = document.getElementById('select-dwv');
flag = select.options[select.selectedIndex].value;
}
return getDwvBaseUrl(flag)+"?input="+encodeURIComponent(uri);
}
function createAndPutHtml(data, id)
{
for( var i = 0; i < data.length; ++i )
{
// image
var image = document.createElement("img");
image.src = "images/"+data[i].img;
// title
var title = document.createElement("h2");
title.appendChild(document.createTextNode(data[i].title));
// description
var desc = document.createElement("p");
desc.appendChild(document.createTextNode(data[i].desc));
if( data[i].comment ) {
var comment = document.createElement("b");
comment.appendChild(document.createTextNode(" "+data[i].comment));
desc.appendChild(comment);
}

// link
var link = document.createElement("a");
link.href = getDwvUrl2(data[i].uri);
link.className = "dwvlink";
link.appendChild(image);

// list item
var li = document.createElement("li");
li.appendChild(link);
li.appendChild(title);
li.appendChild(desc);
var ul = document.getElementById(id);
ul.appendChild(li);
}
}
</script>
</head>
<body>
Expand All @@ -62,20 +184,7 @@ <h1>My (fake) PACS</h1>
</select>
</div>

<ul data-role="listview" data-inset="true">

<li>
<script>
var uri="http://x.babymri.org/?53320924&.dcm";
document.write(getDwvUrl(uri));
</script>
<img src="images/babymri.png"/>
<h2>Baby MRI</h2>
<p>Brain MR, 256*256*1, LittleEndianExplicit [1.2.840.10008.1.2.1]</p>
</a>
</li>

</ul>
<ul data-role="listview" data-inset="true" id="uldatadicom"></ul>

<br style="clear:both">

Expand All @@ -85,145 +194,12 @@ <h2>Baby MRI</h2>
(do not forget to <b>remove</b> that flag for normal browsing).</p>

<!--<ul data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="Search...">-->
<ul data-role="listview" data-inset="true">

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="https://github.com/ivmartel/dwv/blob/master/data/cta.dcm?raw=true";
document.write(getDwvUrl(uri));
</script>
<img src="images/toutatix.png">
<h2>Toutatix</h2>
<p>Chest CT(A), 512*512*1, LittleEndianExplicit [1.2.840.10008.1.2.1],
from the Osirix examples, hosted on my github.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="https://github.com/ivmartel/dwv/blob/master/data/cta2.dcm?raw=true";
document.write(getDwvUrl(uri));
</script>
<img src="images/goudurix.png">
<h2>Goudurix</h2>
<p>Chest CT(A), 512*512*1, LittleEndianExplicit [1.2.840.10008.1.2.1],
from the Osirix examples, hosted on my github.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="https://github.com/ivmartel/dwv/blob/master/data/us.dcm?raw=true";
document.write(getDwvUrl(uri));
</script>
<img src="images/us.png">
<h2>US</h2>
<p>US, 640*480*1, BigEndianExplicit [1.2.840.10008.1.2.2],
from the GDCM examples, hosted on my github.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="https://github.com/ivmartel/dwv/blob/master/data/mr.dcm?raw=true";
document.write(getDwvUrl(uri));
</script>
<img src="images/cerebrix.png">
<h2>Cerebrix</h2>
<p>Brain SC (Secondary Capture), 176*224*1, JPEG2000 [1.2.840.10008.1.2.4.91],
from the Osirix examples, hosted on my github, <b>NOT SUPPORTED YET...</b>.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=2.16.840.1.113669.632.20.1211.10000744858&seriesUID=1.3.6.1.4.1.19291.2.1.2.2413568109772100001&objectUID=1.3.6.1.4.1.19291.2.1.3.2413568110716100007";
document.write(getDwvUrl(uri));
</script>
<img src="images/vitalitch0.png">
<h2>JPEG 2000</h2>
<p>via wado, 176*224*1, JPEG2000 [1.2.840.10008.1.2.4.91],
from the dicom.vital-it.ch examples, <b>NOT SUPPORTED YET...</b>.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=1.3.6.1.4.1.5962.1.2.0.1175775772.5729.0&seriesUID=1.3.6.1.4.1.5962.1.3.0.1.1175775772.5729.0&objectUID=1.3.6.1.4.1.5962.1.1.0.1.1.1175775772.5729.0";
document.write(getDwvUrl(uri));
</script>
<img src="images/vitalitch1.png">
<h2>Calibration</h2>
<p>via wado, 512x512x1, LittleEndianExplicit [1.2.840.10008.1.2.1], MONOCHROME2, 8 bits,
from the dicom.vital-it.ch examples, <b>Bad display</b>.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=1.3.6.1.4.1.19291.2.1.1.2675258517533100002&seriesUID=1.2.392.200036.9116.2.6.1.48.1215564802.1245749034.88493&objectUID=1.2.392.200036.9116.2.6.1.48.1215564802.1245749034.96207";
document.write(getDwvUrl(uri));
</script>
<img src="images/vitalitch2.png">
<h2>Anonymised</h2>
<p>via wado, 512x512x1, LittleEndianExplicit [1.2.840.10008.1.2.1], MONOCHROME2, 16 bits,
from the dicom.vital-it.ch examples.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://dicom.vital-it.ch:8089/wado?requestType=WADO&contentType=application/dicom&studyUID=1.2.840.113564.3.1.2.20110912134402.100261&seriesUID=1.2.840.113564.1921680151.20110912125724093870&objectUID=1.2.840.113564.1921680151.20110912125724093880.2003000225000";
document.write(getDwvUrl(uri));
</script>
<img src="images/vitalitch3.png">
<h2>Anonymous</h2>
<p>via wado, 2018x4915x1, LittleEndianExplicit [1.2.840.10008.1.2.1], MONOCHROME1, 16 bits,
from the dicom.vital-it.ch examples, <b>carefull, big!</b>.</p>
</a>
</li>

</ul>
<ul data-role="listview" data-inset="true" id="uldatadicomsop"></ul>

<br style="clear:both">

<p>Non DICOM Image formats:</p>
<ul data-role="listview" data-inset="true">

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/PET-image.jpg/531px-PET-image.jpg";
document.write(getDwvUrl(uri));
</script>
<img src="images/brainpet-jpg.png">
<h2>JPEG</h2>
<p>Brain PET from wikipedia (http://en.wikipedia.org/wiki/File:PET-image.jpg), 531*600*1.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://upload.wikimedia.org/wikipedia/commons/7/7f/Brain_MRI_112010_rgbca.png";
document.write(getDwvUrl(uri));
</script>
<img src="images/brainmri-png.png">
<h2>PNG</h2>
<p>Brain MRI from wikipedia (http://en.wikipedia.org/wiki/File:Brain_MRI_112010_rgbca.png), 389*504*1.</p>
</a>
</li>

<li>
<script><!-- The script starts the <a> and creates the link -->
var uri="http://upload.wikimedia.org/wikipedia/commons/0/0e/Acute_leukemia-ALL.jpg";
document.write(getDwvUrl(uri));
</script>
<img src="images/acute_leukemia.png">
<h2>JPG</h2>
<p>Acute Leukimia from wikipedia (http://en.wikipedia.org/wiki/File:Acute_leukemia-ALL.jpg), 347*395*1.</p>
</a>
</li>

</ul>
<ul data-role="listview" data-inset="true" id="uldataimg"></ul>

<br style="clear:both">

Expand All @@ -238,5 +214,11 @@ <h2>JPG</h2>
</div><!-- /page -->
</div><!-- /content -->

<script type="text/javascript">
createAndPutHtml(dataDicom, "uldatadicom");
createAndPutHtml(dataDicomSop, "uldatadicomsop");
createAndPutHtml(dataImg, "uldataimg");
</script>

</body>
</html>

0 comments on commit 575ccd8

Please sign in to comment.