From 88b7d04247a052e516ce46809a2577f7d8b1b7d2 Mon Sep 17 00:00:00 2001 From: Felipe Gonzalez Date: Wed, 8 Jul 2015 15:27:22 +0200 Subject: [PATCH] #2498 creaWt Feature New Normal wt-version kernel --- .../bbs/appli/demoPresentacion1Boton.bbg | 221 ++++++++++++ .../bbs/appli/demoPresentacion1Boton.bbs | 123 +++++++ wt/bbtk_wt_PKG/src/bbwtconfigServerWT.cxx | 78 ++++ wt/bbtk_wt_PKG/src/bbwtconfigServerWT.h | 47 +++ wt/bbtk_wt_PKG/src/nn/js/xtk.js | 340 ------------------ 5 files changed, 469 insertions(+), 340 deletions(-) create mode 100644 wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbg create mode 100644 wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbs create mode 100644 wt/bbtk_wt_PKG/src/bbwtconfigServerWT.cxx create mode 100644 wt/bbtk_wt_PKG/src/bbwtconfigServerWT.h delete mode 100644 wt/bbtk_wt_PKG/src/nn/js/xtk.js diff --git a/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbg b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbg new file mode 100644 index 0000000..c2eb9c0 --- /dev/null +++ b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbg @@ -0,0 +1,221 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /home/gonzalez/Documents/CREATOOLS/wt_library/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:15 +BOX +vtk:LoadHola:Box00 +ISEXEC:FALSE +-72.570294:105.151943:-900.000000 +-26.995294:95.151943:-900.000000 +FIN_BOX +BOX +itk:BinaryThresholdImageFilter:Box02 +ISEXEC:FALSE +-39.077105:85.209608:-900.000000 +32.097895:75.209608:-900.000000 +PORT +InsideValue:"255" +PORT +LowerThreshold:"1250" +PORT +OutsideValue:"0" +PORT +UpperThreshold:"1500" +FIN_BOX +BOX +vtk:MarchingCubes:Box05 +ISEXEC:FALSE +6.692777:43.801065:-900.000000 +52.267777:33.801065:-900.000000 +PORT +ComputeNormalsOn:"true" +PORT +ComputeScalarsOn:"false" +PORT +Value:"128" +FIN_BOX +BOX +vtk:ImageContinuousErode3D:Box06 +ISEXEC:FALSE +-20.878075:71.715614:-900.000000 +50.296925:61.715614:-900.000000 +PORT +KernelSizeX:"3" +PORT +KernelSizeY:"3" +PORT +KernelSizeZ:"3" +FIN_BOX +BOX +vtk:SegmentationConnectivity:Box09 +ISEXEC:FALSE +-8.391847:60.140101:-900.000000 +62.783153:50.140101:-900.000000 +PORT +PositionXYZ:"73 101 93" +PORT +ThresholdMinMax:"200 300" +FIN_BOX +BOX +std:ConcatStrings:Box08 +ISEXEC:FALSE +-47.016798:38.862924:-900.000000 +-1.441798:28.862924:-900.000000 +PORT +In1:"/home/gonzalez/Documents/pruebaResources/" +FIN_BOX +BOX +std:ConcatStrings:Box10 +ISEXEC:FALSE +-94.398373:64.295245:-900.000000 +-48.823373:54.295245:-900.000000 +PORT +In1:"holaPP" +PORT +In3:"_" +PORT +In5:".vtk" +FIN_BOX +BOX +wt:ViewerNVWeb:Box12 +ISEXEC:FALSE +-105.671039:-12.403161:-900.000000 +-60.096039:-22.403161:-900.000000 +PORT +ImagePath:"hola.nii" +FIN_BOX +BOX +vtk:PolyDataWriter:Box14 +ISEXEC:FALSE +25.432692:14.713319:-900.000000 +71.007692:4.713319:-900.000000 +FIN_BOX +BOX +wt:Slider:Box15 +ISEXEC:FALSE +-147.478672:97.311303:-900.000000 +-99.158672:87.311303:-900.000000 +PORT +In:"1250" +PORT +Max:"1449" +PORT +Min:"500" +PORT +Title:"LowerThreshold" +FIN_BOX +BOX +wt:Slider:Box16 +ISEXEC:FALSE +-11.084915:114.503664:-900.000000 +37.235085:104.503664:-900.000000 +PORT +In:"1500" +PORT +Max:"2500" +PORT +Min:"1450" +PORT +Title:"UpperThresHold" +FIN_BOX +BOX +wt:LayoutLine:Box17 +ISEXEC:FALSE +-16.520519:-78.953832:-900.000000 +41.039481:-88.953832:-900.000000 +FIN_BOX +BOX +wt:CommandButton:Box21 +ISEXEC:FALSE +66.944278:42.623376:-900.000000 +112.519278:32.623376:-900.000000 +PORT +Label:"Run" +FIN_BOX +BOX +wt:AddObjectToViewerWeb:Box22 +ISEXEC:FALSE +59.945615:-43.722720:-900.000000 +131.120615:-53.722720:-900.000000 +FIN_BOX +BOX +wt:LayoutSplit:Box23 +ISEXEC:TRUE +-52.715423:-132.082511:-900.000000 +-7.140423:-142.082511:-900.000000 +PORT +Orientation:"h" +FIN_BOX +CONNECTIONS:21 +CONNECTION +Box00:Out:Box02:In +NumberOfControlPoints:0 +CONNECTION +Box02:Out:Box06:In +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box09:In +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box05:In +NumberOfControlPoints:0 +CONNECTION +Box05:Out:Box14:In +NumberOfControlPoints:0 +CONNECTION +Box10:Out:Box08:In2 +NumberOfControlPoints:0 +CONNECTION +Box08:Out:Box14:Filename +NumberOfControlPoints:0 +CONNECTION +Box15:Out:Box10:In2 +NumberOfControlPoints:0 +CONNECTION +Box15:Out:Box02:LowerThreshold +NumberOfControlPoints:0 +CONNECTION +Box16:Out:Box02:UpperThreshold +NumberOfControlPoints:0 +CONNECTION +Box16:Out:Box10:In4 +NumberOfControlPoints:0 +CONNECTION +Box15:Widget:Box17:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box16:Widget:Box17:Widget3 +NumberOfControlPoints:0 +CONNECTION +Box21:BoxChange:Box14:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box21:Widget:Box17:Widget5 +NumberOfControlPoints:0 +CONNECTION +Box10:Out:Box22:Mesh +NumberOfControlPoints:0 +CONNECTION +Box12:viewer1:Box22:Viewer3D +NumberOfControlPoints:0 +CONNECTION +Box22:Widget:Box17:Widget8 +NumberOfControlPoints:0 +CONNECTION +Box21:BoxChange:Box22:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box12:Widget:Box23:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box17:Widget:Box23:Widget1 +NumberOfControlPoints:0 +APP_END diff --git a/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbs b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbs new file mode 100644 index 0000000..894cb52 --- /dev/null +++ b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbs @@ -0,0 +1,123 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /home/gonzalez/Documents/CREATOOLS/wt_library/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include vtk +include itk +include std +include wt + +author "Author ??" +description "Description ??" +category "" + +new LoadHola Box00 + +new BinaryThresholdImageFilter Box02 + set Box02.InsideValue "255" + set Box02.LowerThreshold "1250" + set Box02.OutsideValue "0" + set Box02.UpperThreshold "1500" + +new MarchingCubes Box05 + set Box05.ComputeNormalsOn "true" + set Box05.ComputeScalarsOn "false" + set Box05.Value "128" + +new ImageContinuousErode3D Box06 + set Box06.KernelSizeX "3" + set Box06.KernelSizeY "3" + set Box06.KernelSizeZ "3" + +new SegmentationConnectivity Box09 + set Box09.PositionXYZ "73 101 93" + set Box09.ThresholdMinMax "200 300" + +new ConcatStrings Box08 + set Box08.In1 "/home/gonzalez/Documents/pruebaResources/" + +new ConcatStrings Box10 + set Box10.In1 "holaPP" + set Box10.In3 "_" + set Box10.In5 ".vtk" + +new ViewerNVWeb Box12 + set Box12.ImagePath "hola.nii" + +new PolyDataWriter Box14 + +new Slider Box15 + set Box15.In "1250" + set Box15.Max "1449" + set Box15.Min "500" + set Box15.Title "LowerThreshold" + +new Slider Box16 + set Box16.In "1500" + set Box16.Max "2500" + set Box16.Min "1450" + set Box16.Title "UpperThresHold" + +new LayoutLine Box17 + +new CommandButton Box21 + set Box21.Label "Run" + +new AddObjectToViewerWeb Box22 + +new LayoutSplit Box23 + set Box23.Orientation "h" + + +connect Box00.Out Box02.In + +connect Box02.Out Box06.In + +connect Box06.Out Box09.In + +connect Box09.Out Box05.In + +connect Box05.Out Box14.In + +connect Box10.Out Box08.In2 + +connect Box08.Out Box14.Filename + +connect Box15.Out Box10.In2 + +connect Box15.Out Box02.LowerThreshold + +connect Box16.Out Box02.UpperThreshold + +connect Box16.Out Box10.In4 + +connect Box15.Widget Box17.Widget2 + +connect Box16.Widget Box17.Widget3 + +connect Box21.BoxChange Box14.BoxExecute + +connect Box21.Widget Box17.Widget5 + +connect Box10.Out Box22.Mesh + +connect Box12.viewer1 Box22.Viewer3D + +connect Box22.Widget Box17.Widget8 + +connect Box21.BoxChange Box22.BoxExecute + +connect Box12.Widget Box23.Widget2 + +connect Box17.Widget Box23.Widget1 + + + +# Complex input ports +exec Box23 diff --git a/wt/bbtk_wt_PKG/src/bbwtconfigServerWT.cxx b/wt/bbtk_wt_PKG/src/bbwtconfigServerWT.cxx new file mode 100644 index 0000000..ee97ce7 --- /dev/null +++ b/wt/bbtk_wt_PKG/src/bbwtconfigServerWT.cxx @@ -0,0 +1,78 @@ +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +#include "bbwtconfigServerWT.h" +#include "bbwtPackage.h" +#include "bbtkWtBlackBox.h" +namespace bbwt +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,configServerWT) +BBTK_BLACK_BOX_IMPLEMENTATION(configServerWT,bbtk::AtomicBlackBox); +//===== +// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) +//===== +void configServerWT::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') + // bbSetOutputOut( bbGetInputIn() ); + // std::cout << "Output value = " < - * - * The X Toolkit (XTK) is licensed under the MIT License: - * http://www.opensource.org/licenses/mit-license.php - * - * "Free software" is a matter of liberty, not price. - * "Free" as in "free speech", not as in "free beer". - * - Richard M. Stallman - * - * FUELED BY: - * - the wonderful Constructive Solid Geometry library by Evan Wallace (http://madebyevan.com) - * LICENSE: https://raw.github.com/xtk/X/master/lib/csg/LICENSE - * - * - parts of the Google Closure Library (http://code.google.com/closure/library) - * LICENSE: https://raw.github.com/xtk/google-closure-library/master/LICENSE - * - * - zlib.js, the ultimate gzip/zlib javascript implementation (https://github.com/imaya/zlib.js) - * LICENSE: https://raw.github.com/imaya/zlib.js/master/LICENSE - * - * MORE CREDITS: https://raw.github.com/xtk/X/master/LICENSE - * - */ -function m(a){throw a;}var n=void 0,q=!0,r=null,s=!1;function aa(){return function(){}}function ba(a){return function(b){this[a]=b}}function u(a){return function(){return this[a]}}var w,ca=this;function ea(){} -function fa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ga(a){return a!==n}function ha(a){return"array"==fa(a)}function ja(a){var b=fa(a);return"array"==b||"object"==b&&"number"==typeof a.length}function la(a){return"string"==typeof a}function y(a){return"number"==typeof a}function ma(a){return"function"==fa(a)}function na(a){var b=typeof a;return"object"==b&&a!=r||"function"==b}function oa(a){return a[pa]||(a[pa]=++qa)}var pa="closure_uid_"+(1E9*Math.random()>>>0),qa=0; -function ra(a,b,c){return a.call.apply(a.bind,arguments)}function sa(a,b,c){a||m(Error());if(2a&&(a=this.byteLength+a);0>c&&(c=this.byteLength+c);ca&&(a=0);0>c&&(c=0);a>this.byteLength&&(a=this.byteLength);c>this.byteLength&&(c=this.byteLength);for(var d=new ArrayBuffer(c-a),e=new Uint8Array(this),f=new Uint8Array(d),g=a,h=0;g")&&(a=a.replace(Na,">"));-1!=a.indexOf('"')&&(a=a.replace(Oa,"""));return a}var La=/&/g,Ma=//g,Oa=/\"/g,Ka=/[&<>\"]/;var Pa,Qa,Ra,Sa,Ta,Va,Wa;function Xa(){return ca.navigator?ca.navigator.userAgent:r}function Ya(){return ca.navigator}Sa=Ra=Qa=Pa=s;var Za;if(Za=Xa()){var $a=Ya();Pa=0==Za.indexOf("Opera");Qa=!Pa&&-1!=Za.indexOf("MSIE");Ra=!Pa&&-1!=Za.indexOf("WebKit");Sa=!Pa&&!Ra&&"Gecko"==$a.product}var ab=Pa,L=Qa,bb=Sa,db=Ra,eb,fb=Ya();eb=fb&&fb.platform||"";Ta=-1!=eb.indexOf("Mac");Va=-1!=eb.indexOf("Win");Wa=-1!=eb.indexOf("Linux");var gb=!!Ya()&&-1!=(Ya().appVersion||"").indexOf("X11"); -function hb(){var a=ca.document;return a?a.documentMode:n}var ib;a:{var jb="",kb;if(ab&&ca.opera)var lb=ca.opera.version,jb="function"==typeof lb?lb():lb;else if(bb?kb=/rv\:([^\);]+)(\)|;)/:L?kb=/MSIE\s+([^\);]+)(\)|;)/:db&&(kb=/WebKit\/(\S+)/),kb)var mb=kb.exec(Xa()),jb=mb?mb[1]:"";if(L){var nb=hb();if(nb>parseFloat(jb)){ib=String(nb);break a}}ib=jb}var ob={}; -function pb(a){var b;if(!(b=ob[a])){b=0;for(var c=String(ib).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),f=0;0==b&&f(0==p[1].length?0:parseInt(p[1],10))?1:0)||((0==k[2].length)<(0==p[2].length)?-1:(0==k[2].length)>(0==p[2].length)?1:0)||(k[2]p[2]?1:0)}while(0==b)}b=ob[a]=0<=b}return b}var qb=ca.document,rb=!qb||!L?n:hb()||("CSS1Compat"==qb.compatMode?parseInt(ib,10):5);function sb(){0!=tb&&(this.Jj=Error().stack,oa(this))}var tb=0;function ub(a,b){this.type=a;this.currentTarget=this.target=b}w=ub.prototype;w.ac=s;w.defaultPrevented=s;w.Gd=q;w.stopPropagation=function(){this.ac=q};w.preventDefault=function(){this.defaultPrevented=q;this.Gd=s};var vb=0;function wb(){}w=wb.prototype;w.key=0;w.bc=s;w.od=s;w.ea=function(a,b,c,d,e,f){ma(a)?this.Pf=q:a&&a.handleEvent&&ma(a.handleEvent)?this.Pf=s:m(Error("Invalid listener argument"));this.Db=a;this.hg=b;this.src=c;this.type=d;this.capture=!!e;this.ye=f;this.od=s;this.key=++vb;this.bc=s};w.handleEvent=function(a){return this.Pf?this.Db.call(this.ye||this.src,a):this.Db.handleEvent.call(this.Db,a)};function xb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}var yb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function zb(a,b){for(var c,d,e=1;ec?Math.max(0,a.length+c):c;if(la(a))return!la(b)||1!=b.length?-1:a.indexOf(b,c);for(;c=arguments.length?Cb.slice.call(a,b):Cb.slice.call(a,b,c)};function Jb(a){Jb[" "](a);return a}Jb[" "]=ea;function Kb(a,b){a&&this.ea(a,b)}F(Kb,ub);w=Kb.prototype;w.target=r;w.relatedTarget=r;w.offsetX=0;w.offsetY=0;w.clientX=0;w.clientY=0;w.screenX=0;w.screenY=0;w.button=0;w.keyCode=0;w.charCode=0;w.ctrlKey=s;w.altKey=s;w.shiftKey=s;w.metaKey=s;w.hi=s;w.Ma=r; -w.ea=function(a,b){var c=this.type=a.type;ub.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(bb){var e;a:{try{Jb(d.nodeName);e=q;break a}catch(f){}e=s}e||(d=r)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=db||a.offsetX!==n?a.offsetX:a.layerX;this.offsetY=db||a.offsetY!==n?a.offsetY:a.layerY;this.clientX=a.clientX!==n?a.clientX:a.pageX;this.clientY=a.clientY!==n?a.clientY:a.pageY;this.screenX= -a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.hi=Ta?a.metaKey:a.ctrlKey;this.state=a.state;this.Ma=a;a.defaultPrevented&&this.preventDefault();delete this.ac};w.stopPropagation=function(){Kb.s.stopPropagation.call(this);this.Ma.stopPropagation?this.Ma.stopPropagation():this.Ma.cancelBubble=q}; -w.preventDefault=function(){Kb.s.preventDefault.call(this);var a=this.Ma;if(a.preventDefault)a.preventDefault();else if(a.returnValue=s,Bb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};w.dh=u("Ma");var Lb={},Nb={},Ob={},Pb={};function O(a,b,c,d,e){if(ha(b)){for(var f=0;fe.keyCode||e.returnValue!=n)return q;a:{var l=s;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(j){l=q}if(l||e.returnValue==n)e.returnValue=q}}l=new Kb;l.ea(e,this);e=q;try{if(g){for(var k=[],p=l.currentTarget;p;p=p.parentNode)k.push(p);f=d[q];f.pa=f.V;for(var t=k.length- -1;!l.ac&&0<=t&&f.pa;t--)l.currentTarget=k[t],e&=Yb(f,k[t],c,q,l);if(h){f=d[s];f.pa=f.V;for(t=0;!l.ac&&tj?2:1E-52*this.V&&sc(this),q):s};function sc(a){if(a.V!=a.w.length){for(var b=0,c=0;ba||360a||360a||360a)&&m(Error("Invalid opacity."));for(var b=this.e,c=b.length,d=0,d=0;db.K?-1:1}D("X.object",W);D("X.object.prototype.modified",W.prototype.n);function Tc(){}function Uc(a){for(var b=a.i.count,c=[],d=0,d=0;dg;f--,g++){var h=b[g];b[g]=b[f];b[f]=h}b=a}return 1==c?b[0]:b} -function sd(a,b,c){H.Ea(a.c+".reslice");var d=b.aa,e=c.max,f=c.data,g=d[2],h=d[1],d=d[0],l=b.m!=r,j=h*d,k=Array(g),p=Array(g),t=0,v=r;b.$&&(v=b.$.pb);for(var z=0,A=0,C=0,E=0,x=4*j,z=0;ze&&m(Error("Could not find scalar for vertex.")),l=g[l],f[h++]=l,f[h++]=l,f[h++]=l;b.u.v= -g;b.u.sc=f;b.u.g=q;H.qa(this.c+".parse");d=new Rc;d.Y=b;d.q=a;this.dispatchEvent(d)};D("X.parserLBL",xd);D("X.parserLBL.prototype.parse",xd.prototype.parse);function yd(a,b){this.x=ga(a)?a:0;this.y=ga(b)?b:0}w=yd.prototype;w.h=function(){return new yd(this.x,this.y)};function zd(a,b){return new yd(a.x-b.x,a.y-b.y)}w.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};w.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};w.translate=function(a,b){a instanceof yd?(this.x+=a.x,this.y+=a.y):(this.x+=a,y(b)&&(this.y+=b));return this};w.scale=function(a,b){var c=y(b)?b:a;this.x*=a;this.y*=c;return this};function Ad(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}w=Ad.prototype;w.h=function(){return new Ad(this.top,this.right,this.bottom,this.left)};w.contains=function(a){return!this||!a?s:a instanceof Ad?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom}; -w.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};w.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};w.translate=function(a,b){a instanceof yd?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(this.left+=a,this.right+=a,y(b)&&(this.top+=b,this.bottom+=b));return this}; -w.scale=function(a,b){var c=y(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Bd(a,b){this.width=a;this.height=b}Bd.prototype.h=function(){return new Bd(this.width,this.height)};Bd.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};Bd.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};Bd.prototype.scale=function(a,b){var c=y(b)?b:a;this.width*=a;this.height*=c;return this};function Cd(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}w=Cd.prototype;w.h=function(){return new Cd(this.left,this.top,this.width,this.height)};w.Of=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);if(d<=a)return this.left=b,this.top=d,this.width=c-b,this.height=a-d,q}return s}; -w.contains=function(a){return a instanceof Cd?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};w.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this}; -w.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};w.translate=function(a,b){a instanceof yd?(this.left+=a.x,this.top+=a.y):(this.left+=a,y(b)&&(this.top+=b));return this};w.scale=function(a,b){var c=y(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};var Dd;function Ed(a,b){var c;c=a.className;c=la(c)&&c.match(/\S+/g)||[];for(var d=Ib(arguments,1),e=c.length+d.length,f=c,g=0;g");c=c.join("")}var f=a.createElement(c);if(d)if(la(d))f.className=d;else if(ha(d))Ed.apply(r,[f].concat(d));else{var c=function(a,b){"style"==b?f.style.cssText=a:"class"==b?f.className=a:"for"==b?f.htmlFor=a:b in Kd?f.setAttribute(Kd[b],a):0==b.lastIndexOf("aria-",0)||0==b.lastIndexOf("data-",0)? -f.setAttribute(b,a):f[b]=a},g;for(g in d)c.call(n,d[g],g)}if(2a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return r} -function Xd(a){for(var b=new Ad(0,Infinity,Infinity,0),c=Gd(a),d=c.N.body,e=c.N.documentElement,f=!db&&"CSS1Compat"==c.N.compatMode?c.N.documentElement:c.N.body;a=Wd(a);)if((!L||0!=a.clientWidth)&&(!db||0!=a.clientHeight||a!=d)&&a!=d&&a!=e&&"visible"!=Td(a,"overflow")){var g=Yd(a),h;h=a;if(bb&&!pb("1.9")){var l=parseFloat(Sd(h,"borderLeftWidth"));if(Zd(h))var j=h.offsetWidth-h.clientWidth-l-parseFloat(Sd(h,"borderRightWidth")),l=l+j;h=new yd(l,parseFloat(Sd(h,"borderTopWidth")))}else h=new yd(h.clientLeft, -h.clientTop);g.x+=h.x;g.y+=h.y;b.top=Math.max(b.top,g.y);b.right=Math.min(b.right,g.x+a.clientWidth);b.bottom=Math.min(b.bottom,g.y+a.clientHeight);b.left=Math.max(b.left,g.x)}d=f.scrollLeft;f=f.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,f);c=(c.N.parentWindow||c.N.defaultView||window).document;c="CSS1Compat"==c.compatMode?c.documentElement:c.body;c=new Bd(c.clientWidth,c.clientHeight);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,f+c.height);return 0<=b.top&&0<=b.left&& -b.bottom>b.top&&b.right>b.left?b:r} -function Yd(a){var b,c=Id(a),d=Td(a,"position"),e=bb&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new yd(0,0),g=Ud(c);if(a==g)return f;if(a.getBoundingClientRect)b=Vd(a),a=Rd(Gd(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(g),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY;else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop||0); -if(db&&"fixed"==Td(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(ab||db&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=Wd(b))&&b!=c.body&&b!=g;)if(f.x-=b.scrollLeft,!ab||"TR"!=b.tagName)f.y-=b.scrollTop}return f}function $d(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a} -function ae(a){if("none"!=Td(a,"display"))return be(a);var b=a.style,c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=be(a);b.display=c;b.position=e;b.visibility=d;return a}function be(a){var b=a.offsetWidth,c=a.offsetHeight,d=db&&!b&&!c;return(!ga(b)||d)&&a.getBoundingClientRect?(a=Vd(a),new Bd(a.right-a.left,a.bottom-a.top)):new Bd(b,c)}function ce(a,b){a.style.display=b?"":"none"}function Zd(a){return"rtl"==Td(a,"direction")} -function de(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return e}function ee(a,b){var c=a.currentStyle?a.currentStyle[b]:r;return c?de(a,c):0}var fe={thin:2,medium:4,thick:6};function ge(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:r))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:r;return c in fe?fe[c]:de(a,c)} -var he=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function ie(a,b){sb.call(this);this.r=a;var c=na(this.r)&&1==this.r.nodeType?this.r:this.r?this.r.body:r;this.wh=!!c&&Zd(c);this.Nj=O(this.r,bb?"DOMMouseScroll":"mousewheel",this,b)}F(ie,bc); -ie.prototype.handleEvent=function(a){var b=0,c=0,d=0;a=a.Ma;if("mousewheel"==a.type){c=1;if(L||db&&(Va||pb("532.0")))c=40;d=je(-a.wheelDelta,c);ga(a.wheelDeltaX)?(b=je(-a.wheelDeltaX,c),c=je(-a.wheelDeltaY,c)):c=d}else d=a.detail,100d&&(d=-3),ga(a.axis)&&a.axis===a.HORIZONTAL_AXIS?b=d:c=d;y(this.Uf)&&(b=Math.min(Math.max(b,-this.Uf),this.Uf));y(this.Vf)&&(c=Math.min(Math.max(c,-this.Vf),this.Vf));this.wh&&(b=-b);b=new ke(d,a,b,c);this.dispatchEvent(b)}; -function je(a,b){return db&&(Ta||Wa)&&0!=a%b?a:a/b}function ke(a,b,c,d){b&&this.ea(b,n);this.type="mousewheel";this.detail=a;this.Kj=c;this.nc=d}F(ke,Kb);L||db&&pb("525");function le(a){(a==r||!(a instanceof Element))&&m(Error("Could not add interactor to the given element."));Q.call(this);this.c="interactor";this.ra=a;this.ae=this.jf=this.hf=this.kf=this.gf=this.lf=r;this.$d=q;this.yb=this.rb=this.Xa=s;this.cd=[0,0];this.Vd=new H.f(0,0,0);this.wc=new H.f(0,0,0);this.Qf=0;this.rf=this.Zc=r;this.F={MOUSEWHEEL_ENABLED:q,MOUSECLICKS_ENABLED:q,KEYBOARD_ENABLED:q,HOVERING_ENABLED:q,CONTEXTMENU_ENABLED:s,TOUCH_ENABLED:q,TOUCH_BOUNCING_ENABLED:s}}F(le,Q); -le.prototype.__defineGetter__("config",u("F"));le.prototype.__defineGetter__("leftButtonDown",u("Xa"));le.prototype.__defineGetter__("middleButtonDown",u("rb"));le.prototype.__defineGetter__("rightButtonDown",u("yb")); -le.prototype.ea=function(){this.F.MOUSEWHEEL_ENABLED?(this.ae=new ie(this.ra),this.lf=O(this.ae,"mousewheel",this.Qc.bind(this))):(Wb(this.lf),this.ae=r);this.F.MOUSECLICKS_ENABLED?(this.gf=O(this.ra,"mousedown",this.Jh.bind(this)),this.kf=O(this.ra,"mouseup",this.Oh.bind(this))):(Wb(this.gf),Wb(this.kf));this.ra.oncontextmenu=this.F.CONTEXTMENU_ENABLED?r:function(){return s};window.onkeydown=this.F.KEYBOARD_ENABLED?this.$f.bind(this):r;this.F.TOUCH_ENABLED?(this.F.TOUCH_BOUNCING_ENABLED||document.body.addEventListener("touchmove", -function(a){a.preventDefault()},s),this.Eg=O(this.ra,"touchstart",this.bi.bind(this)),this.Dg=O(this.ra,"touchmove",this.$h.bind(this)),this.Cg=O(this.ra,"touchend",this.Wh.bind(this))):(Wb(this.Eg),Wb(this.Dg),Wb(this.Cg));Wb(this.hf);Wb(this.jf);this.hf=O(this.ra,"mousemove",this.Lh.bind(this));this.jf=O(this.ra,"mouseout",this.Mh.bind(this))}; -le.prototype.Jh=function(a){0==a.button?this.Xa=q:1==a.button?this.rb=q:2==a.button&&(this.yb=q);eval("this.onMouseDown("+this.Xa+","+this.rb+","+this.yb+")");me(this);a.preventDefault()};le.prototype.Ih=aa();le.prototype.Oh=function(a){0==a.button?this.Xa=s:1==a.button?this.rb=s:2==a.button&&(this.yb=s);eval("this.onMouseUp("+this.Xa+","+this.rb+","+this.yb+")");me(this);a.preventDefault()};le.prototype.__defineGetter__("mousePosition",u("cd"));w=le.prototype;w.Nh=aa(); -w.Mh=function(a){this.$d=s;this.F.KEYBOARD_ENABLED&&(window.onkeydown=r);this.yb=this.rb=this.Xa=s;me(this);this.Vd=new H.f(0,0,0);a.preventDefault()};w.Kh=aa();w.bi=function(a){a.preventDefault();a.ea(a.Ma.targetTouches[0],a.currentTarget);eval("this.onTouchStart("+a.clientX+","+a.clientY+")");this.wc=new H.f(a.clientX,a.clientY,0);this.rf=setTimeout(this.Yh.bind(this,a),500)};w.ai=aa(); -w.Yh=function(a){eval("this.onTouchHover("+a.clientX+","+a.clientY+")");a=new jd;a.Qa=q;a.Ha=this instanceof ne;this.dispatchEvent(a);this.jd=q};w.Xh=aa();function oe(a){clearTimeout(a.rf);if(a.jd){var b=new jd;b.Qa=s;b.Ha=a instanceof ne;a.dispatchEvent(b)}a.jd=s}w.Wh=function(a){a.preventDefault();eval("this.onTouchEnd()");oe(this)};w.Vh=aa(); -w.$h=function(a){a.preventDefault();this.jd||oe(this);this.touchmoveEvent=a=a.Ma;eval("this.onTouchMove(this['touchmoveEvent'])");var b=a.targetTouches;if(1==b.length){a=b[0];var c=[a.clientX,a.clientY];a=new H.f(c[0],c[1],0);var b=c[0]>3*this.ra.clientWidth/4,d=c[0]3*this.ra.clientHeight/4,c=!b&&!d&&!e&&!c,e=this.wc.la(a);this.wc=a.h();if(this.jd)a=new hd,5e.x&&(e.x=-1),5e.y&&(e.y=-1),a.K=e,this.dispatchEvent(a); -else if(this instanceof pe&&(b||d))a=new kd,a.I=0>e.y,this.dispatchEvent(a);else if(this instanceof ne||c)e.scale(3),a=new id,a.K=e,this.dispatchEvent(a)}else 2==b.length&&(a=b[0],b=b[1],a=[a.clientX,a.clientY],b=[b.clientX,b.clientY],a=new H.f(a[0],a[1],0),b=new H.f(b[0],b[1],0),e=xc(a,b),b=e-this.Qf,this.Qf=e,this.wc.la(a),this.wc=a.h(),10Math.abs(a.x)&&(a.x=0);2>Math.abs(a.y)&&(a.y=0);0!=a.eb()&&(this.Xa&&!b?(b=new id,a.scale(3),b.K=a,this.dispatchEvent(b)):this.rb||this.Xa&&b?(b=new hd,5a.x&&(a.x=-5),5a.y&&(a.y=-5),b.K=a,this.dispatchEvent(b)):this.yb&&(b=new jd,b.Qa=0=f&&(a.preventDefault(),e?a=new hd:b?a=new jd:(a=new id,this instanceof pe&&(a=new kd)),a&&(c=new H.f(0,0,0),37==f?(c.x=5,a.I=s,b&&(a.I=q,a.Qa=q,a.Ha=s)):39==f?(c.x=-5,a.I=q,b&&(a.Qa=s,a.Ha=s)):38==f?(c.y=5,a.I=q,b&&(a.Qa=q,a.Ha=q)):40==f&&(c.y=-5,a.I=s,b&&(a.Qa= -s,a.Ha=q)),a.K=c,this.dispatchEvent(a)))}};D("X.interactor",le);D("X.interactor.prototype.init",le.prototype.ea);D("X.interactor.prototype.onMouseDown",le.prototype.Ih);D("X.interactor.prototype.onMouseUp",le.prototype.Nh);D("X.interactor.prototype.onMouseMove",le.prototype.Kh);D("X.interactor.prototype.onMouseWheel",le.prototype.Ph);D("X.interactor.prototype.onKey",le.prototype.Gh);D("X.interactor.prototype.onTouchStart",le.prototype.ai);D("X.interactor.prototype.onTouchMove",le.prototype.Zh); -D("X.interactor.prototype.onTouchEnd",le.prototype.Vh);D("X.interactor.prototype.onTouchHover",le.prototype.Xh);function pe(a){le.call(this,a);this.c="interactor2D"}F(pe,le);pe.prototype.Qc=function(a){pe.s.Qc.call(this,a);var b=new kd;a.nc==r&&(a.nc=0);b.I=0>a.nc;this.dispatchEvent(b)};function qe(a){W.call(this);this.c="slice";this.k=[0,0,0];this.hc=[0,0,1];this.I=[0,1,0];this.G=this.M=10;this.Vb=[0,1,0,0,1,1,1,1,1,0,0,0];this.m=this.ab=r;this.Pa=q;this.ec=[1,1,1];a!=r&&this.Xb(a)}F(qe,W);qe.prototype.Xb=function(a){this.k=a.k.slice();this.hc=a.hc.slice();this.I=a.I.slice();this.M=a.M;this.G=a.G;this.ab=a.ab;this.m=a.m;this.Pa=a.Pa;this.ec=a.ec;this.zg=a.zg;qe.s.Xb.call(this,a)}; -qe.prototype.mc=function(){var a=new S(this.hc[0],this.hc[1],this.hc[2]),b=new S(this.I[0],this.I[1],this.I[2]),c=zc(b,a),d=new S(this.k[0],this.k[1],this.k[2]),e=new S(1,1,1);1==a.x?(e=new S(this.k[0],this.G/2,this.M/2),this.Vb=[0,0,1,0,0,1,0,1,1,1,1,0]):1==a.y?(e=new S(this.M/2,this.k[1],this.G/2),this.Vb=[0,0,0,1,1,0,1,0,1,1,0,1]):1==a.b&&(e=new S(this.M/2,this.G/2,this.k[2]));var f=yc(c.h().D(),b.h().D()),f=new S(f.x*e.x,f.y*e.y,f.b*e.b);f.add(d);var g=yc(c.h().D(),b),g=new S(g.x*e.x,g.y*e.y, -g.b*e.b);g.add(d);var h=yc(c,b.h().D()),h=new S(h.x*e.x,h.y*e.y,h.b*e.b);h.add(d);var l=h,b=yc(c,b),b=new S(b.x*e.x,b.y*e.y,b.b*e.b);b.add(d);d=g;this.i=new U(18);this.j=new U(18);this.i.add(f.x,f.y,f.b);this.i.add(g.x,g.y,g.b);this.i.add(h.x,h.y,h.b);this.i.add(l.x,l.y,l.b);this.i.add(b.x,b.y,b.b);this.i.add(d.x,d.y,d.b);this.j.add(a.x,a.y,a.b);this.j.add(a.x,a.y,a.b);this.j.add(a.x,a.y,a.b);this.j.add(a.x,a.y,a.b);this.j.add(a.x,a.y,a.b);this.j.add(a.x,a.y,a.b);this.Pa&&(a=new W,a.i=new U(24),a.j= -new U(24),a.i.add(f.x,f.y,f.b),a.i.add(g.x,g.y,g.b),a.i.add(g.x,g.y,g.b),a.i.add(b.x,b.y,b.b),a.i.add(b.x,b.y,b.b),a.i.add(h.x,h.y,h.b),a.i.add(h.x,h.y,h.b),a.i.add(f.x,f.y,f.b),a.j.add(0,0,0),a.j.add(0,0,0),a.j.add(0,0,0),a.j.add(0,0,0),a.j.add(0,0,0),a.j.add(0,0,0),a.j.add(0,0,0),a.j.add(0,0,0),a.Gb=[this.ec[0],this.ec[1],this.ec[2]],a.ja="LINES",a.jc=2,this.e.push(a))};D("X.slice",qe);function R(a){W.call(this);this.c="volume";this.k=[0,0,0];this.aa=[10,10,10];this.H=[1,1,1];this.jb=[];this.vc=this.mb=this.uc=this.lb=this.tc=this.kb=0;this.Q=new W;this.R=new W;this.Za=new W;this.ld=this.Ka=s;this.zb=0;this.m=r;this.Pa=q;this.U=Infinity;this.T=-Infinity;this.ee=q;Ea(this,new pc);Ea(this,new Pc);a!=r&&this.Xb(a)}F(R,W); -R.prototype.Xb=function(a){window.console.log(a);this.k=a.k.slice();this.aa=a.aa.slice();this.H=a.H.slice();this.kb=a.kb;this.tc=a.tc;this.lb=a.lb;this.uc=a.uc;this.mb=a.mb;this.vc=a.vc;this.Q=new W(a.Q);this.R=new W(a.R);this.Za=new W(a.Za);this.Ka=a.Ka;this.ld=a.ld;this.zb=a.zb;this.m=a.m;this.Pa=a.Pa;R.s.Xb.call(this,a)}; -R.prototype.mc=function(){this.e.length=0;this.Q.e.length=0;this.R.e.length=0;this.Za.e.length=0;this.e.push(this.Q);this.e.push(this.R);this.e.push(this.Za);for(var a=0,a=0;3>a;a++){for(var b=(this.aa[a]-1)/2,c=b,d=0,d=0;db;b++){var c=this.e[b],d=0,e=0;0==b?(d=this.kb,e=this.tc,this.tc=this.kb):1==b?(d=this.lb,e=this.uc,this.uc=this.lb):2==b&&(d=this.mb,e=this.vc,this.vc=this.mb);c.e[parseInt(e, -10)].visible=s;c=c.e[parseInt(d,10)];c.visible=q;c.Z=1}a&&R.s.n.call(this)};R.prototype.__defineGetter__("dimensions",u("aa"));R.prototype.__defineGetter__("volumeRendering",u("Ka"));R.prototype.__defineSetter__("volumeRendering",function(a){this.Ka=a;this.n(s)});R.prototype.__defineSetter__("visible",ba("Ja"));R.prototype.__defineGetter__("center",u("k"));R.prototype.__defineSetter__("center",function(a){(a==r||!ha(a)||3!=a.length)&&m(Error("Invalid center."));this.k=a}); -R.prototype.__defineGetter__("image",u("jb"));R.prototype.__defineGetter__("labelmap",function(){this.m||(this.m=new ue(this));return this.m});R.prototype.__defineGetter__("indexX",u("kb"));R.prototype.__defineSetter__("indexX",function(a){y(a)&&(0<=a&&a>8,c+=String.fromCharCode(p),c+=String.fromCharCode(k),c=parseInt(c,10);j--}else if(4161==f){l++;for(var d=h[l++],e="",f=0;f>8,e+=String.fromCharCode(p),e+=String.fromCharCode(k);g.ka=[g.ka[0],g.ka[1],Math.min(Math.abs(g.Sf-e),g.ka[2])];g.Sf= -e;j--}g.xa[2]++}else{var g={rows:0,cols:0,ka:r,ne:0,Jg:0,Sa:1,Eh:1,Sf:r,Cd:0,Wa:0,Mc:r,Me:0,Se:[],data:r,min:Infinity,max:-Infinity};g.Sa=b.o.length;g.Sa==r&&(g.Sa=1);for(var h=Y(this,"ushort",this.X.byteLength),l=66,d=r,f=r,d=r,j=7;0>8,e=e+String.fromCharCode(p),e=e+String.fromCharCode(k);e=e.split("\\");g.ka=[+e[0],+e[1],Infinity];j--}else if(32==d&&(f=h[l++],19==f)){l++;d=h[l++];for(f=0;f>8,c+=String.fromCharCode(p),c+=String.fromCharCode(k),c=parseInt(c,10);j--}b.dc=g;g.xa=[g.cols,g.rows,1];g.Wa=g.rows*g.cols;switch(g.ne){case 8:g.Mc=new Uint8Array(g.cols*g.rows*g.Sa);g.data=new Uint8Array(g.cols*g.rows*g.Sa);break;case 16:g.Mc=new Uint16Array(g.cols*g.rows*g.Sa);g.data=new Uint16Array(g.cols* -g.rows*g.Sa);break;case 32:g.Mc=new Uint32Array(g.cols*g.rows*g.Sa),g.data=new Uint32Array(g.cols*g.rows*g.Sa)}}this.B=this.X.byteLength-2*g.Wa;h=r;switch(g.ne){case 8:h=Y(this,"uchar",g.Wa);break;case 16:h=Y(this,"ushort",g.Wa);break;case 32:h=Y(this,"uint",g.Wa)}g.Se[c]=g.Me;g.Mc.set(h,g.Me*g.Wa);g.Me++;++g.Cd;return g};D("X.parserDCM",we);D("X.parserDCM.prototype.parse",we.prototype.parse);function xe(){pd.call(this);this.c="parserVTK"}F(xe,pd); -xe.prototype.parse=function(a,b,c){H.Ea(this.c+".parse");var d=b.i,e=b.j,f=new Uint8Array(c),g="";b.i=d=new U(c.byteLength);b.j=e=new U(c.byteLength);c=0;for(var h=f.length;c=k);p++){var t=parseInt(j[p],10),v=c.get(t);d.add(v[0],v[1],v[2]);var z=t,A=v;"LINES"==this.ta?(z=parseInt(j[p+1],10),A=c.get(z),d.add(A[0],A[1],A[2])):"TRIANGLE_STRIPS"==this.ta&&(0==p||p==k-1)&&d.add(v[0],v[1],v[2]);tc&&10!=g);Y(this,"uchar");e=Y(this,"uint");c=Y(this,"uint");var h=Y(this,"float",3*e);g=Y(this,"uint",3*c);var l=new Uint32Array(e),j=new Float32Array(9*c);b.i=d=new U(9*c);b.j=e=new U(9*c);var k;for(k=0;k>>8^e[(b^a[c])&255];for(f=d>>3;f--;c+=8)b=b>>>8^e[(b^a[c])&255],b=b>>>8^e[(b^a[c+1])&255],b=b>>>8^e[(b^a[c+2])&255],b=b>>>8^e[(b^a[c+3])&255],b=b>>>8^e[(b^a[c+4])&255],b=b>>>8^e[(b^a[c+5])&255],b=b>>>8^e[(b^a[c+6])&255],b=b>>>8^e[(b^a[c+7])&255];return(b^4294967295)>>>0}}; -Ae.rg=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101, -3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271, -366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376, -3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954, -1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836, -1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function Be(a){var b=a.length,c=0,d=Number.POSITIVE_INFINITY,e,f,g,h,l,j,k,p,t;for(p=0;pc&&(c=a[p]),a[p]>=1;for(t=j;t>>=1;switch(a){case 0:var a=this.input,b=this.fa,c=this.ya,d=this.O,e=n,f=n,g=n,h=c.length,e=n;this.La=this.Kc=0;e=a[b++];e===n&&m(Error("invalid uncompressed block header: LEN (first byte)"));f=e;e=a[b++];e===n&&m(Error("invalid uncompressed block header: LEN (second byte)"));f|=e<<8;e=a[b++];e===n&&m(Error("invalid uncompressed block header: NLEN (first byte)"));g=e;e=a[b++];e===n&&m(Error("invalid uncompressed block header: NLEN (second byte)"));g|= -e<<8;f===~g&&m(Error("invalid uncompressed block header: length verify"));b+f>a.length&&m(Error("input buffer is broken"));switch(this.qe){case Ee:for(;d+f>c.length;)e=h-d,f-=e,c.set(a.subarray(b,b+e),d),d+=e,b+=e,this.O=d,c=this.Zb(),d=this.O;break;case De:for(;d+f>c.length;)c=this.Zb({Ef:2});break;default:m(Error("invalid inflate mode"))}c.set(a.subarray(b,b+f),d);d+=f;this.fa=b+=f;this.O=d;this.ya=c;break;case 1:this.xe(Ge,He);break;case 2:Ie(this);break;default:m(Error("unknown BTYPE: "+a))}}return this.xf()}; -var Je=new Uint16Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ke=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258]),Le=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0]),Me=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577]),Ne=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Oe=new Uint8Array(288), -Pe,Qe;Pe=0;for(Qe=Oe.length;Pe=Pe?8:255>=Pe?9:279>=Pe?7:8;var Ge=Be(Oe),Re=new Uint8Array(30),Se,Te;Se=0;for(Te=Re.length;Se>>b;a.La=d-b;a.fa=f;return g} -function Ue(a,b){for(var c=a.Kc,d=a.La,e=a.input,f=a.fa,g=b[0],h=b[1],l;d>>16;a.Kc=c>>g;a.La=d-g;a.fa=f;return e&65535} -function Ie(a){function b(a,b,c){var d,e,f;for(f=0;ff)d>=e&&(this.O=d,c=this.Zb(),d=this.O),c[d++]=f;else{f-=257;h=Ke[f];0=e&&(this.O=d,c=this.Zb(),d=this.O);for(;h--;)c[d]=c[d++-g]}for(;8<=this.La;)this.La-=8,this.fa--;this.O=d}; -w.Qg=function(a,b){var c=this.ya,d=this.O;this.Af=a;for(var e=c.length,f,g,h;256!==(f=Ue(this,a));)if(256>f)d>=e&&(c=this.Zb(),e=c.length),c[d++]=f;else{f-=257;h=Ke[f];0e&&(c=this.Zb(),e=c.length);for(;h--;)c[d]=c[d++-g]}for(;8<=this.La;)this.La-=8,this.fa--;this.O=d}; -w.Zb=function(){var a=new Uint8Array(this.O-32768),b=this.O-32768,c=this.ya;a.set(c.subarray(32768,a.length));this.oe.push(a);this.Ve+=a.length;c.set(c.subarray(b,b+32768));this.O=32768;return c};w.Wg=function(a){var b=this.input.length/this.fa+1|0,c=this.input,d=this.ya;a&&("number"===typeof a.Ef&&(b=a.Ef),"number"===typeof a.Fg&&(b+=a.Fg));2>b?(a=(c.length-this.fa)/this.Af[2],a=258*(a/2)|0,a=aVe;++Ve)for(var We=Ve,Xe=7,We=We>>>1;We;We>>>=1)--Xe;var Ye=[],Ze;for(Ze=0;288>Ze;Ze++)switch(q){case 143>=Ze:Ye.push([Ze+48,8]);break;case 255>=Ze:Ye.push([Ze-144+400,9]);break;case 279>=Ze:Ye.push([Ze-256+0,7]);break;case 287>=Ze:Ye.push([Ze-280+192,8]);break;default:m("invalid literal: "+Ze)} -function $e(){var a=af;switch(q){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a- -31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:m("invalid length: "+a)}}var bf=[],af,cf; -for(af=3;258>=af;af++)cf=$e(),bf[af]=cf[2]<<24|cf[1]<<16|cf[0];new Uint32Array(bf);function df(){};function ef(a){this.input=a;this.fa=0;this.member=[]} -ef.prototype.Nc=function(){for(var a=this.input.length;this.fa>>0;Ae.re(e)!==c&&m(Error("invalid CRC-32 checksum: 0x"+Ae.re(e).toString(16)+ -" / 0x"+c.toString(16)));b.Mj=c=(h[d++]|h[d++]<<8|h[d++]<<16|h[d++]<<24)>>>0;(e.length&4294967295)!==c&&m(Error("invalid input size: "+(e.length&4294967295)+" / "+c));this.member.push(b);this.fa=d}a=this.member;b=e=d=0;for(h=a.length;bz)z=G;if(!A||KC)C=P;if(!d||Ve)e=T;k.push(I);p.push(N)}g=(v+z)/2;A=(A+C)/2;h=(d+e)/2;C=new Float32Array(f);b.i=d=new U(f);b.j=e=new U(f);b.W=f=new U(f);for(j=v=0;j=k;k++)d.push(!isNaN(this.Te[k])?this.Ga[k].scale(this.Te[k]):n)}f=c.subarray(f);if("gzip"==this.encoding||"gz"==this.encoding)f=(new ef(new Uint8Array(f))).Nc();f=f.buffer;c={data:r,min:Infinity,max:-Infinity};c.data=new this.Fb(f);k=qd(c.data);f=c.min=k[0];k=c.max=k[1];b.aa=[this.Qe[0],this.Qe[1],this.Qe[2]];d=(new S(this.Ga[0][0],this.Ga[0][1],this.Ga[0][2])).eb(); -e=(new S(this.Ga[1][0],this.Ga[1][1],this.Ga[1][2])).eb();g=(new S(this.Ga[2][0],this.Ga[2][1],this.Ga[2][2])).eb();b.H=[d,e,g];b.Ia=b.U=f;b.Fa=b.T=k;-Infinity==b.P&&(b.P=f);Infinity==b.S&&(b.S=k);b.mc();H.qa(this.c+".parse");b.jb=sd(this,b,c);c=new Rc;c.Y=b;c.q=a;this.dispatchEvent(c)}; -lf.prototype.Yg={type:function(a){switch(a){case "uchar":case "unsigned char":case "uint8":case "uint8_t":this.Fb=Uint8Array;break;case "signed char":case "int8":case "int8_t":this.Fb=Int8Array;break;case "short":case "short int":case "signed short":case "signed short int":case "int16":case "int16_t":this.Fb=Int16Array;break;case "ushort":case "unsigned short":case "unsigned short int":case "uint16":case "uint16_t":this.Fb=Uint16Array;break;case "int":case "signed int":case "int32":case "int32_t":this.Fb= -Int32Array;break;case "uint":case "unsigned int":case "uint32":case "uint32_t":this.Fb=Uint32Array;break;case "float":this.Fb=Float32Array;break;default:m(Error("Unsupported NRRD data type: "+a))}return this.type=a},endian:function(a){return this.Lj=a},encoding:function(a){return this.encoding=a},dimension:function(a){return this.xa=parseInt(a,10)},sizes:function(a){var b,c,d,e;d=a.split(/\s+/);e=[];b=0;for(c=d.length;ba.nc;b.Ha=q;this.dispatchEvent(b)};function zf(a){Q.call(this);this.c="array";this.v=[];this.af=a}F(zf,Q);zf.prototype.add=function(a){this.v.push(a);return q};zf.prototype.clear=function(){this.v.length=0};function Af(a,b,c){var d=c-b;if(!(2>d)){d=b+Math.floor(d/2);Af(a,b,d);for(Af(a,d,c);bf.af(f.v[g+1],e);){var l=f,j=g+1,k=l.v[g];l.v[g]=l.v[j];l.v[j]=k;++g}f.v[g]=e}}}zf.prototype.sort=function(){Af(this,0,this.v.length)};function Bf(a,b){sf.call(this,a,b);this.c="camera2D"}F(Bf,sf);Bf.prototype.rotate=function(a){a=Bf.s.rotate.call(this,a);var b=new gd;0a.x&&b.le++;0a.y&&b.Zd--;this.dispatchEvent(b)};function Cf(a,b){sf.call(this,a,b);this.c="camera3D";this.cf=45;this.nf=H.d.Ce(H.d.Oc(),this.cf,a/b,1,1E4)}F(Cf,sf);Cf.prototype.rotate=function(a){a=Cf.s.rotate.call(this,a);var b=-a.x/5*Math.PI/180;a=-a.y/5*Math.PI/180;var c=new H.f(this.p[1],this.p[5],this.p[9]),d=new H.f(this.p[0],this.p[4],this.p[8]);c.normalize();d.normalize();H.d.rotate(this.p,b,c.x,c.y,c.b);H.d.rotate(this.p,a,d.x,d.y,d.b)};Cf.prototype.Ed=function(a,b){var c=Cf.s.Ed.call(this,a,b);H.d.Tf(c,a,b,this.I);return c}; -D("X.camera3D",Cf);function Df(a){sb.call(this);this.cb=a;this.w=[]}F(Df,sb);var Ef=[];function Ff(a,b,c,d,e){ha(c)||(Ef[0]=c,c=Ef);for(var f=0;fthis.De?this.De-this.Cf:aib&&O(this.l(),"resize",this.Pd,s,this);this.Pd();var a=this.l();a.setAttribute("role","progressbar");a.setAttribute("aria-live","polite")};w.sd=function(){Lf.s.sd.call(this);L&&7>ib&&Vb(this.l(),"resize",this.Pd,s,this)};w.yd=function(){return this.Tc.yd()};w.Md=function(a){this.Tc.Md(a);this.l()&&Of(this)};function Of(a){var b=a.yd();a.l().setAttribute("aria-valuenow",b)}w.xd=function(){return this.Tc.xd()};w.wd=function(){return this.Tc.wd()};w.dg="horizontal"; -w.hh=function(){this.Pd();this.dispatchEvent("change")};w.Pd=function(){if(this.Ua){var a=this.xd(),b=this.wd(),a=(this.yd()-a)/(b-a),b=Math.round(100*a);"vertical"==this.dg?L&&7>ib?(this.Ua.style.top=0,this.Ua.style.height="100%",b=this.Ua.offsetHeight,a=Math.round(a*b),this.Ua.style.top=b-a+"px",this.Ua.style.height=a+"px"):(this.Ua.style.top=100-b+"%",this.Ua.style.height=b+"%"):this.Ua.style.width=b+"%"}};function Pf(a,b){a==r&&m(Error("No valid parent element."));b==r&&m(Error("Invalid initial value."));Lf.call(this);this.c="progressbar";this.ma=a;this.mf="";this.Xc=this.$a=r;this.Hb=[];var c;c=".progress-bar-horizontal {\n position: relative;\n border: 1px solid #949dad;\n";c+=" background: white;\n";c+=" padding: 1px;\n";c+=" overflow: hidden;\n";c+=" margin: 2px;\n";c+=" width: 100px;\n";c+=" height: 5px;\n";c+="}";var d;d=".progress-bar-thumb {\n position: relative;\n background: #F62217;\n"; -d+=" overflow: hidden;\n";d+=" width: 0%;\n";d+=" height: 100%;\n";d+="}";var e;e=".progress-bar-thumb-done {\n background: #57E964;\n}";this.Hb=[c,d,e];this.Md(b);this.ze()}F(Pf,Lf); -Pf.prototype.ze=function(){if("static"==this.ma.style.position||""==this.ma.style.position)this.mf=this.ma.style.position,this.ma.style.position="relative";var a=document.getElementsByTagName("head")[0],b=Ld("style");b.type="text/css";b.media="screen";var c=document.createTextNode(String(this.Hb[0])),d=document.createTextNode(String(this.Hb[1])),e=document.createTextNode(String(this.Hb[2]));a.appendChild(b);b.appendChild(c);b.appendChild(d);b.appendChild(e);this.$a=b;this.cc(this.ma);a=this.l();a.style.position= -"absolute";a.style.top=(this.ma.clientHeight-5)/2+"px";a.style.left=(this.ma.clientWidth-100)/2+"px";a.classList.add("xtk-progress-bar")};function Qf(a){var b=a.l().style.top,c=a.l().style.left;Nd(a.l());var d=new Pf(a.ma,100),e=d.l();e.style.position="absolute";e.style.top=b;e.style.left=c;e.classList.add("xtk-progress-bar");(e.firstElementChild!=n?e.firstElementChild:Od(e.firstChild)).classList.add("progress-bar-thumb-done");a.Xc=d} -Pf.prototype.Ad=function(){this.$a&&Nd(this.$a);this.l()&&Nd(this.l());this.Xc&&Nd(this.Xc.l());this.Xc=this.$a=r;this.ma.style.position=this.mf};function Rf(a,b,c){ma(a)?c&&(a=ua(a,c)):a&&"function"==typeof a.handleEvent?a=ua(a.handleEvent,a):m(Error("Invalid listener argument"));return 2147483647..) is required."));var b=a;la(b)&&(b=Jd(a));na(b)&&1==b.nodeType||m(Error("Could not find the given container."));this.q=b});w=Sf.prototype; -w.qc=function(){this.t.reset()}; -w.ea=function(a){var b=Ld("canvas");this.q.appendChild(b);this.M=this.q.clientWidth;this.G=this.q.clientHeight;b.width=this.M;b.height=this.G;try{var c=b.getContext(a);c||m(Error())}catch(d){var e="Sorry, "+a+' context is not supported on this machine! See http://crash.goXTK.com for requirements..';this.q.innerHTML='

