/// <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 Query/Retrieve information models QueryRetrieveInformationModels informationModels = new QueryRetrieveInformationModels(); // Do not load the Information Models here as they are loaded (refreshed) on each query // - just define the data directory informationModels.DataDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.SourceDataDirectory); // add any default attribute values to the information models bool overWriteExistingValue = true; informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080005", VR.CS, "ISO IR 6"); informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080090", VR.PN, "Referring^Physician^Dr"); // add any additional attribute values to the information models informationModels.AddAdditionalAttribute(overWriteExistingValue, "0x00080054", VR.AE, config.ToActorAeTitle); // set up the query/retrieve SCP QueryRetrieveScp queryRetrieveScp = new QueryRetrieveScp(); // update supported transfer syntaxes here //queryRetrieveScp.ClearTransferSyntaxes(); //queryRetrieveScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = queryRetrieveScp; base.ApplyConfig(commonConfig, config); // add the default message handlers with the information models queryRetrieveScp.AddDefaultMessageHandlers(informationModels); }
public override void ApplyConfig(DicomConfig config) { // set up the Query/Retrieve information models QueryRetrieveInformationModels informationModels = new QueryRetrieveInformationModels(); // load the information models informationModels.Load(config.DataDirectory); // add any default attribute values to the information models informationModels.AddDefaultAttribute("0x00080005", DvtkData.Dimse.VR.CS, "ISO IR 6"); informationModels.AddDefaultAttribute("0x00080090", DvtkData.Dimse.VR.PN, "Referring^Physician^Dr"); // add any additional attribute values to the information models informationModels.AddAdditionalAttribute("0x00080054", DvtkData.Dimse.VR.AE, config.DvtAeTitle); // set up the query/retrieve SCP QueryRetrieveScp queryRetrieveScp = new QueryRetrieveScp(); Scp = queryRetrieveScp; // apply the remaining configuration base.ApplyConfig(config); // add the default message handlers with the information models queryRetrieveScp.AddDefaultMessageHandlers(informationModels); }
public override void ApplyConfig(DicomConfig config) { // load the information models _informationModels.Load(config.DataDirectory); // add any default attribute values to the information models _informationModels.AddDefaultAttribute("0x00080005", DvtkData.Dimse.VR.CS, "ISO IR 6"); _informationModels.AddDefaultAttribute("0x00080090", DvtkData.Dimse.VR.PN, "Referring^Physician^Dr"); // set up the storage commit SCP StorageCommitScp storageCommitScp = new StorageCommitScp(); Scp = storageCommitScp; // apply the remaining configuration base.ApplyConfig(config); // add the default message handlers storageCommitScp.AddDefaultMessageHandlers(); }
/// <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) { // Do not load the Information Models here as hey are loaded (refreshed) on each storage commitment event // - just define the data directory _informationModels.DataDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.SourceDataDirectory); // add any default attribute values to the information models bool overWriteExistingValue = true; _informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080005", VR.CS, "ISO IR 6"); _informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080090", VR.PN, "Referring^Physician^Dr"); // set up the storage commit SCP StorageCommitScp storageCommitScp = new StorageCommitScp(); // update supported transfer syntaxes here //storageCommitScp.ClearTransferSyntaxes(); //storageCommitScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = storageCommitScp; base.ApplyConfig(commonConfig, config); // use the common config option 1 to determine how the storage commitment should be handled if (ConfigOption1.Equals("DO_STORAGE_COMMITMENT_ON_SINGLE_ASSOCIATION") == true) { // add the default message handlers with the information model // - allows support for the NActionNEventReportHandler which // returns an N-EVENT-REPORT-RQ on the same association as the // N-ACTION-RQ was received. storageCommitScp.AddDefaultMessageHandlers(_informationModels, 5000); } else { // add the default message handlers storageCommitScp.AddDefaultMessageHandlers(); } }