/// <summary>
        /// 1er constructeur(pour des extension non connues)
        /// </summary>
        /// <param name="caracteristique_exam"></param>
        /// <param name="parent"></param>
        /// <param name="nom_fichier"></param>


        public ImageBox(Examen caracteristique_exa, MainForm parent, string nom_fichier)
        {
            InitializeComponent();
            this.label1.Hide();
            this.Text   = Path.GetFileName(nom_fichier);
            this.parent = parent;

            init();
            this.caracteristique_exam = caracteristique_exa;

            statu_format.Text      = "Format :" + caracteristique_exa.nb_ligne + "X" + caracteristique_exa.nb_colon + "   ";
            statu_nb_image.Text    = "Nbre Images :" + caracteristique_exa.nb_image + "   ";
            statu_type_examen.Text = "Type exam :" + caracteristique_exa.type_ex + "   ";


            this.nom_fichier = nom_fichier;

            num_dossier  = MainForm.num_forme_creer++;
            nom_palette  = MainForm.palette_par_defaut;
            nom_dossier += "" + num_dossier + "\\";


            Directory.CreateDirectory(nom_dossier);

            /*fichier_tomo_bim = nom_dossier + "tomo.bim";
             * fichier_sinog_bim = nom_dossier + "sinog.bim";
             * int nb_total = caracteristique_exam.nb_colon * caracteristique_exam.nb_ligne * caracteristique_exam.nb_image;
             * int nb_total2 = caracteristique_exam.nb_colon * caracteristique_exam.nb_colon * caracteristique_exam.nb_ligne;
             *
             * byte[] t_tomo = new byte[nb_total2];
             * for (int i = 0; i < nb_total2; i++)
             * {
             *  t_tomo[i] = 1;
             * }
             *
             * Stream buff_tomo = new FileStream(fichier_tomo_bim, FileMode.CreateNew, FileAccess.Write);
             * buff_tomo.Write(t_tomo, 0, nb_total2);
             * buff_tomo.Close();
             *
             * byte[] t_sinog = new byte[nb_total];
             * for (int i = 0; i < nb_total; i++)
             * {
             *  t_sinog[i] = 1;
             * }
             *
             * Stream buff_sinog = new FileStream(fichier_sinog_bim, FileMode.CreateNew, FileAccess.Write);
             * buff_sinog.Write(t_sinog, 0, nb_total);
             * buff_sinog.Close();*/
            this.BringToFront();
        }
        private void b_reconst_Click(object sender, EventArgs e)
        {
            int n = (int)(Math.Log(MainForm.forme_active.caracteristique_exam.nb_image) / Math.Log(2));

            parent.desactiver_activer_osem(n, true);
            if (MainForm.forme_active == null)
            {
                string msg = "Activer d'abord une fenêtre d'examen";
                MessageBox.Show(msg, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (MainForm.forme_active.b_image.Image == null)
            {
                return;
            }
            if ((MainForm.forme_active.caracteristique_exam == null) || (MainForm.forme_active.caracteristique_exam.type_ex != Examen.type_examen.tomographique))
            {
                this.Dispose();
                string msg = "Cet examen n'est pas tomographique!";
                MessageBox.Show(msg, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            label2.Show();
            label2.Update();
            label2.Refresh();

            int nb_colon = MainForm.forme_active.caracteristique_exam.nb_colon;
            int nb_ligne = MainForm.forme_active.caracteristique_exam.nb_ligne;
            int nb_image = MainForm.forme_active.caracteristique_exam.nb_image;

            int nb_iteration = (int)nombre_itéra.Value;

            this.b_reconst.Cursor = System.Windows.Forms.Cursors.WaitCursor;


            Examen exam = new Examen(nb_colon, nb_colon, nb_ligne, Examen.type_examen.None, MainForm.forme_active.caracteristique_exam.entier,
                                     MainForm.forme_active.caracteristique_exam.positif, MainForm.forme_active.caracteristique_exam.debut,
                                     MainForm.forme_active.caracteristique_exam.taille, MainForm.forme_active.caracteristique_exam.angle_pi_test,
                                     MainForm.forme_active.caracteristique_exam.nbr_oct_valeur, MainForm.forme_active.caracteristique_exam.swap,
                                     MainForm.forme_active.caracteristique_exam.rvb);


            int nb_total = exam.nb_colon * exam.nb_colon * exam.nb_ligne;

            ImageBox childform = new ImageBox(exam, parent, MainForm.forme_active.nom_fichier);

            MainForm.nb_forme_cree++;
            childform.MdiParent = parent;

            MainForm.btofront = false;
            childform.Show();
            MainForm.btofront = true;

            int    size      = nb_ligne * nb_image * nb_colon * 4;
            string s         = Util.conversion_fich_non_connu_to_bim(childform.nom_fichier);
            Stream buff_proj = new FileStream(s, FileMode.Open, FileAccess.Read);

            //buff_proj.Seek(size, SeekOrigin.Begin);
            byte[] temp = new byte[size];
            buff_proj.Read(temp, 0, temp.Length);
            MemoryStream w  = new MemoryStream(temp, false);
            BinaryReader br = new BinaryReader(w);

            float[] t_proj = new float[size / 4];
            for (int i = 0; i < t_proj.Length; i++)
            {
                t_proj[i] = br.ReadSingle();
            }
            buff_proj.Close();
            br.Close();
            w.Dispose();


            string nom_fic_bim = childform.nom_dossier + Path.GetFileNameWithoutExtension(childform.nom_fichier) + ".bim";

            progressBar1.Show();
            prograss_max         = (int)(nombre_itéra.Value * 2);
            progressBar1.Maximum = prograss_max;
            float[] tomo = new float[nb_total];
            if (capteur == 1)
            {
                childform.Text += " (MLEM/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }

                for (int i = 0; i < nb_iteration; i++)
                {
                    mlem_iteration(t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 2)
            {
                childform.Text += " (ASIRT/Itération n° : " + (int)nombre_itéra.Value + ")";
                float[] tab_s = new float[nb_colon * nb_image];
                remplissage_tab_s(nb_colon, nb_image, exam.angle_pi, ref tab_s);

                for (int i = 0; i < nb_iteration; i++)
                {
                    asirt_iteration(t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim, tab_s);
                }
            }
            if (capteur == 3)
            {
                childform.Text += " (OSEM_1/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }

                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(1, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 4)
            {
                childform.Text += " (OSEM_2/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 2;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(2, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 5)
            {
                childform.Text += " (OSEM_4/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 4;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(4, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 6)
            {
                childform.Text += " (OSEM_8/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 8;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(8, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 7)
            {
                childform.Text += " (OSEM_16/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 16;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(16, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 8)
            {
                childform.Text += " (OSEM_32/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 32;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(32, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 9)
            {
                childform.Text += " (OSEM_64/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 64;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(64, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }
            if (capteur == 10)
            {
                childform.Text += " (OSEM_128/Itération n° : " + (int)nombre_itéra.Value + ")";
                for (int i = 0; i < nb_total; i++)
                {
                    tomo[i] = 1;
                }
                progressBar1.Maximum *= 128;
                for (int i = 0; i < nb_iteration; i++)
                {
                    osem_iteration(128, t_proj, ref tomo, nb_image, nb_colon, nb_ligne, exam.angle_pi, nom_fic_bim);
                }
            }


            Stream       buff_tomo = new FileStream(s, FileMode.Create, FileAccess.Write);
            BinaryWriter bw        = new BinaryWriter(buff_tomo);

            for (int i = 0; i < tomo.Length; i++)
            {
                bw.Write((float)tomo[i]);
            }

            buff_tomo.Close();
            bw.Close();

            Util.créer_image(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), MainForm.forme_active.caracteristique_exam.nb_ligne, MainForm.forme_active.caracteristique_exam.nb_colon,
                             s, MainForm.forme_active.nom_dossier);
            MainForm.forme_active.afficher_image_bim();
            Util.créer_image_palette(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), MainForm.forme_active.nom_dossier);
            MainForm.forme_active.afficher_image_palette();

            System.Threading.Thread.Sleep(100);
            this.Refresh();
            this.b_reconst.Cursor = System.Windows.Forms.Cursors.Default;

            label2.Hide();
            progressBar1.Value = 0;
            progressBar1.Hide();
            this.Hide();
            this.Dispose();
        }
Beispiel #3
0
        /// <summary>
        /// bouton OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void b_ok_Click(object sender, EventArgs e)
        {
            if ((Combo_type.SelectedIndex == 2) && (nbr_image.Value < 2))
            {
                string msg = "Examen tomographique, le nombre d'images doit être > 1";
                MessageBox.Show(msg, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            this.b_ok.Cursor = System.Windows.Forms.Cursors.WaitCursor;

            Examen.type_examen type = Examen.type_examen.statique;
            switch (Combo_type.SelectedIndex)
            {
            case 0: type = Examen.type_examen.statique;
                break;

            case 1: type = Examen.type_examen.dynamique;
                break;

            case 2: type = Examen.type_examen.tomographique;
                break;

            case 3: type = Examen.type_examen.synchronisé;
                break;
            }
            int nbr = 0;

            switch (nbr_oct_valeur.SelectedIndex)
            {
            case 0: nbr = 1;
                break;

            case 1: nbr = 2;
                break;

            case 2: nbr = 4;
                break;
            }
            btn = b_ok;
            this.Hide();
            this.Dispose();

            if (check_rvb.Checked == true)
            {
                string msg = "Image RVB, vous ne pourriez appliquer aucun traitement sur ce type d’examen!";
                MessageBox.Show(msg, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            this.Refresh();
            try
            {
                Examen examen = new Examen((int)nb_ligne.Value, (int)nbr_colon.Value, (int)nbr_image.Value, type, radio_entier.Checked,
                                           radio_positif.Checked, radio_début.Checked, (int)taille.Value, pi.Checked, nbr, check_swap.Checked, check_rvb.Checked);
                ImageBox childform = new ImageBox(examen, parent, parent.currentFileName);
                MainForm.nb_forme_cree++;
                childform.MdiParent = parent;
                MainForm.btofront   = false;
                childform.Show();
                MainForm.btofront = true;



                if (Util.type_fichier(MainForm.forme_active.nom_fichier) == 3)
                {
                    if (examen.rvb == true)
                    {
                        MainForm.forme_active.afficher_image_rvb();
                        parent.l_image.ajouterfichier(MainForm.forme_active.nom_fichier);

                        Util.créer_image_palette(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), MainForm.forme_active.nom_dossier);
                        MainForm.forme_active.afficher_image_palette();
                        return;
                    }
                    else
                    {
                        string s = Util.conversion_fich_non_connu_to_bim(MainForm.forme_active.nom_fichier);
                        Util.créer_image(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), (int)nb_ligne.Value, (int)nbr_colon.Value,
                                         s, MainForm.forme_active.nom_dossier);
                    }
                }
                if (Util.type_fichier(MainForm.forme_active.nom_fichier) == 2)
                {
                    Util.créer_image(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), (int)nb_ligne.Value, (int)nbr_colon.Value,
                                     MainForm.forme_active.nom_fichier, MainForm.forme_active.nom_dossier);
                }

                /*parent.l_image.progressBar.Show();
                 * parent.l_image.progressBar.Value = 1;*/

                MainForm.forme_active.afficher_image_bim();

                parent.l_image.ajouterfichier(MainForm.forme_active.nom_fichier);

                Util.créer_image_palette(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), MainForm.forme_active.nom_dossier);
                MainForm.forme_active.afficher_image_palette();

                this.b_ok.Cursor = System.Windows.Forms.Cursors.Default;
                //System.Threading.Thread.Sleep(100);
                this.Refresh();
                //parent.l_image.progressBar.Hide();
            }
            catch (Exception ex)
            {
                string msg = "Impossible d'afficher l'image:\n" + ex.Message;
                MessageBox.Show(msg, "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        /// <summary>
        /// ouvrir
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void ouvrirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ouvrir_fichier.Filter = "BMP (*.bmp)|*.bmp|JPEG (*.jpg,*.jpeg)|*.jpg;*.jpeg|PNG (*.png)|*.png|TIFF (*.tiff*.tif)|*.tif|GIF (*.gif)|*.gif|S (*.s)|*.s|BIM (*.bim)|*.bim|DICOM (*.dcm,*.dc3,*.dic)|*.dcm;*.dc3;*.dic|Tous les formats (*.*)|*.*";

            if (ouvrir_fichier.ShowDialog() == DialogResult.OK)
            {
                if (nb_forme_cree == 0)
                {
                    activer_fonctionalité(true);
                }

                currentFileName = ouvrir_fichier.FileName;
                int num_type = 0;
                try
                {
                    num_type = Util.type_fichier(ouvrir_fichier.FileName);
                }
                catch (Exception ex1)
                {
                    string msg_2 = "Fichier invalide";
                    MessageBox.Show(msg_2, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    activer_fonctionalité(false);
                    return;
                }

                //bool type = Util.type_dicom(currentFileName);
                switch (num_type)
                {
                case 1:
                    MainForm.btofront = false;
                    ImageBox childform = new ImageBox(this, currentFileName);


                    childform.MdiParent = this;
                    childform.Show();
                    childform.BringToFront();

                    try
                    {
                        childform.afficher_image(ouvrir_fichier.FileName);
                    }
                    catch (Exception ex2)
                    {
                        string msg_3 = "Fichier invalide";
                        MessageBox.Show(msg_3, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        childform.Dispose();
                        activer_fonctionalité(false);
                        return;
                    }
                    nb_forme_cree++;
                    l_image.ajouterfichier(ouvrir_fichier.FileName);


                    string msg = "Vous ne pouvez pas appliquer des modifications pour ce type de fichiers!\n";
                    MessageBox.Show(msg, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    break;

                case 2:
                case 3:
                    MessageBox.Show("Veuillez entrer les paramètres nécessaires du fichier \"" + ouvrir_fichier.SafeFileName + "\" pour l’ouvrir", "Notification",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);

                    caract = new Carateristiques_exam(this, num_type);
                    caract.ShowDialog();

                    if (MainForm.forme_active != null)
                    {
                        MainForm.forme_active.BringToFront();
                    }

                    break;

                case 4:
                    MainForm.btofront = false;
                    int l = 0;
                    try
                    {
                        l = Util.nb_ligne_s(this.currentFileName);
                    }
                    catch (Exception exx)
                    {
                        string msg_1 = "Fichier invalide";
                        MessageBox.Show(msg_1, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        activer_fonctionalité(false);

                        return;
                    }
                    Examen examen = new Examen(l, Util.nb_ligne_s(this.currentFileName), Util.nb_image_s(this.currentFileName), Util.type_exam_s(this.currentFileName), true,
                                               true, false, 512, true, 2, true, false);
                    ImageBox child = new ImageBox(examen, this, this.currentFileName);
                    MainForm.nb_forme_cree++;
                    child.MdiParent = this;
                    child.Show();
                    child.BringToFront();

                    string s = Util.conversion_S_to_bim(MainForm.forme_active.nom_fichier);

                    Util.créer_image(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), Util.nb_ligne_s(MainForm.forme_active.nom_fichier), Util.nb_ligne_s(MainForm.forme_active.nom_fichier),
                                     s, MainForm.forme_active.nom_dossier);
                    MainForm.forme_active.afficher_image_bim();

                    this.l_image.ajouterfichier(MainForm.forme_active.nom_fichier);

                    Util.créer_image_palette(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), MainForm.forme_active.nom_dossier);
                    MainForm.forme_active.afficher_image_palette();
                    break;

                case 5:
                    MainForm.btofront = false;

                    int    l1      = Util.nb_ligne_bmp(this.currentFileName);
                    int    c1      = Util.nb_colon_bmp(this.currentFileName);
                    Examen examen1 = new Examen(l1, c1, 1, Examen.type_examen.statique, true,
                                                false, true, 1078, false, 1, false, false);
                    ImageBox child1 = new ImageBox(examen1, this, this.currentFileName);
                    MainForm.nb_forme_cree++;
                    child1.MdiParent = this;
                    child1.Show();
                    child1.BringToFront();
                    MainForm.forme_active.bmp256 = true;
                    string s2 = Util.convrsion_BMP_to_bim(MainForm.forme_active.nom_fichier);
                    Util.créer_image(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), l1, c1,
                                     s2, MainForm.forme_active.nom_dossier);
                    MainForm.forme_active.afficher_image_bim();

                    this.l_image.ajouterfichier(MainForm.forme_active.nom_fichier);

                    Util.créer_image_palette(Util.créer_tableu_valeur_pour_palette(MainForm.palette_par_defaut), MainForm.forme_active.nom_dossier);
                    MainForm.forme_active.afficher_image_palette();


                    break;

                case 6:

                    MainForm.btofront = false;
                    try
                    {
                        Dicom.info_DCM(this.currentFileName);
                    }
                    catch (Exception ex4)
                    {
                        string msg_5 = "Fichier invalide";
                        MessageBox.Show(msg_5, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        activer_fonctionalité(false);

                        return;
                    }
                    bool rvb = false;
                    if (Dicom.m == 2)
                    {
                        rvb = true;
                    }
                    else
                    {
                        if ((Dicom.m == 0) || (Dicom.m == 1))
                        {
                            rvb = false;
                        }
                    }

                    if (Dicom.m == 4)
                    {
                        string msg_6 = "Fichier compressé, affichage impossible!";
                        MessageBox.Show(msg_6, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        //activer_fonctionalité(false);
                        return;
                    }
                    if (Dicom.m == 3)
                    {
                        string msg_6 = "PaletteColor, affichage impossible!";
                        MessageBox.Show(msg_6, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        //activer_fonctionalité(false);
                        return;
                    }

                    int tail = Dicom.tail_entet;    // (int)(((int)new System.IO.FileInfo(currentFileName).Length) - (Dicom.nb_colon * Dicom.nb_ligne * Dicom.nbr_oct_valeur));
                    Examen.type_examen type_ex;
                    if (Dicom.n == 5)
                    {
                        type_ex = Examen.type_examen.tomographique;
                    }
                    else
                    {
                        if (Dicom.n == 6)
                        {
                            type_ex = Examen.type_examen.dynamique;
                        }
                        else
                        {
                            if (Dicom.n == 7)
                            {
                                type_ex = Examen.type_examen.synchronisé;
                            }
                            else
                            {
                                type_ex = Examen.type_examen.statique;
                            }
                        }
                    }
                    Examen examen2 = new Examen(Dicom.nb_ligne, Dicom.nb_colon, Dicom.nb_image, type_ex /* Examen.type_examen.tomographique*/, true,
                                                false, true, tail, false, Dicom.nbr_oct_valeur, false, rvb);

                    ImageBox child2 = new ImageBox(examen2, this, this.currentFileName);

                    MainForm.nb_forme_cree++;
                    child2.MdiParent = this;
                    child2.Show();
                    string palette         = Application.StartupPath + "\\utilitaire\\";
                    string palette_négatif = Application.StartupPath + "\\utilitaire\\";
                    string s3 = null;
                    if (Dicom.m == 2)
                    {
                        palette += "BMPpalc.pal";
                        MainForm.forme_active.afficher_image_rvb();
                        string msg1 = "Image RVB, vous ne pourriez appliquer aucun traitement sur ce type d’examen!";
                        MessageBox.Show(msg1, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        s3 = Util.convrsion_DCM_bim(MainForm.forme_active.nom_fichier);
                        if (s3 == null)
                        {
                            return;
                        }



                        if (Dicom.m == 0)
                        {
                            palette         += "BMPpalg.pal";
                            palette_négatif += "BMPpalgn.pal";
                        }
                        if (Dicom.m == 1)
                        {
                            palette         += "BMPpalgn.pal";
                            palette_négatif += "BMPpalg.pal";
                        }
                    }
                    child2.palette_non_negatif = palette;
                    child2.palette_negatif     = palette_négatif;


                    if ((Dicom.m == 0) || (Dicom.m == 1))
                    {
                        Util.créer_image(Util.créer_tableu_valeur_pour_palette(palette), Dicom.nb_ligne, Dicom.nb_colon,
                                         s3, MainForm.forme_active.nom_dossier);
                        MainForm.forme_active.afficher_image_bim();
                    }

                    this.l_image.ajouterfichier(MainForm.forme_active.nom_fichier);

                    Util.créer_image_palette(Util.créer_tableu_valeur_pour_palette(palette), MainForm.forme_active.nom_dossier);
                    MainForm.forme_active.afficher_image_palette();

                    break;
                }



                //si on a appuier sur annuler dans la forme caracteristique
                if (etat3 == false)
                {
                    etat3 = true; return;
                }

                if ((MainForm.forme_active.caracteristique_exam != null) && (MainForm.forme_active.caracteristique_exam.type_ex == Examen.type_examen.tomographique) && (reconstructionToolStripMenuItem.Enabled == false))
                {
                    reconstructionToolStripMenuItem.Enabled = true;
                }

                if (etat == false)
                {
                    outl           = new Outils(this);
                    outl.MdiParent = this;
                    etat           = true;
                }
                if (etat2 == false)
                {
                    multi           = new Multi_images(this);
                    multi.MdiParent = this;
                    etat2           = true;
                }
                outilsToolStripMenuItem.Checked      = true;
                multiimagesToolStripMenuItem.Checked = true;
                outl.Show();
                multi.Show();
                //this.ActivateMdiChild(MainForm.forme_active);
            }
        }