Showing 665 of 665 total issues

Function constructor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    constructor(targetMesh, controls, params = {}) {
      super(targetMesh, controls, params);

      this._widgetType = 'Handle';

Severity: Minor
Found in src/widgets/widgets.handle.js - About 1 hr to fix

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        if (!Validators.vector3(plane.position)) {
          window.console.log('Invalid plane.position.');
          window.console.log(plane.position);
    
          return false;
    Severity: Major
    Found in src/core/core.intersections.js and 3 other locations - About 1 hr to fix
    src/core/core.intersections.js on lines 451..456
    src/core/core.intersections.js on lines 469..474
    src/core/core.intersections.js on lines 476..481

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        if (!Validators.vector3(plane.direction)) {
          window.console.log('Invalid plane.direction.');
          window.console.log(plane.direction);
    
          return false;
    Severity: Major
    Found in src/core/core.intersections.js and 3 other locations - About 1 hr to fix
    src/core/core.intersections.js on lines 444..449
    src/core/core.intersections.js on lines 469..474
    src/core/core.intersections.js on lines 476..481

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        if (!Validators.matrix4(aabb.toAABB)) {
          window.console.log('Invalid aabb.toAABB: ');
          window.console.log(aabb.toAABB);
    
          return false;
    Severity: Major
    Found in src/core/core.intersections.js and 3 other locations - About 1 hr to fix
    src/core/core.intersections.js on lines 444..449
    src/core/core.intersections.js on lines 451..456
    src/core/core.intersections.js on lines 476..481

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        if (!Validators.vector3(aabb.center)) {
          window.console.log('Invalid aabb.center.');
          window.console.log(aabb.center);
    
          return false;
    Severity: Major
    Found in src/core/core.intersections.js and 3 other locations - About 1 hr to fix
    src/core/core.intersections.js on lines 444..449
    src/core/core.intersections.js on lines 451..456
    src/core/core.intersections.js on lines 469..474

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 58.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function load has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      load() {
        if (this.file) {
          // instantiate the loader
          // it loads and parses the dicom image
          const loader = new LoadersVolume(this._progressbarContainer);
    Severity: Minor
    Found in src/helpers/x/helpers.x.volume.js - About 1 hr to fix

      Function validateAabb has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        static validateAabb(aabb) {
          //
          if (aabb === null) {
            window.console.log('Invalid aabb.');
            window.console.log(aabb);
      Severity: Minor
      Found in src/core/core.intersections.js - About 1 hr to fix

        Function _parser has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          _parser(extension) {
            let Parser = null;
        
            switch (extension.toUpperCase()) {
              case 'NII':
        Severity: Minor
        Found in src/loaders/loaders.volume.js - About 1 hr to fix

          Function free has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              free() {
                this.removeEventListeners();
          
                this._handles.forEach(h => {
                  this.remove(h);
          Severity: Minor
          Found in src/widgets/widgets.ellipse.js - About 1 hr to fix

            Function updateValues has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                updateValues() {
                  const usPosition0 = this.getUsPoint(
                    this._regions,
                    CoreUtils.worldToData(this._params.lps2IJK, this._handles[0].worldPosition)
                  );
            Severity: Minor
            Found in src/widgets/widgets.pressureHalfTime.js - About 1 hr to fix

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.ruler.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.rectangle.js on lines 421..425

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.ellipse.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.rectangle.js on lines 421..425
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.biruler.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.rectangle.js on lines 421..425
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.crossRuler.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.rectangle.js on lines 421..425
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.annotation.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.rectangle.js on lines 421..425
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.rectangle.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.pressureHalfTime.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.angle.js on lines 391..395
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.rectangle.js on lines 421..425
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 8 locations. Consider refactoring.
              Open

                  set targetMesh(targetMesh) {
                    this._targetMesh = targetMesh;
                    this._handles.forEach(elem => (elem.targetMesh = targetMesh));
                    this.update();
                  }
              Severity: Major
              Found in src/widgets/widgets.angle.js and 7 other locations - About 1 hr to fix
              src/widgets/widgets.annotation.js on lines 408..412
              src/widgets/widgets.biruler.js on lines 419..423
              src/widgets/widgets.crossRuler.js on lines 603..607
              src/widgets/widgets.ellipse.js on lines 458..462
              src/widgets/widgets.pressureHalfTime.js on lines 430..434
              src/widgets/widgets.rectangle.js on lines 421..425
              src/widgets/widgets.ruler.js on lines 343..347

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  _prepareBorder() {
                    const HelpersBorderContructor = helpersBorder(three);
                    this._border = new HelpersBorderContructor(this._slice);
                    this.add(this._border);
                  }
              Severity: Major
              Found in src/helpers/helpers.stack.js and 1 other location - About 1 hr to fix
              src/helpers/helpers.stack.js on lines 342..346

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                    this._dt =
                      dtKoeff === 1
                        ? Number.POSITIVE_INFINITY
                        : Math.abs(vMaxTime - (time0 - dtKoeff * time1) / (1 - dtKoeff)) * 1000;
              Severity: Major
              Found in src/widgets/widgets.pressureHalfTime.js and 1 other location - About 1 hr to fix
              src/widgets/widgets.pressureHalfTime.js on lines 313..316

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 57.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language