Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export pinnacle plan mlc boundaries is wrong #1809

Open
KeoJam opened this issue Aug 7, 2023 · 5 comments
Open

export pinnacle plan mlc boundaries is wrong #1809

KeoJam opened this issue Aug 7, 2023 · 5 comments

Comments

@KeoJam
Copy link

KeoJam commented Aug 7, 2023

hi,when i use pymedphys._experimental.pinnacle to export the pinnacleplan, i find the LeafPositionBoundaries is write by code in rtplan.py from -200 to 200 ,it is a 60 pairs mlc,but my linac in the pinnacle ,mlc just 40 pairs. i find the linac config in store in plan.Pinnacle.Machines. why not to read the real mlc boundaries from plan.Pinnacle.Machines file? in plan.Pinnacle.Machines file has info like:
MultiLeaf ={
LeafPairList ={
MLCLeafPair ={
YCenterPosition = -19.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 16.4;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -18.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 17.5;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -17.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 18.4;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -16.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 19.5;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -15.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -14.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -13.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -12.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -11.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -10.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -9.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -8.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -7.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -6.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -5.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -4.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -3.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -2.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -1.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = -0.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 0.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 1.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 2.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 3.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 4.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 5.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 6.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 7.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 8.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 9.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 10.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 11.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 12.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 13.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 14.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 15.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 20;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 16.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 19.5;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 17.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 18.4;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 18.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 17.5;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
MLCLeafPair ={
YCenterPosition = 19.5;
NegateLeafCoordinate = 0;
Width = 1;
MinTipPosition = -12.5;
MaxTipPosition = 16.4;
SideLeakageWidth = 0.1;
TipLeakageWidth = 0.1;
};
};

@pchlap
Copy link
Collaborator

pchlap commented Aug 7, 2023

Hi @KeoJam, the PinnaclePlan export is known to have some issues with it (this is displayed in a warning message when you run the tool). For our use case we didn't need the plan exported (we are running data mining projects using only the structures and dose) so there wasn't any need to correct these problems with the plan file.

If there is someone who would pick up this task to work on solving the plan module export issues that would be fantastic. But unfortunately this isn't something we have the capacity for.

@KeoJam
Copy link
Author

KeoJam commented Aug 25, 2023

Hi @pchlap i have fixed the problem by myself. Here is the code,if you need , you can merge it to the project. And i also solved the ds.dosegridscaling length is to long.usually it's length is 11.
code for rtplan&rtdose.zip

@crcrewso
Copy link
Collaborator

I'll take a look this weekend and put together the pull request.

@pchlap
Copy link
Collaborator

pchlap commented Sep 1, 2023

Thanks for your efforts here @KeoJam and @crcrewso! Much appreciated.

@crcrewso
Copy link
Collaborator

crcrewso commented Sep 3, 2023

@KeoJam
One question came up when reviewing the code, what issue is solved by removing the rounding of DoseGridScaling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants