Showing 271 of 665 total issues

Function helpersLut has 731 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const helpersLut = (three = window.THREE) => {
  if (three === undefined || three.Object3D === undefined) {
    return null;
  }
  const Constructor = three.Object3D;
Severity: Major
Found in src/helpers/helpers.lut.js - About 3 days to fix

    File presets.segmentation.freesurfer.js has 1383 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const segmentationFs = {
      0: { color: [0, 0, 0], opacity: 0, label: 'Unknown' },
      1: { color: [70, 130, 180], opacity: 1, label: 'Left-Cerebral-Exterior' },
      2: { color: [245, 245, 245], opacity: 1, label: 'Left-Cerebral-White-Matter' },
      3: { color: [205, 62, 78], opacity: 1, label: 'Left-Cerebral-Cortex' },
    Severity: Major
    Found in src/presets/presets.segmentation.freesurfer.js - About 3 days to fix

      Function camerasOrthographic has a Cognitive Complexity of 159 (exceeds 5 allowed). Consider refactoring.
      Open

      const camerasOrthographic = (three = window.THREE) => {
        if (three === undefined || three.OrthographicCamera === undefined) {
          return null;
        }
      
      
      Severity: Minor
      Found in src/cameras/cameras.orthographic.js - About 3 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function camerasOrthographic has 507 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const camerasOrthographic = (three = window.THREE) => {
        if (three === undefined || three.OrthographicCamera === undefined) {
          return null;
        }
      
      
      Severity: Major
      Found in src/cameras/cameras.orthographic.js - About 2 days to fix

        Function widgetsVelocityTimeIntegral has 497 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const widgetsVelocityTimeIntegral = (three = window.THREE) => {
          if (three === undefined || three.Object3D === undefined) {
            return null;
          }
        
        
        Severity: Major
        Found in src/widgets/widgets.velocityTimeIntegral.js - About 2 days to fix

          Function widgetsCrossRuler has 477 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const widgetsCrossRuler = (three = window.THREE) => {
            if (three === undefined || three.Object3D === undefined) {
              return null;
            }
          
          
          Severity: Major
          Found in src/widgets/widgets.crossRuler.js - About 2 days to fix

            Function widgetsPolygon has 446 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const widgetsPolygon = (three = window.THREE) => {
              if (three === undefined || three.Object3D === undefined) {
                return null;
              }
            
            
            Severity: Major
            Found in src/widgets/widgets.polygon.js - About 2 days to fix

              Function widgetsFreehand has 445 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const widgetsFreehand = (three = window.THREE) => {
                if (three === undefined || three.Object3D === undefined) {
                  return null;
                }
              
              
              Severity: Major
              Found in src/widgets/widgets.freehand.js - About 2 days to fix

                File parsers.dicom.js has 865 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /** * Imports ***/
                import UtilsCore from '../core/core.utils';
                import ParsersVolume from './parsers.volume';
                
                import * as OpenJPEG from 'OpenJPEG.js/dist/openJPEG-DynamicMemory-browser.js';
                Severity: Major
                Found in src/parsers/parsers.dicom.js - About 2 days to fix

                  Function helpersSlice has 417 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const helpersSlice = (three = window.THREE) => {
                    if (three === undefined || three.Object3D === undefined) {
                      return null;
                    }
                  
                  
                  Severity: Major
                  Found in src/helpers/helpers.slice.js - About 2 days to fix

                    ModelsStack has 100 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    export default class ModelsStack extends ModelsBase {
                      /**
                       * Models Stack constructor
                       */
                      constructor() {
                    Severity: Major
                    Found in src/models/models.stack.js - About 1 day to fix

                      Function widgetsFreehand has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
                      Open

                      const widgetsFreehand = (three = window.THREE) => {
                        if (three === undefined || three.Object3D === undefined) {
                          return null;
                        }
                      
                      
                      Severity: Minor
                      Found in src/widgets/widgets.freehand.js - About 1 day to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function widgetsEllipse has 370 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const widgetsEllipse = (three = window.THREE) => {
                        if (three === undefined || three.Object3D === undefined) {
                          return null;
                        }
                      
                      
                      Severity: Major
                      Found in src/widgets/widgets.ellipse.js - About 1 day to fix

                        File models.stack.js has 779 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /** * Imports ***/
                        import { Matrix4 } from 'three/src/math/Matrix4';
                        import { Vector3 } from 'three/src/math/Vector3';
                        import { RGBFormat, RGBAFormat } from 'three/src/constants';
                        
                        
                        Severity: Major
                        Found in src/models/models.stack.js - About 1 day to fix

                          Function widgetsCrossRuler has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
                          Open

                          const widgetsCrossRuler = (three = window.THREE) => {
                            if (three === undefined || three.Object3D === undefined) {
                              return null;
                            }
                          
                          
                          Severity: Minor
                          Found in src/widgets/widgets.crossRuler.js - About 1 day to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function widgetsPolygon has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
                          Open

                          const widgetsPolygon = (three = window.THREE) => {
                            if (three === undefined || three.Object3D === undefined) {
                              return null;
                            }
                          
                          
                          Severity: Minor
                          Found in src/widgets/widgets.polygon.js - About 1 day to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function widgetsBiruler has 347 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const widgetsBiruler = (three = window.THREE) => {
                            if (three === undefined || three.Object3D === undefined) {
                              return null;
                            }
                          
                          
                          Severity: Major
                          Found in src/widgets/widgets.biruler.js - About 1 day to fix

                            File helpers.lut.js has 736 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import CoreUtils from '../core/core.utils';
                            
                            /**
                             * @module helpers/lut
                             */
                            Severity: Major
                            Found in src/helpers/helpers.lut.js - About 1 day to fix

                              Function widgetsRectangle has 336 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const widgetsRectangle = (three = window.THREE) => {
                                if (three === undefined || three.Object3D === undefined) {
                                  return null;
                                }
                              
                              
                              Severity: Major
                              Found in src/widgets/widgets.rectangle.js - About 1 day to fix

                                Function widgetsPressureHalfTime has 335 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const widgetsPressureHalfTime = (three = window.THREE) => {
                                  if (three === undefined || three.Object3D === undefined) {
                                    return null;
                                  }
                                
                                
                                Severity: Major
                                Found in src/widgets/widgets.pressureHalfTime.js - About 1 day to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language