//Assign the current isocenter point to the current POI point. PoiList.Current=TrialList.Current.IsocenterList.Current.Name; //Determine if table or lasers are shifting Store.StringAt.TableOrLaser=TrialList.Current.BeamList.Current.DisplayLaserMotion; //IF laser shift, determine type of laser system. Table vs Laser movement depends //on the type of laser system. Weird. IF.TrialList.Current.BeamList.Current.DisplayLaserMotion.STRINGEQUALTO.#"#Laser".THEN={ Store.At.TableOrLaser.AppendString = ": "; Store.At.TableOrLaser.AppendString=TrialList.Current.LaserLocalizer.ExportFormat; }; Store.At.TableOrLaser.AppendString=" "; Store.At.TableOrLaser.AppendString = "Shift"; // ----- X shift distance and direction //Set shift variable to X POI (selected Isocenter) coordinate Store.FloatAt.ShiftNum = PoiList.Current.RelativeXCoord.Value; //Subtract Setup Point coordinates to determine shift Store.At.ShiftNum.Subtract = TrialList.Current.LaserLocalizer.LaserCenter.DisplayXCoord.Value; //Check if shifting laser or table //This could be wrong because depends upon beam, hopefully no one uses different shift //mechanisms by beam. That'd be very dangerous. If laser, this shift is always the opposite of table shift. //For Up/Down shift, this depends on Laser system type (1 or 3). IF.TrialList.Current.BeamList.Current.DisplayLaserMotion.STRINGEQUALTO.#"#Laser".THEN.Store.At.ShiftNum.Multiply=-1; //Store shift in a dummy variable since If-else statements don't work well. Store.FloatAt.DummyFloat = Store.FloatAt.ShiftNum; //Check if shift is Right, put shift distance and direction in a string. IF.Store.FloatAt.ShiftNum.LESSTHAN.#"0".THEN={ Store.At.DummyFloat.Absolute= "" ; Store.StringAt.Shift = Store.FloatAt.DummyFloat; Store.At.Shift.AppendString = " RIGHT"; Store.At.Shift.AppendString = "@"; }; //If shift is left, put shift distance and direction IF.Store.FloatAt.ShiftNum.GREATERTHAN.#"0".THEN={ Store.StringAt.Shift = Store.FloatAt.DummyFloat; Store.At.Shift.AppendString = " LEFT"; Store.At.Shift.AppendString = "@"; }; // ----- Y shift distance and direction Store.FloatAt.ShiftNum = PoiList.Current.RelativeYCoord.Value; Store.At.ShiftNum.Subtract = TrialList.Current.LaserLocalizer.LaserCenter.DisplayYCoord.Value; //Check if shifting laser or table //If laser this shift only occurs if a 3 laser system. //1 laser systems only have a left/right shift associated with them. Table shift used instead. IF.TrialList.Current.BeamList.Current.DisplayLaserMotion.STRINGEQUALTO.#"#Laser".THEN={ IF.TrialList.Current.LaserLocalizer.ExportFormat.STRINGEQUALTO.#"#LAP CT3".THEN.Store.At.ShiftNum.Multiply=-1; IF.TrialList.Current.LaserLocalizer.ExportFormat.STRINGEQUALTO.#"#Gammex 3".THEN.Store.At.ShiftNum.Multiply=-1; }; //Store shift in a dummy variable since If-else statements don't work well. Store.FloatAt.DummyFloat = Store.FloatAt.ShiftNum; IF.Store.FloatAt.ShiftNum.LESSTHAN.#"0".THEN={ Store.At.DummyFloat.Absolute= "" ; Store.At.Shift.AppendString = Store.FloatAt.DummyFloat; Store.At.Shift.AppendString = " UP"; Store.At.Shift.AppendString = "@"; }; IF.Store.FloatAt.ShiftNum.GREATERTHAN.#"0".THEN={ Store.At.Shift.AppendString = Store.FloatAt.DummyFloat; Store.At.Shift.AppendString = " DOWN"; Store.At.Shift.AppendString = "@"; }; // ----- Z shift distance and direction //No matter what type of laser system is used, this value is always given as a table shift //I think. At least on our system. Store.FloatAt.ShiftNum = PoiList.Current.RelativeZCoord.Value; Store.At.ShiftNum.Subtract = TrialList.Current.LaserLocalizer.LaserCenter.DisplayZCoord.Value; Store.FloatAt.DummyFloat = Store.FloatAt.ShiftNum; IF.Store.FloatAt.ShiftNum.LESSTHAN.#"0".THEN={ Store.At.DummyFloat.Absolute= "" ; Store.At.Shift.AppendString = Store.FloatAt.DummyFloat; Store.At.Shift.AppendString = " OUT"; Store.At.Shift.AppendString = "@"; }; IF.Store.FloatAt.ShiftNum.GREATERTHAN.#"0".THEN={ Store.At.Shift.AppendString = Store.FloatAt.DummyFloat; Store.At.Shift.AppendString = " IN"; }; InfoMessage = Store.StringAt.Shift; Store.FreeAt.DummyFloat = ""; Store.FreeAt.Shift="";