Showing 271 of 665 total issues
Function helpersVolumeRendering
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const helpersVolumeRendering = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return null;
}
- Read upRead up
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 dimensionIndexValues
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
dimensionIndexValues(frameIndex = 0) {
let dimensionIndexValues = null;
// try to get it from enhanced MR images
// per-frame functionnal group sequence
- Read upRead up
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 _orderFrameOnDimensionIndicesArraySort
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_orderFrameOnDimensionIndicesArraySort(a, b) {
if (
'dimensionIndexValues' in a &&
Object.prototype.toString.call(a.dimensionIndexValues) === '[object Array]' &&
'dimensionIndexValues' in b &&
- Read upRead up
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 zSpacing
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
zSpacing() {
if (this._numberOfFrames > 1) {
if (this._frame[0].pixelSpacing && this._frame[0].pixelSpacing[2]) {
this._spacing.z = this._frame[0].pixelSpacing[2];
} else {
- Read upRead up
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 helpersContour
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const helpersContour = (three = window.THREE) => {
if (three === undefined || three.Object3D === undefined) {
return null;
}
- Read upRead up
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 stringToNumber
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
static stringToNumber(numberAsString) {
let number = Number(numberAsString);
// returns true is number is NaN
if (number !== number) {
- Read upRead up
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 main
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
main() {
// need to pre-call main to fill up the functions list
this._main = `
float luma (vec3 rgb) {
Function uniforms
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
static uniforms() {
return {
uCanvasWidth: {
type: 'f',
value: 0,
Function _decompressUncompressed
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_decompressUncompressed(frameIndex = 0) {
let buffer = this._buffer;
let numberOfChannels = this.numberOfChannels();
let numPixels = this.rows(frameIndex) * this.columns(frameIndex) * numberOfChannels;
if (!this.rightHanded()) {
Function onEnd
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
onEnd() {
if (this._handles.length < 3) {
return;
}
Function updateMeshPosition
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateMeshPosition() {
if (this._mesh) {
this.remove(this._mesh);
}
Function cosines
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
cosines() {
let cosines = [new Vector3(1, 0, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 1)];
if (this._imageOrientation && this._imageOrientation.length === 6) {
let xCos = new Vector3(
Function main
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
main() {
// need to pre-call main to fill up the functions list
this._main = `
void main(void) {
Function _readLong
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_readLong(len = 1) {
let tempBuff = new DataView(this._buffer.slice(this._bufferPos, this._bufferPos + len * 8));
this._bufferPos += len * 8;
let v = new Uint16Array(len);
for (let i = 0; i < len; i++) {
Function _prepareMaterial
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
_prepareMaterial() {
if (!this._material) {
// reference plane
this._uniforms.uSlice.value = this._referencePlane;
Consider simplifying this complex logical expression. Open
if (
!(
super.validate(model) &&
typeof model.cosines === 'function' &&
typeof model.spacingXY === 'function' &&
Consider simplifying this complex logical expression. Open
if (
!(
photometricInterpretation !== 'RGB' &&
photometricInterpretation !== 'PALETTE COLOR' &&
photometricInterpretation !== 'YBR_FULL' &&
Consider simplifying this complex logical expression. Open
if (
point &&
point.x >= bbox.min.x - epsilon &&
point.y >= bbox.min.y - epsilon &&
point.z >= bbox.min.z - epsilon &&
Consider simplifying this complex logical expression. Open
if (
!(
objectToTest !== null &&
typeof objectToTest !== 'undefined' &&
objectToTest.hasOwnProperty('elements') &&
Function pack
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
pack() {
// Get total number of voxels
const nbVoxels = this._dimensionsIJK.x * this._dimensionsIJK.y * this._dimensionsIJK.z;
// Packing style
- Read upRead up
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"