Initial work on Nucleus parity merge
This commit is contained in:
1 parent
aa88fe181a
commit
680beb163f
38 files changed
+4353
-1
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { getElementIfNotEmpty } from './getElementIfNotEmpty.js';
|
||||
|
||||
export function getStackDataIfNotEmpty(viewportIndex) {
|
||||
const element = getElementIfNotEmpty(viewportIndex);
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
const stackToolData = cornerstoneTools.getToolState(element, 'stack');
|
||||
if (!stackToolData ||
|
||||
!stackToolData.data ||
|
||||
!stackToolData.data.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const stack = stackToolData.data[0];
|
||||
if (!stack) {
|
||||
return;
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
Reference in new issue
Block a user