private void TargetRasChanged() { if (TargetRASRL.HasValue && TargetRASAP.HasValue && TargetRASSI.HasValue) { PointRAS targetRAS = new PointRAS(TargetRASRL.Value, TargetRASAP.Value, TargetRASSI.Value); var acpc = _transformationInterface.TransformRASToACPC(targetRAS); if (acpc.HasValue) { _targetAcpcAp = acpc.Value.AP; _targetAcpcMl = acpc.Value.ML; _targetAcpcSi = acpc.Value.SI; Notify(nameof(TargetACPCAP)); Notify(nameof(TargetACPCML)); Notify(nameof(TargetACPCSI)); } } UpdateXdToTarget(); }
private void UpdateXdToTarget() { XdToTargetRASRL = null; XdToTargetRASAP = null; XdToTargetRASSI = null; if (TargetRASRL.HasValue && TargetRASAP.HasValue && TargetRASSI.HasValue) { var targetRAS = new PointRAS(_targetRasRl.Value, _targetRasAp.Value, _targetRasSi.Value); PointRAS focalVsTarget = new PointRAS(0, 0, 0);; var focalRAS = _calibrationInterface.GetNaturalFocusRAS(); if (focalRAS.HasValue) { focalVsTarget = targetRAS - focalRAS.Value; XdToTargetRASRL = focalVsTarget.RL; XdToTargetRASAP = focalVsTarget.AP; XdToTargetRASSI = focalVsTarget.SI; } } }