private static void GetPatientOrientationVectors(PatientOrientation patientOrientation, out Vector3D headVector, out Vector3D leftVector, out Vector3D posteriorVector)
{
headVector = leftVector = posteriorVector = null;
if (patientOrientation == null)
return;
if (!string.IsNullOrEmpty(patientOrientation.Row))
{
switch (char.ToUpperInvariant(patientOrientation.Row.Code[0]))
{
case _orientationLeft:
leftVector = new Vector3D(+1, 0, 0);
break;
case _orientationRight:
leftVector = new Vector3D(-1, 0, 0);
break;
case _orientationPosterior:
posteriorVector = new Vector3D(+1, 0, 0);
break;
case _orientationAnterior:
posteriorVector = new Vector3D(-1, 0, 0);
break;
case _orientationHead:
headVector = new Vector3D(+1, 0, 0);
break;
case _orientationFoot:
headVector = new Vector3D(-1, 0, 0);
break;
}
}
if (!string.IsNullOrEmpty(patientOrientation.Column))
{
switch (char.ToUpperInvariant(patientOrientation.Column.Code[0]))
{
case _orientationLeft:
leftVector = new Vector3D(0, +1, 0);
break;
case _orientationRight:
leftVector = new Vector3D(0, -1, 0);
break;
case _orientationPosterior:
posteriorVector = new Vector3D(0, +1, 0);
break;
case _orientationAnterior:
posteriorVector = new Vector3D(0, -1, 0);
break;
case _orientationHead:
headVector = new Vector3D(0, +1, 0);
break;
case _orientationFoot:
headVector = new Vector3D(0, -1, 0);
break;
}
}
}
}