• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python vtk.vtkHierarchicalPolyDataMapper函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中vtk.vtkHierarchicalPolyDataMapper函数的典型用法代码示例。如果您正苦于以下问题:Python vtkHierarchicalPolyDataMapper函数的具体用法?Python vtkHierarchicalPolyDataMapper怎么用?Python vtkHierarchicalPolyDataMapper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vtkHierarchicalPolyDataMapper函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: str

# create a rendering window and renderer
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
renWin.StereoCapableWindowOn()
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
reader = vtk.vtkGenericEnSightReader()
# Make sure all algorithms use the composite data pipeline
cdp = vtk.vtkCompositeDataPipeline()
reader.SetDefaultExecutivePrototype(cdp)
reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/blow2_bin.case")
reader.SetTimeValue(1)
geom = vtk.vtkGeometryFilter()
geom.SetInputConnection(reader.GetOutputPort())
mapper = vtk.vtkHierarchicalPolyDataMapper()
mapper.SetInputConnection(geom.GetOutputPort())
mapper.SetColorModeToMapScalars()
mapper.SetScalarModeToUsePointFieldData()
mapper.ColorByArrayComponent("displacement",0)
mapper.SetScalarRange(0,2.08)
actor = vtk.vtkActor()
actor.SetMapper(mapper)
# assign our actor to the renderer
ren1.AddActor(actor)
# enable user interface interactor
iren.Initialize()
ren1.GetActiveCamera().SetPosition(99.3932,17.6571,-22.6071)
ren1.GetActiveCamera().SetFocalPoint(3.5,12,1.5)
ren1.GetActiveCamera().SetViewAngle(30)
ren1.GetActiveCamera().SetViewUp(0.239617,-0.01054,0.97081)
开发者ID:ElsevierSoftwareX,项目名称:SOFTX-D-15-00004,代码行数:31,代码来源:EnSightBlow2Bin.py


示例2: str

# create a rendering window and renderer
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
renWin.StereoCapableWindowOn()
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
reader1 = vtk.vtkEnSightMasterServerReader()
# Make sure all algorithms use the composite data pipeline
cdp = vtk.vtkCompositeDataPipeline()
reader1.SetDefaultExecutivePrototype(cdp)
reader1.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/mandelbrot.sos")
reader1.SetCurrentPiece(0)
geom0 = vtk.vtkGeometryFilter()
geom0.SetInputConnection(reader1.GetOutputPort())
mapper0 = vtk.vtkHierarchicalPolyDataMapper()
mapper0.SetInputConnection(geom0.GetOutputPort())
mapper0.SetColorModeToMapScalars()
mapper0.SetScalarModeToUsePointFieldData()
mapper0.ColorByArrayComponent("Iterations",0)
mapper0.SetScalarRange(0,112)
actor0 = vtk.vtkActor()
actor0.SetMapper(mapper0)
reader2 = vtk.vtkEnSightMasterServerReader()
reader2.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/mandelbrot.sos")
reader2.SetCurrentPiece(1)
geom2 = vtk.vtkGeometryFilter()
geom2.SetInputConnection(reader2.GetOutputPort())
mapper2 = vtk.vtkHierarchicalPolyDataMapper()
mapper2.SetInputConnection(geom2.GetOutputPort())
mapper2.SetColorModeToMapScalars()
开发者ID:ElsevierSoftwareX,项目名称:SOFTX-D-15-00004,代码行数:31,代码来源:EnSightMandelbrot.py


示例3: str

alg.SetDefaultExecutivePrototype(pip)
del pip
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
reader = vtk.vtkEnSightGoldBinaryReader()
reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/naca.bin.case")
reader.SetTimeValue(3)
lut = vtk.vtkLookupTable()
lut.SetHueRange(0.667,0.0)
lut.SetTableRange(0.636,1.34)
geom = vtk.vtkGeometryFilter()
geom.SetInputConnection(reader.GetOutputPort())
blockMapper0 = vtk.vtkHierarchicalPolyDataMapper()
blockMapper0.SetInputConnection(geom.GetOutputPort())
blockActor0 = vtk.vtkActor()
blockActor0.SetMapper(blockMapper0)
ren1.AddActor(blockActor0)
ren1.ResetCamera()
cam1 = ren1.GetActiveCamera()
cam1.SetFocalPoint(0,0,0)
cam1.ParallelProjectionOff()
cam1.Zoom(70)
cam1.SetViewAngle(1.0)
renWin.SetSize(400,400)
iren.Initialize()
alg.SetDefaultExecutivePrototype(None)
# --- end of script --
开发者ID:timkrentz,项目名称:SunTracker,代码行数:30,代码来源:nacaBinary.py


示例4: str

renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
# read data
#
reader = vtk.vtkGenericEnSightReader()
# Make sure all algorithms use the composite data pipeline
cdp = vtk.vtkCompositeDataPipeline()
reader.SetDefaultExecutivePrototype(cdp)
del cdp
reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/office6_bin.case")
reader.Update()

outline = vtk.vtkStructuredGridOutlineFilter()
outline.SetInputConnection(reader.GetOutputPort())
mapOutline = vtk.vtkHierarchicalPolyDataMapper()
mapOutline.SetInputConnection(outline.GetOutputPort())
outlineActor = vtk.vtkActor()
outlineActor.SetMapper(mapOutline)
outlineActor.GetProperty().SetColor(0,0,0)
# Create source for streamtubes
streamer = vtk.vtkStreamPoints()
streamer.SetInputConnection(reader.GetOutputPort())
streamer.SetStartPosition(0.1,2.1,0.5)
streamer.SetMaximumPropagationTime(500)
streamer.SetTimeIncrement(0.5)
streamer.SetIntegrationDirectionToForward()
cone = vtk.vtkConeSource()
cone.SetResolution(8)
cones = vtk.vtkGlyph3D()
cones.SetInputConnection(streamer.GetOutputPort())
开发者ID:0004c,项目名称:VTK,代码行数:31,代码来源:EnSight6OfficeBin.py



注:本文中的vtk.vtkHierarchicalPolyDataMapper函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python vtk.vtkIdList函数代码示例发布时间:2022-05-26
下一篇:
Python vtk.vtkHexahedron函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap