function imagePointToPatientPoint(imagePoint, imagePlane) {
  var rowCosines = (0, _convertToVector2.default)(imagePlane.rowCosines);
  var columnCosines = (0, _convertToVector2.default)(imagePlane.columnCosines);
  var imagePositionPatient = (0, _convertToVector2.default)(imagePlane.imagePositionPatient);

  var x = rowCosines.clone().multiplyScalar(imagePoint.x);

  x.multiplyScalar(imagePlane.columnPixelSpacing || 1);
  var y = columnCosines.clone().multiplyScalar(imagePoint.y);

  y.multiplyScalar(imagePlane.rowPixelSpacing || 1);
  var patientPoint = x.add(y);

  patientPoint.add(imagePositionPatient);

  return patientPoint;
}
// Projects an image point to a patient point
Projects an image point to a patient point
Projects an image point to a patient point
function imagePointToPatientPoint(imagePoint, imagePlane) {
  var rowCosines = (0, _convertToVector2.default)(imagePlane.rowCosines);
  var columnCosines = (0, _convertToVector2.default)(imagePlane.columnCosines);
  var imagePositionPatient = (0, _convertToVector2.default)(imagePlane.imagePositionPatient);
  var x = rowCosines.clone().multiplyScalar(imagePoint.x);
  x.multiplyScalar(imagePlane.columnPixelSpacing || 1);
  var y = columnCosines.clone().multiplyScalar(imagePoint.y);
  y.multiplyScalar(imagePlane.rowPixelSpacing || 1);
  var patientPoint = x.add(y);
  patientPoint.add(imagePositionPatient);
  return patientPoint;
}
function imagePointToPatientPoint ( imagePoint , imagePlane ) { var rowCosines = ( 0 , _convertToVector2 . default ) ( imagePlane . rowCosines ) ; var columnCosines = ( 0 , _convertToVector2 . default ) ( imagePlane . columnCosines ) ; var imagePositionPatient = ( 0 , _convertToVector2 . default ) ( imagePlane . imagePositionPatient ) ; var x = rowCosines . clone ( ) . multiplyScalar ( imagePoint . x ) ; x . multiplyScalar ( imagePlane . columnPixelSpacing || 1 ) ; var y = columnCosines . clone ( ) . multiplyScalar ( imagePoint . y ) ; y . multiplyScalar ( imagePlane . rowPixelSpacing || 1 ) ; var patientPoint = x . add ( y ) ; patientPoint . add ( imagePositionPatient ) ; return patientPoint ; }
Projects an image point to a patient point
Projects an image point to a patient point