chore(prettier): full repo linting and code reformatting once and for all (#3627)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-01 16:19:39 -04:00
1 parent 01500a2d4c
commit 9045ddaedc
656 files changed
+21737 -20628

No files matched your search

+7 -29
View File
@@ -41,21 +41,12 @@ function calculateSuvPeak(
}
if (labelmap.scalarData.length !== referenceVolume.scalarData.length) {
throw new Error(
'labelmap and referenceVolume must have the same number of pixels'
);
throw new Error('labelmap and referenceVolume must have the same number of pixels');
}
const {
scalarData: labelmapData,
dimensions,
imageData: labelmapImageData,
} = labelmap;
const { scalarData: labelmapData, dimensions, imageData: labelmapImageData } = labelmap;
const {
scalarData: referenceVolumeData,
imageData: referenceVolumeImageData,
} = referenceVolume;
const { scalarData: referenceVolumeData, imageData: referenceVolumeImageData } = referenceVolume;
let boundsIJK;
// Todo: using the first annotation for now
@@ -69,10 +60,7 @@ function calculateSuvPeak(
return ijk as Types.Point3;
});
boundsIJK = utilities.boundingBox.getBoundingBoxAroundShape(
rectangleCornersIJK,
dimensions
);
boundsIJK = utilities.boundingBox.getBoundingBoxAroundShape(rectangleCornersIJK, dimensions);
}
let max = 0;
@@ -96,16 +84,9 @@ function calculateSuvPeak(
}
};
utilities.pointInShapeCallback(
labelmapImageData,
() => true,
callback,
boundsIJK
);
utilities.pointInShapeCallback(labelmapImageData, () => true, callback, boundsIJK);
const direction = labelmapImageData
.getDirection()
.slice(0, 3) as Types.Point3;
const direction = labelmapImageData.getDirection().slice(0, 3) as Types.Point3;
/**
* 2. Find the bottom and top of the great circle for the second sphere (1cc sphere)
@@ -120,10 +101,7 @@ function calculateSuvPeak(
referenceVolumeImageData.indexToWorld(maxIJK as vec3, secondaryCircleWorld);
vec3.scaleAndAdd(bottomWorld, secondaryCircleWorld, direction, -diameter / 2);
vec3.scaleAndAdd(topWorld, secondaryCircleWorld, direction, diameter / 2);
const suvPeakCirclePoints = [bottomWorld, topWorld] as [
Types.Point3,
Types.Point3
];
const suvPeakCirclePoints = [bottomWorld, topWorld] as [Types.Point3, Types.Point3];
/**
* 3. Find the Mean and Max of the 1cc sphere centered on the suv Max of the previous