ivmartel/dwv

View on GitHub

Showing 218 of 386 total issues

Function TransformClosure has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var Transform = (function TransformClosure() {
    function Transform() {}

    Transform.prototype.calculate =
      function transformCalculate(subbands, u0, v0) {
Severity: Major
Found in decoders/pdfjs/jpx.js - About 3 hrs to fix

    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 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 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 getScoordFromShape has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function getScoordFromShape(shape) {
            const scoord = new SpatialCoordinate();
          
            if (shape instanceof Point2D) {
              scoord.graphicData = [
          Severity: Major
          Found in src/dicom/dicomSpatialCoordinate.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 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 getSegmentFrameInfo has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function getSegmentFrameInfo(dataElements) {
                            // Derivation Image Sequence
                            const derivationImages = [];
                            if (typeof dataElements[TagKeys.DerivationImageSequence] !== 'undefined') {
                              const derivationImageSq =
                          Severity: Major
                          Found in src/dicom/dicomSegmentFrameInfo.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 getShapeFromScoord has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function getShapeFromScoord(scoord) {
                                // extract points
                                const dataLength = scoord.graphicData.length;
                                if (dataLength % 2 !== 0) {
                                  throw new Error('Expecting even number of coordinates in scroord data');
                              Severity: Major
                              Found in src/dicom/dicomSpatialCoordinate.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 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

                                      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 getn has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        jpeg.lossless.Decoder.prototype.getn = function (PRED, n, temp, index) {
                                            /*jslint bitwise: true */
                                        
                                            var result, one, n_one, mask, input;
                                            one = 1;
                                        Severity: Major
                                        Found in decoders/rii-mango/lossless.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language