private void radioButtonJ2kLossless_CheckedChanged(object sender, System.EventArgs e) { if (radioButtonJ2kLossless.Checked) { _Compression = DicomImageCompressionType.J2kLossless; _TransferSyntax = DicomUidType.JPEG2000LosslessOnly; } }
private void radioButtonRunLength_CheckedChanged(object sender, System.EventArgs e) { if (radioButtonRunLength.Checked) { _Compression = DicomImageCompressionType.Rle; _TransferSyntax = DicomUidType.RLELossless; } }
private void radioButtonJpegLossless_CheckedChanged(object sender, System.EventArgs e) { if (radioButtonJpegLossless.Checked) { _Compression = DicomImageCompressionType.JpegLossless; _TransferSyntax = DicomUidType.JPEGLosslessNonhier14B; } }
private void radioButtonNone_CheckedChanged(object sender, System.EventArgs e) { if (radioButtonNone.Checked) { _Compression = DicomImageCompressionType.None; _TransferSyntax = DicomUidType.ImplicitVRLittleEndian; } }
private void radioButtonJ2kLossy_CheckedChanged(object sender, System.EventArgs e) { numericUpDownQFactor.Enabled = radioButtonJ2kLossy.Checked; if (radioButtonJ2kLossy.Checked) { _Compression = DicomImageCompressionType.J2kLossy; _TransferSyntax = DicomUidType.JPEG2000; } }
private void buttonOK_Click(object sender, System.EventArgs e) { if (!CheckFormat(ServerPort, "Server Port No.", false)) { return; } if (!CheckFormat(Timeout, "Timeout", false)) { return; } if (!CheckFormat(ServerIp, "Server IP Address", true)) { return; } _listViewCipherSuites.ListViewToCipherSuites(CipherSuites, _initializing); _Compression = DicomImageCompressionType.None; if (CompressionNone.Checked) { _Compression = DicomImageCompressionType.None; } else if (CompressionJ2kLossy.Checked) { _Compression = DicomImageCompressionType.J2kLossy; } else if (CompressionJ2KLossless.Checked) { _Compression = DicomImageCompressionType.J2kLossless; } else if (CompressionJPEGLossy.Checked) { _Compression = DicomImageCompressionType.JpegLossy; } else if (CompressionJPEGLossless.Checked) { _Compression = DicomImageCompressionType.JpegLossless; } _presentationContextType = this._rbPresentationOne.Checked ? 0 : 1; }
private void LoadSettings( ) { _mySettings = DicomDemoSettingsManager.LoadSettings(_demoName); if (_mySettings == null) { _mySettings = new DicomDemoSettings(); _mySettings.FirstRun = false; DicomDemoSettingsManager.SaveSettings(_demoName, _mySettings); } RegistryKey user = Registry.CurrentUser; RegistryKey settings = user.OpenSubKey(_settingsLocation, true); if (settings == null) { // // We haven't saved any setting yet. Will use the default // settings. return; } _useTls = Convert.ToBoolean(settings.GetValue("UseTls", false)); if (_useTls) { if (Utils.VerifyOpensslVersion(this) == false) { _useTls = false; } } server.AETitle = Convert.ToString(settings.GetValue("ServerAE")); server.Port = Convert.ToInt32(settings.GetValue("ServerPort", 104)); string sValue = Convert.ToString(settings.GetValue("ServerIpType")); if (string.IsNullOrEmpty(sValue)) { server.IpType = DicomNetIpTypeFlags.Ipv4; } else { server.IpType = (DicomNetIpTypeFlags)DemosGlobal.StringToEnum(typeof(DicomNetIpTypeFlags), sValue); } _ipType = server.IpType; server.Address = IPAddress.Parse(Convert.ToString(settings.GetValue("ServerAddress", "127.0.0.1"))); server.Timeout = Convert.ToInt32(settings.GetValue("ServerTimeout", 0)); AETitle = Convert.ToString(settings.GetValue("ClientAE")); disableLogging = Convert.ToBoolean(settings.GetValue("DisableLogging")); GroupLengthDataElements = Convert.ToBoolean(settings.GetValue("GroupLengthDataElements", false)); _presentationContextType = Convert.ToInt32(settings.GetValue("PresentationContextType")); _cstoreCompressionType = (DicomImageCompressionType)Enum.Parse(typeof(DicomImageCompressionType), Convert.ToString(settings.GetValue("Compression"))); if (cstore != null) { cstore.PresentationContextType = _presentationContextType; cstore.Compression = _cstoreCompressionType; } }
public MyAppSettings() { querySCPServers = new MyServerList(); queryMWLServers = new MyServerList(); storeServers = new MyServerList(); clientAE = defaultClientAE; clientCertificate = string.Empty; privateKey = string.Empty; privateKeyPassword = "******"; logLowLevel = true; showHelpOnStart = true; #if LTV20_CONFIG if (Is64Bit()) { printerName = "LEADTOOLS 20 PrintToPACS 64-bit"; } else { printerName = "LEADTOOLS 20 PrintToPACS 32-bit"; } #endif string strCommonLocation = Path.GetDirectoryName(Application.ExecutablePath); strCommonLocation = Path.GetDirectoryName(strCommonLocation); strCommonLocation = Path.GetDirectoryName(strCommonLocation); strCommonLocation = Path.GetDirectoryName(strCommonLocation); strCommonLocation += "\\bin\\common\\xml"; if (File.Exists(strCommonLocation + "\\" + "SC-basic-ds.xml")) { secondaryCapturePath = strCommonLocation + "\\" + "SC-basic-ds.xml"; } else { secondaryCapturePath = ""; } secondaryCaptureCompression = DicomImageCompressionType.None; if (File.Exists(strCommonLocation + "\\" + "SC-Multi-Frame True Color Image-ds.xml")) { secondaryCaptureColorPath = strCommonLocation + "\\" + "SC-Multi-Frame True Color Image-ds.xml"; } else { secondaryCaptureColorPath = ""; } secondaryCaptureColorCompression = DicomImageCompressionType.None; if (File.Exists(strCommonLocation + "\\" + "SC-Multi-Frame Grayscale Byte-ds.xml")) { secondaryCaptureGrayPath = strCommonLocation + "\\" + "SC-Multi-Frame Grayscale Byte-ds.xml"; } else { secondaryCaptureGrayPath = ""; } secondaryCaptureGrayCompression = DicomImageCompressionType.None; if (File.Exists(strCommonLocation + "\\" + "EncapsulatedPDF-Template-ds.xml")) { PdfPath = strCommonLocation + "\\" + "EncapsulatedPDF-Template-ds.xml"; } else { PdfPath = ""; } TempDir = ""; UseResample = false; clientPort = 1000; selectedtype = DicomClassType.SCImageStorage; autodelete = false; capturetype = CaptureType.FullScreen; DefaultSCPServer = 0; DefaultMWLServer = 0; DefaultStoreServer = 0; wiaVersion = 0; if (Is64Bit()) { DataPath = MySettings.GetFolderPath() + "\\SerializedData_64.ser"; } else { DataPath = MySettings.GetFolderPath() + "\\SerializedData_32.ser"; } FirstRun = true; LastSelectedIndex = -1; }