{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Python Interface\n", "For the C++ interface see [here](../C++/cplusplus_interface.rst)\n", "\n", "## Install open3d Python package\n", "For installing Open3D Python package, see [here](../../getting_started.rst).\n", "\n", "## Install open3d from source\n", "For installing from source, see [here](../../compilation.rst)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Install open3d from source\n", "This tutorial shows how to import the `open3d` module and print out help information. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import open3d as o3d" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", " \n", "**Note:** \n", "\n", "Depending on environment, the name of Python library may not be `open3d.so`. Regardless of the file name, `import open3d` should work.\n", "\n", "
" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "pcd = o3d.io.read_point_cloud(\"../../TestData/ICP/cloud_bin_0.pcd\")\n", "print(pcd)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This imports the `read_point_cloud` function from the `open3d` module. It reads a point cloud file and returns an instance of the `PointCloud` class. `print(pcd)` prints brief information of the point cloud." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using built-in help function\n", "\n", "### Browse open3d\n", "`help(open3d)` prints documents of `open3d` module." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "help(o3d)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Description of a class in open3d\n", "`help(open3d.PointCloud)` provides description of the `PointCloud` class." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "help(o3d.geometry.PointCloud)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Description of a function in open3d\n", "`help(open3d.read_point_cloud)` provides a description of the input arguments and return type of the `read_point_cloud function`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "help(o3d.io.read_point_cloud)" ] } ], "metadata": { "celltoolbar": "Edit Metadata", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 2 }