public override void ApplyConfig(DicomConfig config) { // set up the Modality Worklist information models ModalityWorklistInformationModel modalityWorklistInformationModel = new ModalityWorklistInformationModel(); // load the information models modalityWorklistInformationModel.LoadInformationModel(config.DataDirectory); // add any default attribute values to the information models modalityWorklistInformationModel.AddDefaultAttributeToInformationModel("0x00400001", DvtkData.Dimse.VR.AE, config.SutAeTitle); modalityWorklistInformationModel.AddDefaultAttributeToInformationModel("0x00400002", DvtkData.Dimse.VR.DA, System.DateTime.Now.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture)); modalityWorklistInformationModel.AddDefaultAttributeToInformationModel("0x00400002", DvtkData.Dimse.VR.TM, System.DateTime.Now.ToString("HHmmss", System.Globalization.CultureInfo.InvariantCulture)); // add any additional attribute values to the information models // modalityWorklistInformationModel.AddAdditionalAttributeToInformationModel("0x00080054", DvtkData.Dimse.VR.AE, config.DvtAeTitle); // set up the worklist SCP WorklistScp worklistScp = new WorklistScp(); Scp = worklistScp; // apply the remaining configuration base.ApplyConfig(config); // add the default message handlers with the information model worklistScp.AddDefaultMessageHandlers(modalityWorklistInformationModel); }
/// <summary> /// Apply the Dicom Configuration to the Client, /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public override void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { // set up the worklist SCP WorklistScp worklistScp = new WorklistScp(); // update supported transfer syntaxes here //worklistScp.ClearTransferSyntaxes(); //worklistScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = worklistScp; base.ApplyConfig(commonConfig, config); // set up the Modality Worklist information models _modalityWorklistInformationModel = new ModalityWorklistInformationModel(); // load the information models _modalityWorklistInformationModel.LoadInformationModel(RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.SourceDataDirectory)); // add any default attribute values to the information models bool overWriteExistingValue = true; _modalityWorklistInformationModel.AddDefaultAttributeToInformationModel(overWriteExistingValue, "0x00400001", VR.AE, config.FromActorAeTitle); _modalityWorklistInformationModel.AddDefaultAttributeToInformationModel(overWriteExistingValue, "0x00400002", VR.DA, System.DateTime.Now.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture)); _modalityWorklistInformationModel.AddDefaultAttributeToInformationModel(overWriteExistingValue, "0x00400003", VR.TM, System.DateTime.Now.ToString("HHmmss", System.Globalization.CultureInfo.InvariantCulture)); // add any additional attribute values to the information models //modalityWorklistInformationModel.AddAdditionalAttributeToInformationModel(overWriteExistingValue, "0x00080054", VR.AE, config.DvtAeTitle); // add the default message handlers with the information model worklistScp.AddDefaultMessageHandlers(_modalityWorklistInformationModel); }