示例#1
0
        private void Image_Load_Click(object sender, EventArgs e)
        {
            //ImageFromFileToDatabase();

            wgDB.GetAllReferenceImages();

            ImageSelectDialog diag = new ImageSelectDialog();


            for (int i = 0; i < wgDB.m_refImageList.Count(); i++)
            {
                diag.AddImage(wgDB.m_refImageList[i].ImageData, wgDB.m_refImageList[i].Width, wgDB.m_refImageList[i].Height, "test " + i.ToString(), wgDB.m_refImageList[i].ReferenceImageID);
            }

            diag.ShowDialog();

            if (diag.result)
            {
                ReferenceImageContainer refImage;

                bool success = wgDB.GetReferenceImage(diag.databaseID, out refImage);

                if (success)
                {
                    if (m_colorModel.m_maxPixelValue != refImage.MaxPixelValue)
                    {
                        m_colorModel.SetMaxPixelValue(refImage.MaxPixelValue);
                        m_colorModel.BuildColorMap();
                    }

                    SetImage(refImage.ImageData, refImage.Width, refImage.Height);
                }
            }
        }
示例#2
0
        private void Image_Load_Click(object sender, EventArgs e)
        {
            bool success = wgDB.GetAllReferenceImages();

            if (success)
            {
                ImageSelectDialog diag = new ImageSelectDialog();

                foreach (ReferenceImageContainer refImage in wgDB.m_refImageList)
                {
                    diag.AddImage(refImage.ImageData, refImage.Width, refImage.Height, refImage.Description, refImage.ReferenceImageID);
                }

                diag.ShowDialog();

                if (diag.result)
                {
                    LoadReferenceImage(diag.databaseID);
                }
            }
        }