Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDC2259: do not check uniform spacing in the 4th dimension for 4D datasets #2356

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions platform/core/src/utils/isDisplaySetReconstructable.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ function processSingleframe(instances) {
}
}

// check if dataset is 4D
const datasetIs4D = _isDataset4D(instances);
if (datasetIs4D) {
warningIssues.push(ReconstructionIssues.DATASET_4D);
}

let missingFrames = 0;

// Check if frame spacing is approximately equal within a spacingTolerance.
Expand All @@ -115,6 +121,14 @@ function processSingleframe(instances) {
ImagePositionPatient,
previousImagePositionPatient
);

if (datasetIs4D && spacingBetweenFrames < 1.e-3) {
// the dataset is 4D, if the distance is zero, means that we are
// checking the 4th dimension. Do not return, since we want still to
// check the 3rd dimension spacing.
continue;
}

const spacingIssue = _getSpacingIssue(
spacingBetweenFrames,
averageSpacingBetweenFrames
Expand All @@ -136,10 +150,7 @@ function processSingleframe(instances) {
}
}

// check if dataset is 4D
if (_isDataset4D(instances)) {
warningIssues.push(ReconstructionIssues.DATASET_4D);
}


return { value: warningIssues.length === 0 ? true : false, missingFrames, warningIssues };
}
Expand Down