Showing 665 of 665 total issues

Function uFloat32 has 107 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  uFloat32() {
    return `
void uFloat32(in float r, in float g, in float b, in float a, out float value){

  // create arrays containing bits for rgba values
Severity: Major
Found in src/shaders/helpers/shaders.helpers.unpack.js - About 4 hrs to fix

    Function _packTo8Bits has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
    Open

      _packTo8Bits(channels, frame, textureSize, startVoxel, stopVoxel) {
        const packed = {
          textureType: null,
          data: null,
        };
    Severity: Minor
    Found in src/models/models.stack.js - About 4 hrs 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 uniforms has 106 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static uniforms() {
        return {
          uTextureSize: {
            type: 'i',
            value: 0,
    Severity: Major
    Found in src/shaders/shaders.vr.secondpass.uniform.js - About 4 hrs to fix

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

      import { widgetsBase } from './widgets.base';
      import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
      import CoreUtils from '../core/core.utils';
      
      /**
      Severity: Minor
      Found in src/widgets/widgets.rectangle.js - About 4 hrs to fix

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

        import { widgetsBase } from './widgets.base';
        import { widgetsHandle as widgetsHandleFactory } from './widgets.handle';
        import CoreUtils from '../core/core.utils';
        
        /**
        Severity: Minor
        Found in src/widgets/widgets.pressureHalfTime.js - About 4 hrs to fix

          Function updateDOM has 105 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              updateDOM() {
                this.updateDOMColor();
          
                // update first line
                const lineData = this.getLineData(
          Severity: Major
          Found in src/widgets/widgets.biruler.js - About 4 hrs to fix

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

                  const labelPadding =
                    Math.tan(normAngle) < this._label.offsetHeight / this._label.offsetWidth
                      ? this._label.offsetWidth / 2 / Math.cos(normAngle) + 15 // 15px padding
                      : this._label.offsetHeight / 2 / Math.cos(Math.PI / 2 - normAngle) + 15;
            Severity: Major
            Found in src/widgets/widgets.angle.js and 4 other locations - About 4 hrs to fix
            src/widgets/widgets.biruler.js on lines 331..334
            src/widgets/widgets.biruler.js on lines 349..352
            src/widgets/widgets.pressureHalfTime.js on lines 366..369
            src/widgets/widgets.ruler.js on lines 283..286

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

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

                  const labelPadding =
                    Math.tan(angle) < this._label.offsetHeight / this._label.offsetWidth
                      ? this._label.offsetWidth / 2 / Math.cos(angle) + 15 // 5px for each handle + padding
                      : this._label.offsetHeight / 2 / Math.cos(Math.PI / 2 - angle) + 15;
            Severity: Major
            Found in src/widgets/widgets.pressureHalfTime.js and 4 other locations - About 4 hrs to fix
            src/widgets/widgets.angle.js on lines 334..337
            src/widgets/widgets.biruler.js on lines 331..334
            src/widgets/widgets.biruler.js on lines 349..352
            src/widgets/widgets.ruler.js on lines 283..286

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

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

                  const labelPadding =
                    Math.tan(angle) < this._label.offsetHeight / this._label.offsetWidth
                      ? this._label.offsetWidth / 2 / Math.cos(angle) + 15 // 5px for each handle + padding
                      : this._label.offsetHeight / 2 / Math.cos(Math.PI / 2 - angle) + 15;
            Severity: Major
            Found in src/widgets/widgets.biruler.js and 4 other locations - About 4 hrs to fix
            src/widgets/widgets.angle.js on lines 334..337
            src/widgets/widgets.biruler.js on lines 349..352
            src/widgets/widgets.pressureHalfTime.js on lines 366..369
            src/widgets/widgets.ruler.js on lines 283..286

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

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

                  const label2Padding =
                    Math.tan(angle2) < this._label2.offsetHeight / this._label2.offsetWidth
                      ? this._label2.offsetWidth / 2 / Math.cos(angle2) + 15 // 5px for each handle + padding
                      : this._label2.offsetHeight / 2 / Math.cos(Math.PI / 2 - angle2) + 15;
            Severity: Major
            Found in src/widgets/widgets.biruler.js and 4 other locations - About 4 hrs to fix
            src/widgets/widgets.angle.js on lines 334..337
            src/widgets/widgets.biruler.js on lines 331..334
            src/widgets/widgets.pressureHalfTime.js on lines 366..369
            src/widgets/widgets.ruler.js on lines 283..286

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

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

                  const labelPadding =
                    Math.tan(angle) < this._label.offsetHeight / this._label.offsetWidth
                      ? this._label.offsetWidth / 2 / Math.cos(angle) + 15 // 5px for each handle + padding
                      : this._label.offsetHeight / 2 / Math.cos(Math.PI / 2 - angle) + 15;
            Severity: Major
            Found in src/widgets/widgets.ruler.js and 4 other locations - About 4 hrs to fix
            src/widgets/widgets.angle.js on lines 334..337
            src/widgets/widgets.biruler.js on lines 331..334
            src/widgets/widgets.biruler.js on lines 349..352
            src/widgets/widgets.pressureHalfTime.js on lines 366..369

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

            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

              initCanvas() {
                // container
                this._canvasContainer = this.initCanvasContainer(this._dom);
                // background
                this._canvasBg = this.createCanvas();
            Severity: Major
            Found in src/helpers/helpers.segmentationlut.js and 1 other location - About 4 hrs to fix
            src/helpers/helpers.lut.js on lines 43..52

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

            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

                initCanvas() {
                  // container
                  this._canvasContainer = this.initCanvasContainer(this._dom);
                  // background
                  this._canvasBg = this.createCanvas();
            Severity: Major
            Found in src/helpers/helpers.lut.js and 1 other location - About 4 hrs to fix
            src/helpers/helpers.segmentationlut.js on lines 29..38

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

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

                onHover(evt) {
                  if (evt) {
                    this.hoverDom(evt);
                  }
            
            
            Severity: Major
            Found in src/widgets/widgets.rectangle.js and 3 other locations - About 3 hrs to fix
            src/widgets/widgets.ellipse.js on lines 91..100
            src/widgets/widgets.pressureHalfTime.js on lines 96..105
            src/widgets/widgets.ruler.js on lines 81..90

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

            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

                checkHandle(index, shift) {
                  const region = this.getRegionByXY(
                    this._regions,
                    CoreUtils.worldToData(
                      this._params.lps2IJK,
            Severity: Major
            Found in src/widgets/widgets.pressureHalfTime.js and 1 other location - About 3 hrs to fix
            src/widgets/widgets.velocityTimeIntegral.js on lines 241..255

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

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

                onHover(evt) {
                  if (evt) {
                    this.hoverDom(evt);
                  }
            
            
            Severity: Major
            Found in src/widgets/widgets.ruler.js and 3 other locations - About 3 hrs to fix
            src/widgets/widgets.ellipse.js on lines 91..100
            src/widgets/widgets.pressureHalfTime.js on lines 96..105
            src/widgets/widgets.rectangle.js on lines 86..95

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

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

                onHover(evt) {
                  if (evt) {
                    this.hoverDom(evt);
                  }
            
            
            Severity: Major
            Found in src/widgets/widgets.ellipse.js and 3 other locations - About 3 hrs to fix
            src/widgets/widgets.pressureHalfTime.js on lines 96..105
            src/widgets/widgets.rectangle.js on lines 86..95
            src/widgets/widgets.ruler.js on lines 81..90

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

            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

                checkHandle(index, shift) {
                  const region = this.getRegionByXY(
                    this._regions,
                    CoreUtils.worldToData(
                      this._params.lps2IJK,
            Severity: Major
            Found in src/widgets/widgets.velocityTimeIntegral.js and 1 other location - About 3 hrs to fix
            src/widgets/widgets.pressureHalfTime.js on lines 203..217

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

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

                onHover(evt) {
                  if (evt) {
                    this.hoverDom(evt);
                  }
            
            
            Severity: Major
            Found in src/widgets/widgets.pressureHalfTime.js and 3 other locations - About 3 hrs to fix
            src/widgets/widgets.ellipse.js on lines 91..100
            src/widgets/widgets.rectangle.js on lines 86..95
            src/widgets/widgets.ruler.js on lines 81..90

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

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

              _packTo8Bits(channels, frame, textureSize, startVoxel, stopVoxel) {
                const packed = {
                  textureType: null,
                  data: null,
                };
            Severity: Major
            Found in src/models/models.stack.js - About 3 hrs to fix
              Severity
              Category
              Status
              Source
              Language