-
Notifications
You must be signed in to change notification settings - Fork 2
/
mriscan.html
134 lines (129 loc) · 7.5 KB
/
mriscan.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html>
<head>
<title>voxc.js</title>
<link rel="icon" href="resources/images/favicon.png">
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Overpass|Roboto+Condensed" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/themes/prism-okaidia.css">
<script src="https://use.fontawesome.com/727ae44ffb.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js"></script>
<script src="js/monokai.js" type="text/javascript" charset="utf-8"></script>
<script src="js/mode-json.js" type="text/javascript" charset="utf-8"></script>
<script src="js/MRI.js" type="text/javascript" charset="utf-8"></script>
<script src="js/three.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/OrbitControls.js" type="text/javascript" charset="utf-8"></script>
<!-- Latest compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css"/>
<!-- voxc.js required scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="build/voxc.js" type="text/javascript" charset="utf-8"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="main" id="bodySection" onload="loadMRI()">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">voxc.js</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.html#documentsSection">Documentation</a></li>
<li><a href="index.html#demoSection">Demo</a></li>
<li><a href="index.html#aboutSection">About</a></li>
<li><a href="index.html#usageSection">Usage</a></li>
<li><a href="converter1.html">.obj to Array</a></li>
<li><a href="converter2.html">Rule Applyer</a></li>
<li class="active"><a href="mriscan.html">Image to Array</a></li>
</ul>
</div>
</div>
</nav>
<div class="col-sm-12" id="MRI">
<div class="image-text-container col-sm-12">
<form id="imageTextForm">
<input type="text" class="image-text" placeholder="Enter image url and press enter..." id="imageText"/>
</form><br/><br/>
<div class="converter2-demo-button-container col-sm-12">
<a data-toggle="modal" data-target="#editorModal" id="editRulesFile" class="converter2-demo-button">Edit rules file</a>
</div><br/><br/>
</div>
</div>
<div id="editorModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Edit the rules file</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="file-upload-container file-upload-dark-text col-sm-4">
<input type="file" name="file" id="file" class="input-file-hidden" accept=".obj"/>
<label for="file"><i class="fa fa-upload" aria-hidden="true"></i></label><br>
Upload own rules file
</div>
<div id="predefinedRules" class="rules-file-button-container file-upload-dark-text col-sm-4">
<div class="rules-file-button">
<i class="fa fa-download" aria-hidden="true"></i>
</div>
Use predefined rules file
</div>
<div class="color-picker col-sm-4">
<input type="color" name="favcolor" value="#ff0000">
</div>
</div>
<div id="editor"><br></div><button class="rules-file-upload-button" data-dismiss="modal">Save and upload</button>
</div>
</div>
</div>
</div>
<script>
var isBlurred = false;
var editor = ace.edit("editor");
editor.setTheme("ace/theme/solarized_dark");
var JSONMode = ace.require("ace/mode/json").Mode;
editor.session.setMode(new JSONMode());
document.getElementById("predefinedRules").onclick = function(){
editor.setValue(`{"Rules" :
[{
"Key" : "0x664611" ,
"Shape" : "Cylinder",
"Texture" : "./resources/textures/oak.png",
"Bmap" : "./resources/textures/oakBump.png"
},{
"Key" : "0x00ff00",
"Shape" : "Sphere",
"scale" : [1.5,1.5,1.5],
"Texture" : "./resources/textures/texture_leaves_by_kuschelirmel_stock.jpg",
"Bmap" : "./resources/textures/texture_leaves_by_kuschelirmel_stockBump.jpg"
},{
"Key" : "0x00ff01",
"Shape" : "Cube",
"Texture" : "./resources/textures/texture_leaves_by_kuschelirmel_stock.jpg",
"Bmap" : "./resources/textures/texture_leaves_by_kuschelirmel_stockBump.jpg"
}]
}`, 1);
}
/*var sideMenu = document.getElementById("sideMenu");
sideMenu.onclick = function(){
if (isBlurred == true){
isBlurred = false;
document.body.className = "";
} else {
document.getElementById("container").classList.add("blur");
sideMenu.style.webkitFilter = none;
isBlurred = true;
}
}*/
</script>
</body>
</html>