ohif-viewer/extensions/cornerstone/src/utils/getCornerstoneOrientation.ts
Bill Wallace fb2a60ae19
feat: Allow multiframe volumes (#3089)
* Allow multiframe volumes

* feat:Allow display of multiframe volume
2023-01-05 20:26:26 -05:00

26 lines
640 B
TypeScript

import { Enums } from '@cornerstonejs/core';
import { log } from '@ohif/core';
const AXIAL = 'axial';
const SAGITTAL = 'sagittal';
const CORONAL = 'coronal';
export default function getCornerstoneOrientation(
orientation: string
): Enums.OrientationAxis {
if (orientation) {
switch (orientation.toLowerCase()) {
case AXIAL:
return Enums.OrientationAxis.AXIAL;
case SAGITTAL:
return Enums.OrientationAxis.SAGITTAL;
case CORONAL:
return Enums.OrientationAxis.CORONAL;
default:
return Enums.OrientationAxis.ACQUISITION;
}
}
return Enums.OrientationAxis.ACQUISITION;
}