Beispiel #1
0
        private void buttonSpecifyTS_Click(object sender, EventArgs e)
        {
            SelectTransferSyntaxesForm theSelectTransferSyntaxesForm = new SelectTransferSyntaxesForm();

            ArrayList tsList = new ArrayList();
            tsList.Add(DvtkData.Dul.TransferSyntax.Implicit_VR_Little_Endian);
            tsList.Add(DvtkData.Dul.TransferSyntax.Explicit_VR_Big_Endian);
            tsList.Add(DvtkData.Dul.TransferSyntax.Explicit_VR_Little_Endian);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Baseline_Process_1);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Extended_Hierarchical_16_And_18);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Extended_Hierarchical_17_And_19);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Extended_Process_2_And_4);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Extended_Process_3_And_5);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Full_Progression_Hierarchical_24_And_26);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Full_Progression_Hierarchical_25_And_27);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Full_Progression_Non_Hierarchical_10_And_12);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Full_Progression_Non_Hierarchical_11_And_13);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Lossless_Hierarchical_28);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Lossless_Hierarchical_29);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Lossless_Non_Hierarchical_14);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Lossless_Non_Hierarchical_15);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Lossless_Non_Hierarchical_1st_Order_Prediction);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_LS_Lossless_Image_Compression);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_LS_Lossy_Image_Compression);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_2000_IC_Lossless_Only);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_2000_IC);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Spectral_Selection_Hierarchical_20_And_22);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Spectral_Selection_Hierarchical_21_And_23);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Spectral_Selection_Non_Hierarchical_6_And_8);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_Spectral_Selection_Non_Hierarchical_7_And_9);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_2000_Multicomponent_lossless2);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPEG_2000_Multicomponent2);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPIP_Referenced);
            tsList.Add(DvtkData.Dul.TransferSyntax.JPIP_Referenced_Deflate);
            tsList.Add(DvtkData.Dul.TransferSyntax.MPEG2_Main_Profile_Level);
            tsList.Add(DvtkData.Dul.TransferSyntax.RFC_2557_Mime_Encapsulation);
            tsList.Add(DvtkData.Dul.TransferSyntax.Deflated_Explicit_VR_Little_Endian);
            tsList.Add(DvtkData.Dul.TransferSyntax.RLE_Lossless);

            if (selectedTS.Count != 0)
            {
                foreach (string ts in selectedTS)
                {
                    theSelectTransferSyntaxesForm.SupportedTransferSyntaxes.Add(new DvtkData.Dul.TransferSyntax(ts));
                }
            }
            else
            {
                theSelectTransferSyntaxesForm.SupportedTransferSyntaxes.Add(new DvtkData.Dul.TransferSyntax("1.2.840.10008.1.2"));
            }

            theSelectTransferSyntaxesForm.DefaultTransferSyntaxesList = tsList;
            theSelectTransferSyntaxesForm.DisplaySelectAllButton = true;
            theSelectTransferSyntaxesForm.DisplayDeSelectAllButton = true;

            theSelectTransferSyntaxesForm.selectSupportedTS();
            theSelectTransferSyntaxesForm.ShowDialog(this);

            if (theSelectTransferSyntaxesForm.SupportedTransferSyntaxes.Count == 0)
            {
                selectedTS.Clear();

                string theWarningText = "No Transfer Syntax is selected, default ILE will be supported.";
                MessageBox.Show(theWarningText, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                selectedTS.Clear();

                foreach (DvtkData.Dul.TransferSyntax ts in theSelectTransferSyntaxesForm.SupportedTransferSyntaxes)
                {
                    selectedTS.Add(ts.UID);
                }
            }
        }
Beispiel #2
0
        private void buttonCommitTS_Click(object sender, EventArgs e)
        {
            SelectTransferSyntaxesForm theSelectTransferSyntaxesForm = new SelectTransferSyntaxesForm();

            ArrayList tsList = new ArrayList();
            tsList.Add(DvtkData.Dul.TransferSyntax.Implicit_VR_Little_Endian);
            tsList.Add(DvtkData.Dul.TransferSyntax.Explicit_VR_Big_Endian);
            tsList.Add(DvtkData.Dul.TransferSyntax.Explicit_VR_Little_Endian);

            if (selectedTSCommit.Count != 0)
            {
                foreach (string ts in selectedTSCommit)
                {
                    theSelectTransferSyntaxesForm.SupportedTransferSyntaxes.Add(new DvtkData.Dul.TransferSyntax(ts));
                }
            }
            else
            {
                theSelectTransferSyntaxesForm.SupportedTransferSyntaxes.Add(new DvtkData.Dul.TransferSyntax("1.2.840.10008.1.2"));
            }

            theSelectTransferSyntaxesForm.DefaultTransferSyntaxesList = tsList;
            theSelectTransferSyntaxesForm.DisplaySelectAllButton = false;
            theSelectTransferSyntaxesForm.DisplayDeSelectAllButton = false;

            theSelectTransferSyntaxesForm.selectSupportedTS();
            theSelectTransferSyntaxesForm.ShowDialog(this);

            if (theSelectTransferSyntaxesForm.SupportedTransferSyntaxes.Count == 0)
            {
                selectedTSCommit.Clear();

                string theWarningText = "No Transfer Syntax is selected, default ILE will be supported.";
                MessageBox.Show(theWarningText, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                selectedTSCommit.Clear();

                foreach (DvtkData.Dul.TransferSyntax ts in theSelectTransferSyntaxesForm.SupportedTransferSyntaxes)
                {
                    selectedTSCommit.Add(ts.UID);
                }
            }
        }