Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
fix: StatisticalOutlierRemoval has no filter method
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxuhai committed Aug 28, 2022
1 parent b76aff0 commit 2b612ea
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://pcljs.org" target="_blank"><img style="height: 100px" src="./pcljs.png" title="pcl.js" alt="title="pcl.js"></a>
<a href="https://pcljs.org/zh-cn" target="_blank"><img style="height: 100px" src="./pcljs.png" title="pcl.js" alt="title="pcl.js"></a>
<p align="center">用于浏览器的<a href="https://github.com/PointCloudLibrary/pcl" target="_blank">点云库 (PCL)</a>,由 WebAssembly 提供支持。</p>
</p>
<p align="center">
Expand Down Expand Up @@ -45,7 +45,7 @@
- [讨论](https://github.com/luoxuhai/pcl.js/discussions)

## 支持的环境
> https://developer.mozilla.org/en-US/docs/WebAssembly#browser_compatibility
> https://developer.mozilla.org/zh-CN/docs/WebAssembly#browser_compatibility
| <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_128x128.png" alt="Edge" width="48px" height="48px" /><br/> Edge | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_128x128.png" alt="Firefox" width="48px" height="48px" /><br/>Firefox | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_128x128.png" alt="Chrome" width="48px" height="48px" /><br/>Chrome | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_128x128.png" alt="Safari" width="48px" height="48px" /><br/>Safari | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_128x128.png" alt="Opera" width="48px" height="48px" /><br/>Opera | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/node.js/node.js_128x128.png" alt="Opera" width="48px" height="48px" /><br/>Node.js | <img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/deno/deno_128x128.png" alt="Deno" width="48px" height="48px" /> <br/> Deno |
| --------- | --------- | --------- | --------- | --------- | --------- | --------- |
Expand Down Expand Up @@ -130,7 +130,7 @@ async function main() {
// 获取 PCD 文件
const pcd = await fetch('https://cdn.jsdelivr.net/gh/luoxuhai/pcl.js@master/data/rops_tutorial/points.pcd').then(res => res.arrayBuffer());
// 写入 PCD 文件
pcl.fs.writeFile('/test.pcd', pcd);
pcl.fs.writeFile('/test.pcd', new Uint8Array(pcd));
// 加载 PCD 文件,返回点云对象
const pointCloud = pcl.io.loadPCDFile('/test.pcd');

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function main() {
// Get PCD file
const pcd = await fetch('https://cdn.jsdelivr.net/gh/luoxuhai/pcl.js@master/data/rops_tutorial/points.pcd').then(res => res.arrayBuffer());
// Write a PCD file
pcl.fs.writeFile('/test.pcd', pcd);
pcl.fs.writeFile('/test.pcd', new Uint8Array(pcd));
// Load PCD file, return point cloud object
const pointCloud = pcl.io.loadPCDFile('/test.pcd');

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "jest",
"lint": "eslint .",
"prepare": "husky install",
"release": "yarn build && semantic-release"
"release": "yarn build && dotenv -e .env -- semantic-release --no-ci"
},
"lint-staged": {
"*.{js,ts}": [
Expand Down
4 changes: 4 additions & 0 deletions src/modules/filters/FilterBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class FilterBase {
public getInputCloud(): PointCloud | null {
return this.native.getInputCloud() as PointCloud | null;
}

public filter(output: PointCloud) {
return this.native.filter(output);
}
}

export default FilterBase;
4 changes: 0 additions & 4 deletions src/modules/filters/PassThrough.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ class PassThrough extends FilterBase {
public setUserFilterValue(value: number) {
return this.native.setNegative(value);
}

public filter(output: PointCloud) {
return this.native.filter(output);
}
}

export default PassThrough;
4 changes: 0 additions & 4 deletions src/modules/filters/VoxelGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class VoxelGrid extends FilterBase {
public setLeafSize(lx: number, ly: number, lz: number) {
return this.native.setLeafSize(lx, ly, lz);
}

public filter(output: PointCloud) {
return this.native.filter(output);
}
}

export default VoxelGrid;
3 changes: 1 addition & 2 deletions website/src/pages/examples/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import clsx from 'clsx';

import styles from './index.module.scss';

const commonOptions =
'file=page2.html&hideExplorer=1&hideNavigation=1&view=preview';
const commonOptions = 'file=main.js&hideNavigation=1&view=preview';

const exampleList = [
{
Expand Down

1 comment on commit 2b612ea

@vercel
Copy link

@vercel vercel bot commented on 2b612ea Aug 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pcl-js – ./

pcl-js-darkce.vercel.app
pcl-js-git-master-darkce.vercel.app
pcljs.org
www.pcljs.org

Please sign in to comment.