コード例 #1
0
ファイル: c3DObject_Plate2D.cs プロジェクト: cyrenaique/HCSA
        public cFeedBackMessage Run(c3DNewWorld _3DWorld)
        {
            if (this.Input == null)
            {
                FeedBackMessage.IsSucceed = false;
                FeedBackMessage.Message = "No input data table defined.";
                return FeedBackMessage;
            }

            ListObjects = new cListGeometric3DObject("Plate MetaObject");

            cImage I = this.Input.GetClassColorImage();

              //  cDisplaySingleImage DSI = new cDisplaySingleImage();
              //  DSI.SetInputData(I);
              //  DSI.Run();

            c3DTexturedPlan PlateTexture = new c3DTexturedPlan(new cPoint3D(0, 0, 0), I);

            //c3DTexturedPlan PlateTexture = new c3DTexturedPlan(new cPoint3D(0,0,0),this.Input.GetColorImage());
            PlateTexture.SetName(Input.GetShortInfo());
            PlateTexture.Tag = this.Input;
             //   List<byte[][]> TmpLut = new List<byte[][]>();
              //  TmpLut.Add(cGlobalInfo.CurrentPlateLUT);
              //  PlateTexture.LUT = TmpLut ;
            PlateTexture.Run();

            ListObjects.AddObject(PlateTexture);
            ListObjects[0].Tag = ListObjects.Tag = this.Input;

            ListObjects.AddObject(new c3DText(this.Input.GetName(), new cPoint3D(-12-1.2, -8-1.2, 0.2), Color.Black, 70));

            return base.FeedBackMessage;
        }
コード例 #2
0
ファイル: cViewer3D.cs プロジェクト: cyrenaique/HCSA
        public void CurrentPanel_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(cImage)))
            {
                cImage SourceImage = (cImage)e.Data.GetData(typeof(cImage));

                if (SourceImage.Depth > 1)
                {
                    int CurrentChannel = 1;

                    UserControlSingleLUT SingleLUT = (UserControlSingleLUT)SourceImage.AssociatedImagePanel.LUTManager.panelForLUTS.Controls[CurrentChannel];
                    Input.AddVolume3D(new cVolumeRendering3D(SourceImage.SingleChannelImage[CurrentChannel], new cPoint3D(0, 0, 0), SingleLUT.SelectedLUT, Input));
                }
                else
                {

                    c3DTexturedPlan _3DPlan = new c3DTexturedPlan(new cPoint3D(0, 0, 0), SourceImage);
                    _3DPlan.Run();
                    Input.AddGeometric3DObject(_3DPlan);

                }

                this.iren.Render();
            }
            else if (e.Data.GetDataPresent(typeof(cListWells)))
            {

                cListWells TmpList = (cListWells)e.Data.GetData(typeof(cListWells));

                if (MessageBox.Show("Do you want perform this opereation at a single cell level ?", "3D Drop", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    TmpList.BuildAndDisplaySingleCell3DScatterCloud(this);
                }
                else
                {
                    cExtendedTable TB = TmpList.GetAverageDescriptorValues(cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptors(), false, false);

                    c3DPointCloud PC = new c3DPointCloud(TB);
                    PC.Create(new cPoint3D(0, 0, 0));
                    Input.AddGeometric3DObject(PC);
                    this.iren.Render();
                }

            }
        }
コード例 #3
0
ファイル: WindowHCSAnalyzer.cs プロジェクト: cyrenaique/HCSA
        private void basic3DToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cViewer3D V3D = new cViewer3D();
            c3DNewWorld MyWorld = new c3DNewWorld(new cPoint3D(1, 1, 1), new cPoint3D(1, 1, 1));

            c3DTexturedPlan Plan = new c3DTexturedPlan(new cPoint3D(0, 0, 0), new cImage(256, 256, 1, 1));
            Plan.Run();
            MyWorld.AddGeometric3DObject(Plan);

            V3D.SetInputData(MyWorld);
            V3D.Run();

            cDisplayToWindow DTW = new cDisplayToWindow();
            DTW.SetInputData(V3D.GetOutPut());
            DTW.Run();
            DTW.Display();
        }
コード例 #4
0
        private void ToolStripMenuItem_Display3DTexture(object sender, EventArgs e)
        {
            cViewer3D V3D = new cViewer3D();
            c3DNewWorld MyWorld = new c3DNewWorld(new cPoint3D(1, 1, 1), new cPoint3D(1, 1, 1));

            cListGeometric3DObject GlobalList = new cListGeometric3DObject("2D Texture Metaobject");

            c3DTexturedPlan _3DPlan = new c3DTexturedPlan(new cPoint3D(0, 0, 0), this.AssociatedImage);

            //   c3DElevationMap _3DMap = new c3DElevationMap(new cPoint3D(0, 0, 0), this.Input, this.LUT);

            _3DPlan.SetName("2D Texture");
            _3DPlan.Run();
            GlobalList.Add(_3DPlan);

            foreach (var item in GlobalList)
                MyWorld.AddGeometric3DObject(item);

            //  MyWorld.AddLight(Color.White);

            V3D.SetInputData(MyWorld);
            V3D.Run();

            cDisplayToWindow DTW = new cDisplayToWindow();
            DTW.SetInputData(V3D.GetOutPut());
            DTW.Title = "2D texture (" + this.AssociatedImage.Name + ")";
            DTW.Run();
            DTW.Display();
        }