I am using papaya to view DICOM images. I want to swap the main slices to view the sagittal and coronal views of the images. This is my code. But I get an error saying this.canvas not defined.
What am I doing wrong? Here's my code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="papaya.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="papaya.js"></script>
<script>
$(document).ready(function(){
$(".papaya-main-swap").click(function(){
papaya.viewer.Viewer.prototype.rotateViews();
});
});
</script>
<title>Papaya </title>
</head>
<body>
<div class="papaya">
<button id="swap-slice" class="papaya-main-swap" type="button" style="display: block; top: 475px; left: 700px; position: relative;">Swap Main Slice</button>
</div>
</body>
</html>