VarianAPIs / Varian-Code-Samples

Code samples for ESAPI and other Varian APIs and web services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Constructor for SearchBodyParameters?

tkstevens opened this issue · comments

I want to use the StructureSet.CreateAndSearchBody method, but I can't figure out how to construct the SearchBodyParameters input. Anyone have a snippet to help? Thanks.

Hi there,

like this:

var parameters = context.StructureSet.GetDefaultSearchBodyParameters();
parameters.LowerHUThreshold = -300;
parameters.KeepLargestParts = false;
parameters.NumberOfLargestPartsToKeep = 1;
parameters.PreDisconnect = false;
parameters.FillAllCavities = true;
parameters.PreCloseOpenings = false;
parameters.Smoothing = true;
parameters.SmoothingLevel = 1;
Structure newBody = context.StructureSet.CreateAndSearchBody(parameters);