@cornerstonejs/core
Version:
Cornerstone3D Core
11 lines (10 loc) • 359 B
JavaScript
export function isImageActor(actorEntry) {
return (actorIsA(actorEntry, 'vtkVolume') || actorIsA(actorEntry, 'vtkImageSlice'));
}
export function actorIsA(actorEntry, actorType) {
const actorToCheck = 'isA' in actorEntry ? actorEntry : actorEntry.actor;
if (!actorToCheck) {
return false;
}
return !!actorToCheck.isA(actorType);
}