ivmartel/dwv

View on GitHub

Showing 209 of 401 total issues

Function getSliceIterator has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function getSliceIterator(
  image, position, isRescaled, viewOrientation) {
  const size = image.getGeometry().getSize();
  // zero-ify non direction index
  let dirMax2Index = 2;
Severity: Major
Found in src/image/iterator.js - About 3 hrs to fix

    Function update has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      update(anchor, style, _viewController) {
        // parent group
        const group = anchor.getParent();
        // associated shape
        const kline = group.getChildren(function (node) {
    Severity: Major
    Found in src/tools/protractor.js - About 3 hrs to fix

      Function 7 has 88 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"./component-spec.js":1,"./data-stream.js":2,"./decoder.js":3,"./frame-header.js":4,"./huffman-table.js":5,"./quantization-table.js":7,"./scan-component.js":8,"./scan-header.js":9,"./utils.js":10}],7:[function(require,module,exports){
      /*
       * Copyright (C) 2015 Michael Martinez
       * Changes: Added support for selection values 2-7, fixed minor bugs &
       * warnings, split into multiple class files, and general clean up.
      Severity: Major
      Found in decoders/rii-mango/lossless.js - About 3 hrs to fix

        Function create has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          create(points, style, viewController) {
            // physical shape
            const line = new Line(points[0], points[1]);
            // draw shape
            const kshape = new Konva.Line({
        Severity: Major
        Found in src/tools/ruler.js - About 3 hrs to fix

          Function copyCoefficients has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function copyCoefficients(coefficients, levelWidth, levelHeight, subband,
                                      delta, mb, reversible, segmentationSymbolUsed) {
              var x0 = subband.tbx0;
              var y0 = subband.tby0;
              var width = subband.tbx1 - subband.tbx0;
          Severity: Major
          Found in decoders/pdfjs/jpx.js - About 3 hrs to fix

            Function create has 84 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              create(points, style, viewController) {
                // physical shape
                const line = new Line(points[0], points[1]);
                // draw shape
                const kshape = new Konva.Line({
            Severity: Major
            Found in src/tools/arrow.js - About 3 hrs to fix

              Function update has 82 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                update(anchor, style, viewController) {
                  // parent group
                  const group = anchor.getParent();
                  // associated shape
                  const kline = group.getChildren(function (node) {
              Severity: Major
              Found in src/tools/ruler.js - About 3 hrs to fix

                Function BitModel_runCleanupPass has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      runCleanupPass: function BitModel_runCleanupPass() {
                        var decoder = this.decoder;
                        var width = this.width, height = this.height;
                        var neighborsSignificance = this.neighborsSignificance;
                        var coefficentsMagnitude = this.coefficentsMagnitude;
                Severity: Major
                Found in decoders/pdfjs/jpx.js - About 3 hrs to fix

                  Function update has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    update(anchor, style, _viewController) {
                      // parent group
                      const group = anchor.getParent();
                      // associated shape
                      const kline = group.getChildren(function (node) {
                  Severity: Major
                  Found in src/tools/arrow.js - About 3 hrs to fix

                    Function decode has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    dwvdecoder.RleDecoder.prototype.decode = function (buffer,
                      bitsAllocated, isSigned, sliceSize, samplesPerPixel, planarConfiguration) {
                    
                      // bytes per element
                      var bpe = bitsAllocated / 8;
                    Severity: Major
                    Found in decoders/dwv/rle.js - About 3 hrs to fix

                      Function IrreversibleTransformClosure has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var IrreversibleTransform = (function IrreversibleTransformClosure() {
                          function IrreversibleTransform() {
                            Transform.call(this);
                          }
                      
                      
                      Severity: Major
                      Found in decoders/pdfjs/jpx.js - About 3 hrs to fix

                        Function JpxImage_parse has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            parse: function JpxImage_parse(data) {
                        
                              var head = readUint16(data, 0);
                              // No box header, immediate start of codestream (SOC)
                              if (head === 0xFF4F) {
                        Severity: Major
                        Found in decoders/pdfjs/jpx.js - About 2 hrs to fix

                          Function PageViewportClosure has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var PageViewport = PDFJS.PageViewport = (function PageViewportClosure() {
                            /**
                             * @constructor
                             * @private
                             * @param viewBox {Array} xMin, yMin, xMax and yMax coordinates.
                          Severity: Major
                          Found in decoders/pdfjs/util.js - About 2 hrs to fix

                            Function Transform_iterate has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh,
                                                                                         u0, v0) {
                                  var llWidth = ll.width, llHeight = ll.height, llItems = ll.items;
                                  var width = hl_lh_hh.width;
                                  var height = hl_lh_hh.height;
                            Severity: Major
                            Found in decoders/pdfjs/jpx.js - About 2 hrs to fix

                              Function InclusionTreeClosure has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var InclusionTree = (function InclusionTreeClosure() {
                                  function InclusionTree(width, height,  defaultValue) {
                                    var levelsLength = log2(Math.max(width, height)) + 1;
                                    this.levels = [];
                                    for (var i = 0; i < levelsLength; i++) {
                              Severity: Major
                              Found in decoders/pdfjs/jpx.js - About 2 hrs to fix

                                Function buildCodeblocks has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function buildCodeblocks(context, subband, dimensions) {
                                    // Section B.7 Division sub-band into code-blocks
                                    var xcb_ = dimensions.xcb_;
                                    var ycb_ = dimensions.ycb_;
                                    var codeblockWidth = 1 << xcb_;
                                Severity: Major
                                Found in decoders/pdfjs/jpx.js - About 2 hrs to fix

                                  Function getElementValueAsString has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function getElementValueAsString(tag, dicomElement, pretty) {
                                    let str = '';
                                    const strLenLimit = 65;
                                  
                                    // dafault to pretty output
                                  Severity: Major
                                  Found in src/dicom/dicomElementsWrapper.js - About 2 hrs to fix

                                    Function irreversibleTransformFilter has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          function irreversibleTransformFilter(x, offset, length) {
                                          var len = length >> 1;
                                          offset = offset | 0;
                                          var j, n, current, next;
                                    
                                    
                                    Severity: Major
                                    Found in decoders/pdfjs/jpx.js - About 2 hrs to fix

                                      Function getViewFromDOMVideo has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function getViewFromDOMVideo(
                                        video, onloaditem, onload, onprogress, onloadend,
                                        origin, dataIndex) {
                                        // video size
                                        const width = video.videoWidth;
                                      Severity: Major
                                      Found in src/image/domReader.js - About 2 hrs to fix

                                        Function parseMultipart has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function parseMultipart(arr) {
                                          const u8Array = new Uint8Array(arr);
                                        
                                          const parts = [];
                                          // check input
                                        Severity: Major
                                        Found in src/utils/array.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language