当前位置: 首页 > news >正文

自主式响应网站百度网站排名优化价格

自主式响应网站,百度网站排名优化价格,wordpress 刷新,品牌建设的最高境界1、前言 主要是针对前面有过实现不了交互的情况进行说明,经过一些尝试和分析调用API,总算实现RenderWindowControl函数回调正常串接,当然这个移动处理事件的效果目前也没有确认。 2、使用 vtkImageReslice reslice vtkImageReslice.New();p…

1、前言

        主要是针对前面有过实现不了交互的情况进行说明,经过一些尝试和分析调用API,总算实现RenderWindowControl函数回调正常串接,当然这个移动处理事件的效果目前也没有确认。

2、使用

 vtkImageReslice reslice = vtkImageReslice.New();private void TestInteractorStyle(){vtkMetaImageReader reader = vtkMetaImageReader.New();reader.SetFileName("F:\\code\\VTK\\TestActiViz\\bin\\Debug\\data\\brain.mhd");reader.Update();int[] extent = reader.GetOutput().GetExtent();double[] spacing = reader.GetOutput().GetSpacing();double[] origin = reader.GetOutput().GetOrigin();double[] center = new double[3];center[0] = origin[0] + spacing[0] * 0.5 * (extent[0] + extent[1]);center[1] = origin[1] + spacing[1] * 0.5 * (extent[2] + extent[3]);center[2] = origin[2] + spacing[2] * 0.5 * (extent[4] + extent[5]);double[] axialElements ={1, 0, 0, 0,0, 1, 0, 0,0, 0, 1, 0,0, 0, 0, 1};//提取平行于YZ平面的切片IntPtr ptrData = Marshal.AllocHGlobal(sizeof(double) * axialElements.Length);Marshal.Copy(axialElements, 0, ptrData, axialElements.Length);vtkMatrix4x4 resliceAxes = vtkMatrix4x4.New();resliceAxes.DeepCopy(ptrData);resliceAxes.SetElement(0, 3, center[0]);resliceAxes.SetElement(1, 3, center[1]);resliceAxes.SetElement(2, 3, center[2]);reslice.SetInputData(reader.GetOutput());reslice.SetOutputDimensionality(2);reslice.SetResliceAxes(resliceAxes);reslice.SetInterpolationModeToLinear(); //指定切面提取中的插值方式为线性插值reslice.Update();vtkLookupTable colorTable = vtkLookupTable.New();colorTable.SetRange(0, 1000);colorTable.SetValueRange(0, 1);colorTable.SetSaturationRange(0, 0);colorTable.SetRampToLinear();colorTable.Build();vtkImageMapToColors colorMap = vtkImageMapToColors.New();colorMap.SetLookupTable(colorTable);colorMap.SetInputConnection(reslice.GetOutputPort());colorMap.Update();vtkImageActor orgActor = vtkImageActor.New();orgActor.SetInputData(colorMap.GetOutput());vtkRenderer renderer3 = vtkRenderer.New();renderer3.AddActor(orgActor);renderer3.ResetCamera();renderer3.SetBackground(0.4, 0.5, 0.6);vtkRenderWindow renderWindow = renderWindowControl.RenderWindow;//vtkImageViewer2 imageViewer = vtkImageViewer2.New();//imageViewer.SetSize(500, 500);//vtkRenderWindow renderWindow = imageViewer.GetRenderWindow();renderWindow.AddRenderer(renderer3);vtkRenderWindowInteractor windowInteractor = renderWindow.GetInteractor();windowInteractor.MouseMoveEvt += ImageStyle_MouseMoveEvt;windowInteractor.LeftButtonPressEvt += ImageStyle_LeftButtonPressEvt;windowInteractor.LeftButtonReleaseEvt += ImageStyle_LeftButtonReleaseEvt;renderWindow.Render();}

        实现事件回调的对象是通过控件对象获取:

        这个事件回调处理逻辑就不在复核。你可以自由发挥。

        在事件回调的sender是vtkRenderWindowInteractor,你可以按你的设计去获取或设置一些参数来实现你的想法了。

3、总结

        我尝试过重写这个鼠标事件,可是一个也不触发 ,想了想还是内部没有下发的问题。

        再看这个vteRenderWindow可以获取到交互对象,就把这个交互对象拿出来进行注册事件就可以了。

        猜想可能是这个事件传递到他这里就不下发了(当然啊也可能是一些设置没有开启)。毕竟他这个上面有这么些方法,不过后面还有机会打交道的。

        类注释:
         platform-independent render window interaction including picking and frame rate  control. vtkRenderWindowInteractor provides a platform-independent interaction  mechanism for mouse/key/time events. It serves as a base class for platform-dependent    implementations that handle routing of mouse/key/timer messages to vtkInteractorObserver  and its subclasses. vtkRenderWindowInteractor also provides controls for picking,    rendering frame rate, and headlights. vtkRenderWindowInteractor has changed from   previous implementations and now serves only as a shell to hold user preferences   and route messages to vtkInteractorStyle. Callbacks are available for many events.   
Platform specific subclasses should provide methods for manipulating timers,   TerminateApp, and an event loop if required via Initialize/Start/Enable/Disable.

        独立于平台的渲染窗互,包括拾取和帧速率控制。

        vtkRenderWindowInteractor 为鼠标/键/时间事件提供了一种独立于平台的交互机制。它用作平台相关实现的基类,这些实现处理将鼠标/键/计时器消息路由到 vtkInteractorObserver 及其子类。

        vtkRenderWindowInteractor 还提供了用于拾取、渲染帧速率和前照灯的控件。       

         vtkRenderWindowInteractor 与以前的实现不同,现在仅用作 shell,用于保存用户首选项并将消息路由到 vtkInteractorStyle。回调可用于许多事件。  
特定于平台的子类应提供用于操作计时器、TerminateApp 和事件循环的方法(如果需要)通过 Initialize/Start/Enable/Disable。

http://www.khdw.cn/news/28646.html

相关文章:

  • 虚拟主机与网站建设产品seo怎么优化
  • 手机网站建设制作接app推广接单平台
  • 专做奶粉网站保证一定正品网上找客户有什么渠道
  • 成都网络营销百度竞价关键词怎么优化
  • python做网站内容爬虫成都网站快速优化排名
  • 网站 设计 深圳互联网广告优势
  • 可靠的政府网站建设公司百度贴吧广告投放
  • 深圳网站建设开发营销型网站定制
  • 百度资源seo的工具有哪些
  • 关键词优化网站百度云网盘免费资源
  • 福州做网站公司排名营销型企业网站推广的方法有哪些
  • 网站公司策划书深圳网络络推广培训
  • vs2017 如何做网站樱桃电视剧西瓜视频在线观看
  • 商务网站如何推广关键词排名优化系统
  • 网站建设费用什么意思视频营销的策略与方法
  • 百度建设公司网站宁波网络推广方法
  • 网页的设计与制作seo技术培训唐山
  • 做微网站公司石家庄百度seo排名
  • 百度免费建网站制作网页模板
  • 无锡网站推广优化公司写软文用什么软件
  • 百度域名续费贵州seo培训
  • 地税局内网网站建设营销培训总结
  • 榆林市城乡建设规划网站批量关键词排名查询工具
  • layui做网站前端佣金高的推广平台
  • 外贸局网站seo服务
  • 网站被人抄袭怎么办网络推广营销方案免费
  • 简述建设网站的具体步骤北京官网seo
  • 成都企业网站建设哪家好百度托管运营哪家好
  • 天津市网站建设公司app推广一手单
  • 做一个交易平台网站的成本免费自媒体网站