feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Neil <neil.a.macphee@gmail.com>
This commit is contained in:
authored and GitHub committed 2024-04-09 23:57:34 -04:00
1 parent dc0b183dd4
commit d57e8bc157
200 files changed
+9589 -2178

No files matched your search

@@ -40,17 +40,19 @@ function calculateSuvPeak(
return;
}
if (labelmap.scalarData.length !== referenceVolume.scalarData.length) {
const labelmapData = labelmap.getScalarData();
const referenceVolumeData = referenceVolume.getScalarData();
if (labelmapData.length !== referenceVolumeData.length) {
throw new Error('labelmap and referenceVolume must have the same number of pixels');
}
const { scalarData: labelmapData, dimensions, imageData: labelmapImageData } = labelmap;
const { scalarData: referenceVolumeData, imageData: referenceVolumeImageData } = referenceVolume;
const { dimensions, imageData: labelmapImageData } = labelmap;
const { imageData: referenceVolumeImageData } = referenceVolume;
let boundsIJK;
// Todo: using the first annotation for now
if (annotations && annotations[0].data?.cachedStats) {
if (annotations?.length && annotations[0].data?.cachedStats) {
const { projectionPoints } = annotations[0].data.cachedStats;
const pointsToUse = [].concat(...projectionPoints); // cannot use flat() because of typescript compiler right now
@@ -1,4 +1,4 @@
export default function createAndDownloadTMTVReport(segReport, additionalReportRows) {
export default function createAndDownloadTMTVReport(segReport, additionalReportRows, options = {}) {
const firstReport = segReport[Object.keys(segReport)[0]];
const columns = Object.keys(firstReport);
const csv = [columns.join(',')];
@@ -40,6 +40,6 @@ export default function createAndDownloadTMTVReport(segReport, additionalReportR
const a = document.createElement('a');
a.href = url;
a.download = `${firstReport.PatientID}_tmtv.csv`;
a.download = options.filename ?? `${firstReport.PatientID}_tmtv.csv`;
a.click();
}