26 lines
640 B
TypeScript
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;
|
|
}
|