Pinnacle : Table/Laser Shifts

Description

It is possible to access shift information from the scan/setup origin location to the isocenter. 

Patient shift-related information

Full Descriptions

Ex. “Move the table RIGHT 7.59cm (looking from foot of table.)

TrialList.Current.BeamList.Current.LaserDescr.X;
TrialList.Current.BeamList.Current.LaserDescr.Y;
TrialList.Current.BeamList.Current.LaserDescr.Z;

Shift Value only

Ex. “7.59”

//X, Y, Z coordinate shifts
TrialList.Current.BeamList.Current.IsoInLocalizerCoords.XCoord;
TrialList.Current.BeamList.Current.IsoInLocalizerCoords.YCoord;
TrialList.Current.BeamList.Current.IsoInLocalizerCoords.ZCoord;

Direction Value

Ex. “RIGHT”

//X, Y, Z coordinate shift directions
TrialList.Current.BeamList.Current.LaserLabel.X;
TrialList.Current.BeamList.Current.LaserLabel.Y;
TrialList.Current.BeamList.Current.LaserLabel.Z;

Laser Infomation

Ex. “Lap CT1”
—-Need to verify this is correct.

TrialList.Current.LaserLocalizer.ExportFormat;

Isocenter Shifts Reporting (Coordinate System POV)

Ex. “Table”

TrialList.Current.BeamList.Current.DisplayLaserMotion;

Examples

Determine shifts and directions for the current isocenter

//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="";