-
大小: 33.87MB文件类型: .gz金币: 1下载: 0 次发布日期: 2023-07-27
- 语言: 其他
- 标签: Ubuntu16.04 PCL依托包
资源简介
安装PCL的时候下的,这个版本的tar.gz文件官网下载容易失败,现在下下来和大家分享一下,有问题可以交流,谢谢大家
代码片段和文件信息
import sys
try:
import numpy
except ImportError:
print(“Numpy (http://numpy.scipy.org) not found.“)
print(“This test requires numpy!“)
from vtk.test import Testing
Testing.skip()
import vtk
from vtk.numpy_interface import dataset_adapter as dsa
from vtk.numpy_interface import algorithms as algs
def test_dataset(ds):
p2c = vtk.vtkPointDataToCellData()
p2c.SetInputData(ds)
p2c.Update()
d1 = dsa.WrapDataobject(p2c.GetOutput())
vtkm_p2c = vtk.vtkmAverageToCells()
vtkm_p2c.SetInputData(ds)
vtkm_p2c.SetInputArrayToProcess(0 0 0 vtk.vtkDataobject.FIELD_ASSOCIATION_POINTS “RTData“)
vtkm_p2c.Update()
d2 = dsa.WrapDataobject(vtkm_p2c.GetOutput())
rtD1 = d1.PointData[‘RTData‘]
rtD2 = d2.PointData[‘RTData‘]
assert (algs.max(algs.abs(rtD1 - rtD2)) < 10E-4)
print(“Testing simple debugging grid...“)
# This dataset matches the example values in vtkmCellSetExplicit:
dbg = vtk.vtkUnstructuredGrid()
dbg.SetPoints(vtk.vtkPoints())
dbg.GetPoints().SetNumberOfPoints(7)
dbg.InsertNextCell(vtk.VTK_TRIANGLE 3 [0 1 2])
dbg.InsertNextCell(vtk.VTK_QUAD 4 [0 1 3 4])
dbg.InsertNextCell(vtk.VTK_TRIANGLE 3 [1 3 5])
dbg.InsertNextCell(vtk.VTK_LINE 2 [5 6])
dbgRt = vtk.vtkDoubleArray()
dbgRt.SetNumberOfTuples(7)
dbgRt.SetName(‘RTData‘)
dbgRt.SetValue(0 17.40)
dbgRt.SetValue(1 123.0)
dbgRt.SetValue(2 28.60)
dbgRt.SetValue(3 19.47)
dbgRt.SetValue(4 3.350)
dbgRt.SetValue(5 0.212)
dbgRt.SetValue(6 1023.)
dbg.GetPointData().AddArray(dbgRt)
test_dataset(dbg)
print(“Success!“)
print(“Testing homogeneous image data...“)
source = vtk.vtkRTAnalyticSource()
source.Update()
imgData = source.GetOutput()
test_dataset(imgData)
print(“Success!“)
d = dsa.WrapDataobject(imgData)
rtData = d.PointData[‘RTData‘]
rtMin = algs.min(rtData)
rtMax = algs.max(rtData)
clipScalar = 0.5 * (rtMin + rtMax)
print(“Testing non-homogenous unstructured grid...“)
clip = vtk.vtkClipDataSet()
clip.SetInputData(imgData)
clip.SetValue(clipScalar)
clip.Update()
ugrid = clip.GetOutput()
test_dataset(ugrid)
print(“Success!“)
- 上一篇:MIMO技术原理与应用_全书
- 下一篇:authorware完整作品带源码
相关资源
- RTL8822CE_WiFi_linux_v5.7.3_34277_COEX20190531
- Ubuntu16.04下YOLO V3训练自己的数据集超
- cuda 8.0 ubuntu16.04 百度云链接
- CUDA 9.0+cuDNN v7 for Ubuntu 16.04
- Hadoop安装ubuntu16.04+ hadoop-2.9.1.tar.gz+j
- cuda 9.0 ubuntu16.04百度云链接
- ubuntu16.04.txt
- Ubuntu16.04源码安装Mininet
- ubuntu16.04 amd64 make deb安装包
- ubuntu16.04安装包,百度云链接与密码
- Ubuntu16.04以及18.04两个系统的镜像
- Win7 U盘安装Ubuntu16.04 双系统详细教程
- ubuntu16.04.3LTS镜像iso
- SR650+Ubuntu16.04+手动加载Raid-530-930+Gui
- openstack在ubuntu16.04安装最详细教程
- Ubuntu16.04亲测openssl-1.0.2r.tar包,好使!
- Ubuntu16.04 离线安装openssh所需的安装包
- Ubuntu16.04+cuda9.0+cudnn7.05+opencv3.4.0+caff
评论
共有 条评论