Skip to content

Commit 7c63a8d

Browse files
committed
Merge pull request #168 from tsherif/v2.1.0
v2.1.0
2 parents 12a23e4 + 566a112 commit 7c63a8d

21 files changed

+356
-62
lines changed

build/brainbrowser-2.1.0/brainbrowser.surface-viewer.min.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/brainbrowser-2.1.0/brainbrowser.volume-viewer.min.js

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a,c,d,e){a=a||[],c=c||[],d=d||[],e=e||[.7,.7,.7,1];var f,g,h,i,j,k,l,m,n,o,p=a.length,q=3*p,r=4*p,s=d.length>0,t={},u={};4===e.length&&(j=!0,f=e[0],g=e[1],h=e[2],i=e[3]);var v=new Float32Array(q),w=s?new Float32Array(q):new Float32Array,x=new Float32Array(r);for(k=0,l=a.length;l>k;k++)b(t,c[3*a[k]],c[3*a[k]+1],c[3*a[k]+2]);for(u.x=t.minX+(t.maxX-t.minX)/2,u.y=t.minY+(t.maxY-t.minY)/2,u.z=t.minZ+(t.maxZ-t.minZ)/2,u.bounding_box=t,k=0;p>k;k+=3)m=3*k,n=4*k,v[m]=c[3*a[k]]-u.x,v[m+1]=c[3*a[k]+1]-u.y,v[m+2]=c[3*a[k]+2]-u.z,v[m+3]=c[3*a[k+1]]-u.x,v[m+4]=c[3*a[k+1]+1]-u.y,v[m+5]=c[3*a[k+1]+2]-u.z,v[m+6]=c[3*a[k+2]]-u.x,v[m+7]=c[3*a[k+2]+1]-u.y,v[m+8]=c[3*a[k+2]+2]-u.z,s&&(w[m]=d[3*a[k]],w[m+1]=d[3*a[k]+1],w[m+2]=d[3*a[k]+2],w[m+3]=d[3*a[k+1]],w[m+4]=d[3*a[k+1]+1],w[m+5]=d[3*a[k+1]+2],w[m+6]=d[3*a[k+2]],w[m+7]=d[3*a[k+2]+1],w[m+8]=d[3*a[k+2]+2]),j?(x[n]=f,x[n+1]=g,x[n+2]=h,x[n+3]=i,x[n+4]=f,x[n+5]=g,x[n+6]=h,x[n+7]=i,x[n+8]=f,x[n+9]=g,x[n+10]=h,x[n+11]=i):(x[n]=e[4*a[k]],x[n+1]=e[4*a[k]+1],x[n+2]=e[4*a[k]+2],x[n+3]=e[4*a[k]+3],x[n+4]=e[4*a[k+1]],x[n+5]=e[4*a[k+1]+1],x[n+6]=e[4*a[k+1]+2],x[n+7]=e[4*a[k+1]+3],x[n+8]=e[4*a[k+2]],x[n+9]=e[4*a[k+2]+1],x[n+10]=e[4*a[k+2]+2],x[n+11]=e[4*a[k+2]+3]);return o={centroid:u,unindexed:{position:v,normal:w,color:x}}}function b(a,b,c,d){(!a.minX||a.minX>b)&&(a.minX=b),(!a.maxX||a.maxX<b)&&(a.maxX=b),(!a.minY||a.minY>c)&&(a.minY=c),(!a.maxY||a.maxY<c)&&(a.maxY=c),(!a.minZ||a.minZ>d)&&(a.minZ=d),(!a.maxZ||a.maxZ<d)&&(a.maxZ=d)}self.addEventListener("message",function(b){var c,d,e,f,g=b.data,h=g.shapes,i=g.vertices,j=g.normals,k=g.colors||[.7,.7,.7,1];for(c=0,d=h.length;d>c;c++)e=h[c],f=a(h[c].indices,i,j,k),e.centroid=f.centroid,e.unindexed=f.unindexed;self.postMessage(g)})}();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a){var b,c,d,e,f,g,h={values:[]};for(a=a.replace(/^\s+/,"").replace(/\s+$/,""),b=a.split("\n"),c=parseFloat(b[0].replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/)[4]),h.values[0]=c,f=c,g=c,d=1,e=b.length;e>d;d++)c=parseFloat(b[d].replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/)[4]),h.values[d]=c,f=Math.min(f,c),g=Math.max(g,c);return h.min=f,h.max=g,h}self.addEventListener("message",function(b){var c=b.data,d=c.data;self.postMessage(a(d))})}();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a){var b,c,d,e,f,g,h,i=[],j={};for(a=a.split("\n"),j.shapes=[],b={name:"undefined"|a.name,faces:[],indices:[]},j.shapes.push(b),c=a[1].replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/),d=parseInt(c[0],10),e=parseInt(c[1],10),h=2;d+2>h;h++)f=a[h].replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/),i.push(parseFloat(f[0])),i.push(parseFloat(f[1])),i.push(parseFloat(f[2]));for(h=d+2;d+e+2>h;h++)f=a[h].replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/),g=[],g.push(parseInt(f[0],10)),g.push(parseInt(f[1],10)),g.push(parseInt(f[2],10)),Array.prototype.push.apply(b.indices,g),b.faces.push(g);return j.type="polygon",j.vertices=i,j.colors=[.8,.8,.8,1],j}self.addEventListener("message",function(b){self.postMessage(a(b.data.data))})}();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a){var e={name:a.name,type:a.type,shapes:[]};return e.vertices=b(a.vertices),a.colors&&(e.colors=b(a.colors),(e.vertices.length===e.colors.length||3===e.colors.length)&&(e.colors=c(e.colors))),a.normals&&(e.normals=b(a.normals)),void 0===a.shapes&&(a.shapes=[]),a.indices&&a.shapes.push({indices:a.indices}),a.shapes.forEach(function(a){var c=b(a.indices);a.one_indexed&&d(c),e.shapes.push({name:a.name,indices:c})}),e}function b(a,c){if(!Array.isArray(a))return[a];if(c=c||0,c===a.length)return[];var d,e,f=[];for(d=0,e=a.length;e>d;d++)f.push.apply(f,b(a[d]));return f}function c(a){var b,c,d,e;for(b=new Float32Array(4*a.length/3),c=d=0,e=a.length;e>c;)b[d++]=a[c++],b[d++]=a[c++],b[d++]=a[c++],b[d++]=1;return b}function d(a){var b,c;for(b=0,c=a.length;c>b;b++)a[b]=a[b]-1}self.addEventListener("message",function(b){self.postMessage(a(JSON.parse(b.data.data)))})}();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a){var b,c,d,e,f={};for(f.values=a.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/).map(parseFloat),d=f.values[0],e=f.values[0],b=1,c=f.values.length;c>b;b++)d=Math.min(d,f.values[b]),e=Math.max(e,f.values[b]);return f.min=d,f.max=e,f}self.addEventListener("message",function(b){var c=b.data,d=c.data;self.postMessage(a(d))})}();

build/brainbrowser-2.1.0/workers/mniobj.worker.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o=[],p=[],q=[],r={};for(a=a.split("\n"),r.shapes=[],b={name:"undefined"|a.name,faces:[],indices:[],texture_indices:[],normal_indices:[]},r.shapes.push(b),i=0,l=a.length;l>i;i++)if(f=a[i].replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/),g=f[0],h=f.length,!g.match("#")||""===f)switch(g){case"o":case"g":b={name:f[1],faces:[],indices:[],texture_indices:[],normal_indices:[]},r.shapes.push(b);break;case"v":o.push(parseFloat(f[1])),o.push(parseFloat(f[2])),o.push(parseFloat(f[3]));break;case"vt":for(j=1;h>j;j++)p.push(parseFloat(f[j]));break;case"vn":q.push(parseFloat(f[1])),q.push(parseFloat(f[2])),q.push(parseFloat(f[3]));break;case"f":m=[],c=b.indices,d=b.texture_indices,e=b.normal_indices;var s=f[1].split("/");for(k=2;h-1>k;k++)m.push(parseInt(s[0],10)-1),c.push(parseInt(s[0],10)-1),d.push(parseInt(s[1],10)-1),s[2]&&e.push(parseInt(s[2],10)-1),n=f[k].split("/"),m.push(parseInt(n[0],10)-1),c.push(parseInt(n[0],10)-1),d.push(parseInt(n[1],10)-1),n[2]&&e.push(parseInt(n[2],10)-1),n=f[k+1].split("/"),m.push(parseInt(n[0],10)-1),c.push(parseInt(n[0],10)-1),d.push(parseInt(n[1],10)-1),n[2]&&e.push(parseInt(n[2],10)-1);b.faces.push(m)}return r.type="polygon",r.vertices=o,r.normals=q,r.colors=[.8,.8,.8,1],r.texture_coords=p,r}self.addEventListener("message",function(b){self.postMessage(a(b.data.data))})}();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* BrainBrowser: Web-based Neurological Visualization Tools
3+
* (https://brainbrowser.cbrain.mcgill.ca)
4+
*
5+
* Copyright (C) 2011
6+
* The Royal Institution for the Advancement of Learning
7+
* McGill University
8+
*
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
/*
24+
* BrainBrowser v2.1.0
25+
*
26+
* Author: Tarek Sherif <[email protected]> (http://tareksherif.ca/)
27+
* Author: Nicolas Kassis
28+
* Author: Paul Mougel
29+
*/
30+
!function(){"use strict";function a(a,b){var c,d,e,f,g,h=new Float32Array(2*a.length),i=new Float32Array(2*b.length),j=a.length/3;for(c=0;j>c;c+=3)e=3*c,f=4*c,d=2*e,g=2*f,h[d]=a[e],h[d+1]=a[e+1],h[d+2]=a[e+2],h[d+3]=a[e+3],h[d+4]=a[e+4],h[d+5]=a[e+5],h[d+6]=a[e+3],h[d+7]=a[e+4],h[d+8]=a[e+5],h[d+9]=a[e+6],h[d+10]=a[e+7],h[d+11]=a[e+8],h[d+12]=a[e+6],h[d+13]=a[e+7],h[d+14]=a[e+8],h[d+15]=a[e],h[d+16]=a[e+1],h[d+17]=a[e+2],i[g]=b[f],i[g+1]=b[f+1],i[g+2]=b[f+2],i[g+3]=b[f+3],i[g+4]=b[f+4],i[g+5]=b[f+5],i[g+6]=b[f+6],i[g+7]=b[f+7],i[g+8]=b[f+4],i[g+9]=b[f+5],i[g+10]=b[f+6],i[g+11]=b[f+7],i[g+12]=b[f+8],i[g+13]=b[f+9],i[g+14]=b[f+10],i[g+15]=b[f+11],i[g+16]=b[f+8],i[g+17]=b[f+9],i[g+18]=b[f+10],i[g+19]=b[f+11],i[g+20]=b[f],i[g+21]=b[f+1],i[g+22]=b[f+2],i[g+23]=b[f+3];return{positions:h,colors:i}}self.addEventListener("message",function(b){var c=b.data;self.postMessage(a(c.positions,c.colors))})}();

0 commit comments

Comments
 (0)