-
Notifications
You must be signed in to change notification settings - Fork 0
/
Evidence.html
326 lines (296 loc) · 13.9 KB
/
Evidence.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<!-- saved from url=(0056)https://stemkoski.github.io/Three.js/Marching-Cubes.html -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Susceptibility to Schizophrenia and Heterochronicity of White Matter’s Life-Trajectory</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script src="./index_files/THREE/dat.gui.min.js"></script>
<link rel="stylesheet" href="./index_files/base.css" type="text/css">
<link rel="stylesheet" href="./index_files/contextMenu/contextMenu.css" type="text/css" />
<link rel="stylesheet" href="./index_files/jquery-ui.css">
<link rel="stylesheet" href="./index_files/info.css">
<link rel="shortcut icon" type='image/x-icon' href="favicon.ico" />
<!--Progress bar style -->
<style>
body {
background: #000;
color: #fff;
padding: 0;
margin: 0;
overflow: hidden;
font-family: georgia;
text-align: center;
}
#info {
position: absolute;
top: 0px;
width: 100%;
padding: 5px;
font-family: Monospace;
font-size: 13px;
text-align: center;
z-index: 100;
}
#progress {
color: red;
top: 7em;
width: 100%;
font-size: 3em;
font-variant: small-caps;
font-weight: bold;
position: absolute;
z-index: 100;
text-align: center;
text-shadow: #000 0px 0px 10px;
display: none;
}
.shadow {
-moz-box-shadow: 0px 0px 5px #000;
-webkit-box-shadow: 0px 0px 5px #000;
box-shadow: 0px 0px 5px #000;
}
#progressbar {
text-align: center;
background: white;
width: 250px;
height: 10px;
}
#bar {
background: #d00;
width: 50px;
height: 10px;
}
.enabled {
color: lime !important;
cursor: pointer;
}
.enabled:hover {
text-shadow: #0f0 0px 0px 5px !important;
}
.disabled {
background: gray;
cursor: default;
}
a {
color: red;
}
canvas {
pointer-events: none;
z-index: 10;
}
</style>
</head>
<body>
<!--html forms-->
<input type="file" id="fileinput" style="display:none" />
<input type="file" id="fileinput1" style="display:none" />
<input type="file" id="fileinput2" style="display:none" />
<input type="file" id="directoryinput" style="display:none" webkitdirectory directory multiple />
<input type="file" id="directoryinput1" style="display:none" webkitdirectory directory multiple />
<!--<div id="ThreeJS" style="position: absolute; left:0px; top:20px">
<canvas width="711" height="935"></canvas>
</div>-->
<!-- Programss Bar -->
<div id="progress">
<span id="message">Loading Tractography Mesh ...</span>
<center>
<div id="progressbar" class="shadow"><div id="bar" class="shadow"></div></div>
</center>
</div>
<!-- Info Box -->
<script src="./index_files/jquery-1.9.1.js"></script>
<script src="./index_files/jquery-ui.js"></script>
<link rel=stylesheet href="./index_files/jquery-ui.css" />
<link rel=stylesheet href="./index_files/info.css" />
<script src="./index_files/info.js"></script>
<!-- <div id="infoButton"></div> -->
<div id="infoBox" title="Credits" style="display:none;">
<p>This program is a collaborative work by:</p>
<p>Guohao Zhang (University of Maryland, Baltimore County)</p>
<p>Peter Kochunov (University of Maryland, School of Medicine)</p>
<p>Elliot Hong (University of Maryland, School of Medicine)</p>
<p>Jian Chen (University of Maryland, Baltimore County)</p>
<p><a href="./UserGuide.pdf" target="_blank"><font color="black">User Guide</font></a></p>
</div>
<script src="./index_files/three_infoWindow.js"></script>
<iframe id="resultBox" title="Results & Methods" src="./data/sinead.pdf" style="width:600px; height:500px; display:none;" frameborder="0"></iframe>
<!-- Contains Three JS Algorithm -->
<script src="./index_files/THREE/three.js"></script>
<!--<script src="./index_files/THREE/examples/js/controls/TrackballControls.js"></script>
<script src="./index_files/THREE/examples/js/controls/OrbitControls.js"></script>-->
<script src="./index_files/Detector.js"></script>
<script src="./index_files/Stats.js"></script>
<!--utility-->
<script src="./index_files/three_tooltip.js"></script>
<script src="./index_files/three_colorTable.js"></script>
<script src="./index_files/three_utility.js"></script>
<script src="./index_files/three_orbitControls.js"></script>
<script src="./index_files/three_trackballControl.js"></script>
<!--UI-->
<script src="./index_files/three_ui_object.js"></script>
<script src="./index_files/three_ui_panel.js"></script>
<script src="./index_files/three_ui_button.js"></script>
<script src="./index_files/three_ui_textBox.js"></script>
<!-- Contains code for the image view -->
<script src="./index_files/three_imageView.js"></script>
<!-- Contains code for the spatial view -->
<script src="./index_files/MarchingCubesData.js"></script>
<script src="./index_files/three_marchingCubes.js"></script>
<script src="./index_files/three_marchingCubesRoi.js"></script>
<script id="vertexShader" type="x-shader/x-vertex">
uniform float transExp;
varying vec3 transformedNormal;
varying vec3 transformedPosition;
varying vec3 rawPos;
void main() {
rawPos = position;
transformedNormal = normalMatrix * normal;
transformedPosition = (modelViewMatrix * vec4( position, 1.0 )).xyz;
gl_Position = gl_Position = projectionMatrix * vec4( transformedPosition, 1.0 );
}
</script>
<script id="fragmentShader" type="x-shader/x-fragment">
uniform float transExp;
varying vec3 transformedNormal;
varying vec3 transformedPosition;
varying vec3 rawPos;
void main(){
vec3 lightDir = vec3(0, 0, 1);
float ambient = 0.3;
float diffusion = 0.6*clamp(dot(transformedNormal,lightDir), 0.0, 1.0);
//float diffusion = 0.6*abs(dot(transformedNormal,lightDir));
vec3 eyeDir = -normalize(transformedPosition);
//vec3 hv = normalize(eyeDir+lightDir);
vec3 hv = normalize(-reflect(lightDir,transformedNormal));
float specular = 0.2*pow(clamp(dot(hv,transformedNormal),0.0, 1.0), 16.0);
//float specular = 0.2*clamp(pow(abs(dot(hv,transformedNormal)), 16.0), 0.0, 1.0);
gl_FragColor = vec4(1,1,1,1);
gl_FragColor = gl_FragColor*(ambient+diffusion);
gl_FragColor += vec4(specular,specular,specular,0);
float viewNormCos = abs(1.0 - abs(dot(transformedNormal,eyeDir)));
//gl_FragColor.a = transExp / 30.0;
//gl_FragColor.a = 1.0;
//gl_FragColor.rgb = vec3(1.0-viewNormCos,1.0-viewNormCos,1.0-viewNormCos);
gl_FragColor.a = pow(viewNormCos, transExp);
//if(mod(rawPos.x, 7.0) < 0.7 || mod(rawPos.y, 7.0)< 0.7){
// //gl_FragColor *= 3.0;
// gl_FragColor.a = 1.0;
//}
//else{
// gl_FragColor = vec4(0.6,0.6,0.6,1.0);
// gl_FragColor.a = transExp / 30.0;
//}
}
</script>
<script id="vertexShader2" type="x-shader/x-vertex">
uniform float transExp;
uniform sampler2D textureImage;
uniform float textureScale2;
attribute float textureScale;
varying vec3 rawPos;
varying vec3 transformedNormal;
varying vec3 transformedPosition;
varying float fTexScale;
void main() {
fTexScale = textureScale;
rawPos = position;
transformedNormal = normalMatrix * normal;
transformedPosition = (modelViewMatrix * vec4( position, 1.0 )).xyz;
gl_Position = gl_Position = projectionMatrix * vec4( transformedPosition, 1.0 );
}
</script>
<script id="fragmentShader2" type="x-shader/x-fragment">
uniform float transExp;
uniform sampler2D textureImage;
varying vec3 rawPos;
varying vec3 transformedNormal;
varying vec3 transformedPosition;
varying float fTexScale;
void main(){
float textureScale = fTexScale;
vec3 lightDir = vec3(0, 0, 1);
float ambient = 0.3;
float diffusion = 0.9*clamp(dot(transformedNormal,lightDir), 0.0, 1.0);
//float diffusion = 0.6*abs(dot(transformedNormal,lightDir));
vec3 eyeDir = -normalize(transformedPosition);
//vec3 hv = normalize(eyeDir+lightDir);
vec3 hv = normalize(-reflect(lightDir,transformedNormal));
float specular = 0.3*pow(clamp(dot(hv,transformedNormal),0.0, 1.0), 16.0);
//float specular = 0.2*clamp(pow(abs(dot(hv,transformedNormal)), 16.0), 0.0, 1.0);
gl_FragColor = vec4(1,1,1,1);
gl_FragColor = gl_FragColor*(ambient+diffusion);
gl_FragColor += vec4(specular,specular,specular,0);
if(mod(rawPos.x*2.0, 7.0) < 7.0 *textureScale
|| mod(rawPos.y*2.0, 7.0)< 7.0 * textureScale){
//gl_FragColor *= 3.0;
gl_FragColor.a = 1.0;
}
else{
gl_FragColor = vec4(0.6,0.6,0.6,1.0);
gl_FragColor.a = transExp / 30.0;
}
}
</script>
<script src="./index_files/three_cortexMesh.js"></script>
<script src="./index_files/three_spatialView.js"></script>
<script src="./index_files/three_textureShaderMaterial.js"></script>
<!-- Contains code for the statsStacker -->
<script src="./index_files/three_roiStatsStacker.js"></script>
<script src="./index_files/three_statsRiver.js"></script>
<!-- Contains code for the bar lens -->
<script src="./index_files/three_barLens.js"></script>
<script src="./index_files/three_inplaceCharts.js"></script>
<!-- Contains code for the Roi View -->
<script src="./index_files/three_legend.js"></script>
<script src="./index_files/three_legendManager.js"></script>
<script src="./index_files/three_axisTicks.js"></script>
<script src="./index_files/three_viewManager.js"></script>
<script src="./index_files/three_roi.js"></script>
<script src="./index_files/three_roiStats.js"></script>
<script src="./index_files/three_roiCompStats.js"></script>
<script src="./index_files/three_cohortRoiData.js"></script>
<script src="./index_files/three_cohortCompData.js"></script>
<script src="./index_files/three_roiBox.js"></script>
<script src="./index_files/three_roiBoxLayout.js"></script>
<script src="./index_files/three_roiSubView.js"></script>
<script src="./index_files/three_roiSubViewLinks.js"></script>
<script src="./index_files/three_roiView.js"></script>
<script src="./index_files/three_dataLoader.js"></script>
<!-- data library. -->
<script src="./index_files/nifti.js"></script>
<script src="./index_files/zlib_and_gzip.min.js"></script>
<script src="./index_files/THREE/OBJLoader.js"></script>
<script src="./index_files/THREE/STLLoader.js"></script>
<!-- interaction library. -->
<script src="./index_files/three_menus.js"></script>
<!--general-->
<script src="./cases/Kelly/three_app.js"></script>
<!-- jQuery code to display an information button and box when clicked. -->
<script src="./index_files/jquery-1.9.1.js"></script>
<script src="./index_files/jquery-ui.js"></script>
<script src="./index_files/info.js"></script>
<!-- context menu library. --><!--
<script src="./index_files/contextMenu/contextMenu.js"></script>
-->
<script>
if (!Detector.webgl) {
document.body.innerHTML = '<p>Your browser does not support webgl!</p>'+
'<p>Please use the latest version of <a href="http://www.google.com/chrome/browser">Chrome</a> to run this program.</p>';
}
else {
var renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
document.body.appendChild(renderer.domElement);
app = new three_app(renderer);
app.init();
function animate() {
requestAnimationFrame(animate);
app.render();
app.update();
}
animate();
}
</script>
</body>
</html>