Showing 665 of 665 total issues

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

/** * Imports ***/
import ParsersVolume from './parsers.volume';

import { Vector3 } from 'three/src/math/Vector3';

Severity: Minor
Found in src/parsers/parsers.mgh.js - About 3 hrs to fix

    Function parse has 94 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      parse(response) {
        // emit 'parse-start' event
        this.emit('parse-start', {
          file: response.url,
          time: new Date(),
    Severity: Major
    Found in src/loaders/loaders.volume.js - About 3 hrs to fix

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

            if (distanceData.units && distanceData2.units && distanceData.units === distanceData2.units) {
              this._units = distanceData.units;
            } else {
              if (!distanceData.units) {
                distanceData.units = this._units;
      Severity: Major
      Found in src/widgets/widgets.biruler.js and 1 other location - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 332..341

      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 110.

      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

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

            if (distanceData.units && distanceData2.units && distanceData.units === distanceData2.units) {
              this._units = distanceData.units;
            } else {
              if (!distanceData.units) {
                distanceData.units = this._units;
      Severity: Major
      Found in src/widgets/widgets.crossRuler.js and 1 other location - About 3 hrs to fix
      src/widgets/widgets.biruler.js on lines 298..307

      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 110.

      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

        get texture() {
          let texture = new THREE.Texture(this._canvas);
          texture.mapping = THREE.UVMapping;
          texture.wrapS = texture.wrapT = THREE.ClampToEdgeWrapping;
          texture.magFilter = texture.minFilter = THREE.NearestFilter;
      Severity: Major
      Found in src/helpers/helpers.segmentationlut.js and 1 other location - About 3 hrs to fix
      src/helpers/helpers.lut.js on lines 134..142

      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 109.

      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

          get texture() {
            let texture = new three.Texture(this._canvas);
            texture.mapping = three.UVMapping;
            texture.wrapS = texture.wrapT = three.ClampToEdgeWrapping;
            texture.magFilter = texture.minFilter = three.NearestFilter;
      Severity: Major
      Found in src/helpers/helpers.lut.js and 1 other location - About 3 hrs to fix
      src/helpers/helpers.segmentationlut.js on lines 79..88

      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 109.

      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 10 locations. Consider refactoring.
      Open

          removeEventListeners() {
            this._container.removeEventListener('wheel', this.onMove);
      
            this._line.removeEventListener('mouseenter', this.onHover);
            this._line.removeEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.peakVelocity.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          addEventListeners() {
            this._container.addEventListener('wheel', this.onMove);
      
            this._line.addEventListener('mouseenter', this.onHover);
            this._line.addEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.ruler.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          addEventListeners() {
            this._container.addEventListener('wheel', this.onMove);
      
            this._line.addEventListener('mouseenter', this.onHover);
            this._line.addEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.pressureHalfTime.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          addEventListeners() {
            this._container.addEventListener('wheel', this.onMove);
      
            this._rectangle.addEventListener('mouseenter', this.onHover);
            this._rectangle.addEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.rectangle.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          addEventListeners() {
            this._container.addEventListener('wheel', this.onMove);
      
            this._line.addEventListener('mouseenter', this.onHover);
            this._line.addEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.peakVelocity.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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

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

            if (uncompressedData instanceof Int8Array) {
              rgbData = new Int8Array(uncompressedData.length);
            } else if (uncompressedData instanceof Uint8Array) {
              rgbData = new Uint8Array(uncompressedData.length);
            } else if (uncompressedData instanceof Int16Array) {
      Severity: Major
      Found in src/parsers/parsers.dicom.js and 1 other location - About 3 hrs to fix
      src/parsers/parsers.dicom.js on lines 1196..1207

      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 108.

      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 10 locations. Consider refactoring.
      Open

          removeEventListeners() {
            this._container.removeEventListener('wheel', this.onMove);
      
            this._line.removeEventListener('mouseenter', this.onHover);
            this._line.removeEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.pressureHalfTime.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          addEventListeners() {
            this._line.addEventListener('mouseenter', this.onHover);
            this._line.addEventListener('mouseleave', this.onHover);
            this._line2.addEventListener('mouseenter', this.onHover);
            this._line2.addEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.crossRuler.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          removeEventListeners() {
            this._line.removeEventListener('mouseenter', this.onHover);
            this._line.removeEventListener('mouseleave', this.onHover);
            this._line2.removeEventListener('mouseenter', this.onHover);
            this._line2.removeEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.crossRuler.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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 10 locations. Consider refactoring.
      Open

          removeEventListeners() {
            this._container.removeEventListener('wheel', this.onMove);
      
            this._rectangle.removeEventListener('mouseenter', this.onHover);
            this._rectangle.removeEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.rectangle.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.ruler.js on lines 63..70
      src/widgets/widgets.ruler.js on lines 72..79

      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 108.

      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

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

            if (uncompressedData instanceof Int8Array) {
              rgbData = new Int8Array(uncompressedData.length);
            } else if (uncompressedData instanceof Uint8Array) {
              rgbData = new Uint8Array(uncompressedData.length);
            } else if (uncompressedData instanceof Int16Array) {
      Severity: Major
      Found in src/parsers/parsers.dicom.js and 1 other location - About 3 hrs to fix
      src/parsers/parsers.dicom.js on lines 1172..1183

      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 108.

      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 10 locations. Consider refactoring.
      Open

          removeEventListeners() {
            this._container.removeEventListener('wheel', this.onMove);
      
            this._line.removeEventListener('mouseenter', this.onHover);
            this._line.removeEventListener('mouseleave', this.onHover);
      Severity: Major
      Found in src/widgets/widgets.ruler.js and 9 other locations - About 3 hrs to fix
      src/widgets/widgets.crossRuler.js on lines 71..78
      src/widgets/widgets.crossRuler.js on lines 80..87
      src/widgets/widgets.peakVelocity.js on lines 65..72
      src/widgets/widgets.peakVelocity.js on lines 74..81
      src/widgets/widgets.pressureHalfTime.js on lines 78..85
      src/widgets/widgets.pressureHalfTime.js on lines 87..94
      src/widgets/widgets.rectangle.js on lines 68..75
      src/widgets/widgets.rectangle.js on lines 77..84
      src/widgets/widgets.ruler.js on lines 63..70

      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 108.

      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

      File widgets.annotation.js has 318 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { widgetsBase } from './widgets.base';
      import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
      
      /**
       * @module widgets/annotation
      Severity: Minor
      Found in src/widgets/widgets.annotation.js - About 3 hrs to fix

        Function computeDefinition has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          computeDefinition() {
            this._definition = `
        void trilinearInterpolation(
          in vec3 normalizedPosition,
          out vec4 interpolatedValue,
        Severity: Major
        Found in src/shaders/interpolation/shaders.interpolation.trilinear.js - About 3 hrs to fix
          Severity
          Category
          Status
          Source
          Language