コード例 #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
        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();
        }