Varian-Code-Samples
Varian-Code-Samples copied to clipboard
Is two structures overlap?
Is there a way to know if two Structures overlaps. I can use St.AND () using "SegmentVolume", but then how do I know if the result is empty? (That's what I could do with structures but then I can't use boolean...).
Have you tried checking the Volume of the structure resulting from the Boolean AND?
There is also an Structure bool „IsEmpty“ that is easy to check
I cant'check the volume because the result is a SegmentVolume and not a structure, Then I can't either use the "IsEmpty" method
What about looking at the volume?
Sent from Yahoo Mail on Android
On Fri, Feb 26, 2021 at 7:20 AM, yvsblanc[email protected] wrote:
I cant'check the volume because the result is a SegmentVolume and not a structure, Then I can't either use the "IsEmpty" method
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
No. You use SegmentVolume on a Structure and can exchange this for „IsEmpty“.
example: var saumstructure = ss.AddStructure(„PTV“, saumId); saumstructure.SegmentVolume = ptv.Sub(saumstructure); if (saumstructure.IsEmpty) blaBlaBlup
Thank you, I'll try this
And for everyone that want to check Overlap in a Single-File-Plugin or do not have Writable scripts because of older Eclipse-Version or because of Rights-issues or because it is simpler to use. Please check out this link:
https://github.com/mtparagon5/ESAPI-Projects/blob/2a65eb5e6112276708083fbedf72ad4268dc64cc/Plugins/DvhLookups_v07.cs#L234
Very very helpful functions for ESAPI beginners but this link brings you exactly to Calculate Overlap methods. Simple Copy&Paste and you can use these methods in all your scripts. I have something similar but this is the base I found a few years ago and use it in some form till today.