Oooops..

'+e+"

"; -m(Error(e))}this.C=new of;O(this.C,dd,this.Rh.bind(this));this.ga=b;this.a=c;b=new ne(this.ga);"2d"==a&&(b=new pe(this.ga));b.ea();O(b,ad,this.qc.bind(this));O(b,ed,this.Je.bind(this));O(b,$c,this.Ke.bind(this));this.Kb=b;b=new Cf(this.M,this.G);"2d"==a&&(b=new Bf(this.M,this.G));b.observe(this.Kb);this.t=b;O(window,"resize",this.Sh,s,this)};w.add=function(a){(a instanceof yf||a instanceof wf||a instanceof uf)&&a.n();this.Ra.push(a);this.Va(a)}; -w.Va=function(a){(!this.ga||!this.a)&&m(Error("The renderer was not initialized properly."));a==r&&(window.console.log(a),m(Error("Illegal object.")));var b;b=oa(a);var c=Ob[b];if(c){var d=ga(cd),e=ga(n);d&&e?(c=Nb[cd],b=!!c&&!!c[n]&&b in c[n]):b=!d&&!e?q:Gb(c,function(a){return d&&a.type==cd||e&&a.capture==n})}else b=s;b||O(a,cd,this.Hh.bind(this))};w.get=function(a){a==r&&m(Error("Invalid object id."));for(var b=this.Ya.v,c=b.length,d=0,d=0;d=e.right))f&=-2;if(132==(f&132)&&(h.y=e.bottom))f&=-5;h.xe.right&&f&16)&&(g.width=Math.max(g.width-(h.x+g.width-e.right),0),d|=4);h.x+g.width>e.right&&f&1&&(h.x=Math.max(e.right-g.width, -e.left),d|=1);f&2&&(d|=(h.xe.right?32:0));h.y=e.top&&(h.y+g.height>e.bottom&&f&32)&&(g.height=Math.max(g.height-(h.y+g.height-e.bottom),0),d|=8);h.y+g.height>e.bottom&&f&4&&(h.y=Math.max(e.bottom-g.height,e.top),d|=2);f&8&&(d|=(h.ye.bottom?128:0));h=d}else h=256;if(h&496)return h}f=a;e=bb&&(Ta||gb)&&pb("1.9");f instanceof -yd?(a=f.x,f=f.y):(a=f,f=n);b.style.left=$d(a,e);b.style.top=$d(f,e);if(!(c==g||(!c||!g?0:c.width==g.width&&c.height==g.height)))a=Qd(Gd(Id(b))),L&&(!a||!pb("8"))?(c=b.style,a?(L?(a=ee(b,"paddingLeft"),e=ee(b,"paddingRight"),f=ee(b,"paddingTop"),d=ee(b,"paddingBottom"),a=new Ad(f,e,d,a)):(a=Sd(b,"paddingLeft"),e=Sd(b,"paddingRight"),f=Sd(b,"paddingTop"),d=Sd(b,"paddingBottom"),a=new Ad(parseFloat(f),parseFloat(e),parseFloat(d),parseFloat(a))),L?(e=ge(b,"borderLeft"),f=ge(b,"borderRight"),d=ge(b,"borderTop"), -b=ge(b,"borderBottom"),b=new Ad(d,f,b,e)):(e=Sd(b,"borderLeftWidth"),f=Sd(b,"borderRightWidth"),d=Sd(b,"borderTopWidth"),b=Sd(b,"borderBottomWidth"),b=new Ad(parseFloat(d),parseFloat(f),parseFloat(b),parseFloat(e))),c.pixelWidth=g.width-b.left-a.left-a.right-b.right,c.pixelHeight=g.height-b.top-a.top-a.bottom-b.bottom):(c.pixelWidth=g.width,c.pixelHeight=g.height)):(b=b.style,bb?b.MozBoxSizing="border-box":db?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(g.width,0)+"px", -b.height=Math.max(g.height,0)+"px");return h};function Zf(){}Zf.prototype.Oa=aa();function $f(a,b,c){this.element=a;this.zf=b;this.fi=c}F($f,Zf);$f.prototype.Oa=function(a,b,c){Xf(this.element,this.zf,a,b,n,c,this.fi)};function ag(a,b){sb.call(this);this.cb=new Df(this);this.Oe(a||r);b&&(this.rc=b)}F(ag,bc);w=ag.prototype;w.r=r;w.Gg=q;w.tf=r;w.oa=s;w.yi=s;w.Be=-1;w.Rf=-1;w.mh=s;w.Vg=q;w.rc="toggle_display";w.l=u("r");w.Oe=function(a){this.oa&&m(Error("Can not change this state of the popup while showing."));this.r=a}; -function bg(a,b){a.Od&&a.Od.stop();a.zd&&a.zd.stop();if(b){if(!a.oa&&a.He()){a.r||m(Error("Caller must call setElement before trying to show the popup"));a.Oa();var c=Id(a.r);a.mh&&Ff(a.cb,c,"keydown",a.Fh,q);if(a.Gg)if(Ff(a.cb,c,"mousedown",a.Zf,q),L){var d;try{d=c.activeElement}catch(e){}for(;d&&"IFRAME"==d.nodeName;){try{var f=d.contentDocument||d.contentWindow.document}catch(g){break}c=f;d=c.activeElement}Ff(a.cb,c,"mousedown",a.Zf,q);Ff(a.cb,c,"deactivate",a.Yf)}else Ff(a.cb,c,"blur",a.Yf);"toggle_display"== -a.rc?(a.r.style.visibility="visible",ce(a.r,q)):"move_offscreen"==a.rc&&a.Oa();a.oa=q;a.Od?(Sb(a.Od,"end",a.bg,s,a),a.Od.play()):a.bg()}}else cg(a)}w.Oa=ea;function cg(a,b){if(!a.oa||!a.dispatchEvent({type:"beforehide",target:b}))return s;a.cb&&a.cb.Ne();a.oa=s;a.Rf=wa();a.zd?(Sb(a.zd,"end",va(a.yf,b),s,a),a.zd.play()):a.yf(b);return q}w.yf=function(a){"toggle_display"==this.rc?this.yi?Rf(this.Jf,0,this):this.Jf():"move_offscreen"==this.rc&&(this.r.style.top="-10000px");this.Ie(a)}; -w.Jf=function(){this.r.style.visibility="hidden";ce(this.r,s)};w.He=function(){return this.dispatchEvent("beforeshow")};w.bg=function(){this.Be=wa();this.Rf=-1;this.dispatchEvent("show")};w.Ie=function(a){this.dispatchEvent({type:"hide",target:a})};w.Zf=function(a){a=a.target;!Pd(this.r,a)&&((!this.tf||Pd(this.tf,a))&&!(150>wa()-this.Be))&&cg(this,a)};w.Fh=function(a){27==a.keyCode&&cg(this,a.target)&&(a.preventDefault(),a.stopPropagation())}; -w.Yf=function(a){if(this.Vg){var b=Id(this.r);if(L||ab){if(a=b.activeElement,!a||Pd(this.r,a)||"BODY"==a.tagName)return}else if(a.target!=b)return;150>wa()-this.Be||cg(this)}};function dg(a,b){this.ue=a instanceof yd?a:new yd(a,b)}F(dg,Zf);dg.prototype.Oa=function(a,b,c,d){Xf(Ud(a),0,a,b,this.ue,c,r,d)};function eg(a,b){this.ii=4;this.Fd=b||n;ag.call(this,a)}F(eg,ag);eg.prototype.Oa=function(){if(this.Fd){var a=!this.oa&&"move_offscreen"!=this.rc,b=this.l();a&&(b.style.visibility="hidden",ce(b,q));this.Fd.Oa(b,this.ii,this.Oj);a&&ce(b,s)}};function fg(a){this.J=new rc;a&&this.me(a)}function gg(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+oa(a):b.substr(0,1)+a}w=fg.prototype;w.ud=function(){return this.J.ud()};w.add=function(a){this.J.set(gg(a),a)};w.me=function(a){a=qc(a);for(var b=a.length,c=0;cthis.yc)this.yc=j.x;if(this.Cc===r||g.ythis.zc)this.zc=j.y;if(this.Dc===r||g.bthis.Ac)this.Ac=j.b;this.k=[(this.Bc+this.yc)/2,(this.Cc+this.zc)/2,(this.Dc+this.Ac)/2];l.g=s}b&&d.g&&(l=this.Jc.get(c),l!=r&&this.a.isBuffer(l.ha)&&this.a.deleteBuffer(l.ha)); -l=r;!b||d.g?(l=this.a.createBuffer(),d.fb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,l),this.a.bufferData(this.a.ARRAY_BUFFER,d.L,this.a.STATIC_DRAW),l=new Wf(l,d.count,3),d.g=s):l=this.Jc.get(c);pf(this.C,0.3);b&&e.g&&(g=this.Jc.get(c),g!=r&&this.a.isBuffer(g.ha)&&this.a.deleteBuffer(g.ha));g=r;!b||e.g?(g=this.a.createBuffer(),e.fb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,g),this.a.bufferData(this.a.ARRAY_BUFFER,e.L,this.a.STATIC_DRAW),g=new Wf(g,e.count,3),e.g=s):g=this.be.get(c);pf(this.C,0.3);b&& -(f&&f.g)&&(e=this.Wc.get(c),e!=r&&this.a.isBuffer(e.ha)&&this.a.deleteBuffer(e.ha));e=r;f&&(!b||f.g?(f.length!=d.length&&m(Error("Mismatch between points and point colors.")),e=this.a.createBuffer(),f.fb(),this.a.bindBuffer(this.a.ARRAY_BUFFER,e),this.a.bufferData(this.a.ARRAY_BUFFER,f.L,this.a.STATIC_DRAW),e=new Wf(e,f.count,3),f.g=s):e=this.Wc.get(c));pf(this.C,0.2);b&&(p&&p.g)&&(f=this.fd.get(c),f!=r&&this.a.isBuffer(f.ha)&&this.a.deleteBuffer(f.ha));f=r;p&&(f=p.sc,!b||p.g?(f.length!=d.length&& -m(Error("Mismatch between points and scalars.")),d=this.a.createBuffer(),this.a.bindBuffer(this.a.ARRAY_BUFFER,d),this.a.bufferData(this.a.ARRAY_BUFFER,f,this.a.STATIC_DRAW),f=new Wf(d,f.length,3),p.g=s):f=this.fd.get(c));pf(this.C,0.1);b||this.Ya.add(a);this.Jc.set(c,l);this.be.set(c,g);this.Wc.set(c,e);this.gd.set(c,h);this.fd.set(c,f);this.bd=a.g=s}}else a.g=s}}; -function wg(a,b){var c=b.i.Vc,c=H.d.Na(b.Wb.ia,c[0],c[1],c[2]),c=H.d.Na(a.t.p,c.x,c.y,c.b),c=H.f.Ab(a.t.ua,c);return Math.round(1E3*c)/1E3}w.gg=function(a,b){if(this.F.PICKING_ENABLED){this.Eb(q,s);var c=new Uint8Array(4);this.a.readPixels(a,this.G-b,1,1,this.a.RGBA,this.a.UNSIGNED_BYTE,c);return c[0]+255*c[1]+65025*c[2]}return-1}; -w.Eb=function(a,b){vg.s.Eb.call(this,a,b);var c=this.Ya.v,d=c.length;if(0!=d){a?this.a.bindFramebuffer(this.a.FRAMEBUFFER,this.of):this.a.bindFramebuffer(this.a.FRAMEBUFFER,r);this.a.viewport(0,0,this.M,this.G);this.a.clear(this.a.COLOR_BUFFER_BIT|this.a.DEPTH_BUFFER_BIT);var e=this.t.nf,f=this.t.p;this.a.uniformMatrix4fv(this.Gc.get("perspective"),s,e);this.a.uniformMatrix4fv(this.Gc.get("view"),s,f);e=this.k;this.a.uniform3f(this.Gc.get("center"),parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])); -f=this.Ra.length;for(e=0;e=N&&ka<=J&&(T=new S(e.sb[0],e.sb[1],e.sb[2]),T=(new S(e.qb[0],e.qb[1],e.qb[2])).scale(M).add(T.scale(255-M)),T=[Math.floor(T.x),Math.floor(T.y),Math.floor(T.b),255],j&&(ia=[p[V],p[V+1],p[V+2],p[V+3]]));M=G-1-V;x[M-3]=T[0];x[M-2]=T[1];x[M-1]=T[2];x[M]=T[3];B[M-3]=ia[0];B[M-2]=ia[1];B[M-1]=ia[2];B[M]=ia[3];V+=4}while(V