{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Python Interface\n",
    "For the C++ interface, see [here](https://www.open3d.org/docs/release/cpp_api.html).\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": [
    "## Getting started\n",
    "This tutorial shows how to import the `open3d` module and use it to load and inspect a point cloud. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import open3d as o3d"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<div class=\"alert alert-info\">\n",
    "    \n",
    "**Note:** \n",
    "\n",
    "Depending on the environment, the name of the Python library may not be `open3d.so`. Regardless of the file name, `import open3d` should work.\n",
    "\n",
    "</div>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "sample_pcd_data = o3d.data.PCDPointCloud()\n",
    "pcd = o3d.io.read_point_cloud(sample_pcd_data.path)\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 some brief information about the point cloud."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using built-in help function\n",
    "\n",
    "### Browse Open3D\n",
    "`help(open3d)` prints a description of the `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 a 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
}
