IDC 2259: add warning UI for series inconsistencies (#2331)
IDC 2259: add warning UI for series inconsistencies remove VTKMPRToolbarButton component memoization (it is not anymore necessary)
This commit is contained in:
1 parent
db3b15e537
commit
0456d92462
8 files changed
+327
-185
No files matched your search
@@ -767,6 +767,16 @@ const isMultiFrame = instance => {
|
||||
return instance.getTagValue('NumberOfFrames') > 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a display set for a series.
|
||||
* Checks if a series is reconstructable to a 3D volume.
|
||||
* If reconstructable, the frames are sorted.
|
||||
*
|
||||
* @param {SeriesMetadata} series The series metadata object from which the display sets will be created
|
||||
* @param {Object[]} instances An array of `OHIFInstanceMetadata` objects.
|
||||
*
|
||||
* @returns {Object} imageSet.
|
||||
*/
|
||||
const makeDisplaySet = (series, instances) => {
|
||||
const instance = instances[0];
|
||||
const imageSet = new ImageSet(instances);
|
||||
@@ -804,18 +814,22 @@ const makeDisplaySet = (series, instances) => {
|
||||
imageSet.getImage(0).getTagValue('InstanceNumber')
|
||||
);
|
||||
|
||||
const isReconstructable = isDisplaySetReconstructable(instances);
|
||||
|
||||
imageSet.isReconstructable = isReconstructable.value;
|
||||
const displayReconstructableInfo = isDisplaySetReconstructable(instances);
|
||||
imageSet.isReconstructable = displayReconstructableInfo.value;
|
||||
|
||||
if (shallSort && imageSet.isReconstructable) {
|
||||
imageSet.sortByImagePositionPatient();
|
||||
}
|
||||
|
||||
if (isReconstructable.missingFrames) {
|
||||
if (displayReconstructableInfo.missingFrames) {
|
||||
// TODO -> This is currently unused, but may be used for reconstructing
|
||||
// Volumes with gaps later on.
|
||||
imageSet.missingFrames = isReconstructable.missingFrames;
|
||||
imageSet.missingFrames = displayReconstructableInfo.missingFrames;
|
||||
}
|
||||
|
||||
if (!imageSet.displayReconstructableInfo) {
|
||||
// It is not reconstrabale Save type of warning
|
||||
imageSet.warningIssues = displayReconstructableInfo.warningIssues;
|
||||
}
|
||||
|
||||
return imageSet;
|
||||
|
||||
Reference in new issue
Block a user