diff --git a/core/dicomUtils.js b/core/dicomUtils.js index e5b0dd694..09a599896 100644 --- a/core/dicomUtils.js +++ b/core/dicomUtils.js @@ -161,6 +161,8 @@ X.dicomUtils.initColorTableFromLUT = function (img, colorTable, lut) { offset = Math.pow(2, img.pixelPaddingValue != null ? img.bits : (rs == 1.0 && ri == 0.0 && img.pixelPaddingValue == null) ? img.bits : img.bitsStored) / 2; } + var r, g, b; + // console.time('CALCULATE PIXELS'); switch (img.photometricInterpretation) { case X.dicomUtils.PhotometricInterpretation.MONOCHROME1: diff --git a/io/parser.js b/io/parser.js index 27b42b97d..906a598b5 100644 --- a/io/parser.js +++ b/io/parser.js @@ -902,19 +902,20 @@ X.parser.reslice2 = function(_sliceOrigin, _sliceXYSpacing, _sliceNormal, _color // map to 0 if necessary var pixval = _IJKVolume[_k][_j][_i]; + var pixelValue_r, pixelValue_g, pixelValue_b, pixelValue_a; if (colorTable) { // color table! var lookupValue = colorTable.get(pixval); // check for out of range and use the last label value in this case - var pixelValue_r = pixelValue_g = pixelValue_b = lookupValue[1] || 0; - var pixelValue_a = lookupValue[4]; + pixelValue_r = pixelValue_g = pixelValue_b = lookupValue[1] || 0; + pixelValue_a = lookupValue[4]; } else { // normalization should not happen here, only in the shaders/canvas?? - var pixelValue_r = pixelValue_g = pixelValue_b = 255 * ((pixval - object._min )/ (object._max - object._min)); - var pixelValue_a = 255; + pixelValue_r = pixelValue_g = pixelValue_b = 255 * ((pixval - object._min )/ (object._max - object._min)); + pixelValue_a = 255; } textureForCurrentSlice[textureStartIndex] = pixelValue_r; diff --git a/utils/_core/_builder.py b/utils/_core/_builder.py index af364fd7b..abc232e4a 100644 --- a/utils/_core/_builder.py +++ b/utils/_core/_builder.py @@ -44,7 +44,7 @@ def run( self, options=None ): arguments.extend( ['--root', config.SOFTWARE_PATH] ) # set the output mode to compiled - arguments.extend( ['-o', 'script'] ) + arguments.extend( ['-o', 'compiled'] ) # configure the compiler path arguments.extend( ['-c', config.CLOSURECOMPILER_PATH] )