private bool HasConfigurationBrachyPlans(ICatheterOverloadingParameters configuration) { bool isPatienPlanBrachy = DicomServices.IsBrachyPlan(configuration.PatientPlan); bool isVerificationPlanBrachy = DicomServices.IsBrachyPlan(configuration.VerificationPlan); return(isPatienPlanBrachy && isVerificationPlanBrachy); }
private void CreateAllVerificationPlans() { _outputPlans = new ResultCollection(); //Generate blocks and related plans var blocks = CatheterBlockService.CreateBlocks(DicomServices.GetTotalNumberOfChannelsInPlan(_patientPlan)); foreach (IBlockItem blockItem in blocks) { var newVerificationPlan = DicomServices.DeepCopy(_verificationPlan); CreateNewVerificationPlan(blockItem, ref newVerificationPlan); _outputPlans.Add(ResultItem.CreateResultItem(blockItem.ToString(), newVerificationPlan)); } }
private static void Process(IInputParameters input) { IDicomServices dicomServices = new DicomServices(); ICatheterBlocks catheterBlocks = new CatheterBlocks(input.NumberOfChannelsInVerificationPlan); ICatheterBlockService catheterBlockService = new CatheterBlockService(catheterBlocks); var catheterOverloader = CatheterOverloaderFactory.Create(new CatheterOverloadingParametersAdapter(input, dicomServices), dicomServices, catheterBlockService); catheterOverloader.RunOverloading(); catheterOverloader.SaveToFile("outputFile.dcm"); }
public void SaveToFile(string outputfileDcm) { foreach (IResultItem item in _outputPlans) { try { string fileName = outputfileDcm + "_" + item.FileName + ".dcm"; DicomServices.Save(item.VerificationPlan, DICOMIOSettings.DefaultExplicit(), fileName); } catch (Exception e) { Console.WriteLine(e); throw; } } }