UNPKG

@cornerstonejs/core

Version:
11 lines (10 loc) 359 B
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); }