From 93e556bb31fb919697b54e7c537367d323c6dea1 Mon Sep 17 00:00:00 2001 From: Fabrice BESNARD Date: Wed, 17 Mar 2021 16:30:12 +0100 Subject: [PATCH] fix nav issues --- docs/Scanner/docker/index.md | 5 +- docs/Scanner/install/index.md | 2 +- docs/Scanner/install/plant3dexplorer_setup.md | 2 +- docs/Scanner/tutorials/plant_3d_explorer.md | 50 ++++++++++++------- mkdocs.yml | 2 +- 5 files changed, 37 insertions(+), 24 deletions(-) diff --git a/docs/Scanner/docker/index.md b/docs/Scanner/docker/index.md index feae9262..d09791fe 100644 --- a/docs/Scanner/docker/index.md +++ b/docs/Scanner/docker/index.md @@ -11,17 +11,16 @@ We hereafter list the docker containers, their availability and provides link to - [ ] **plantscanner** is not available yet and explanations [there](plantscanner_docker.md) - [ ] **plantinterpreter** is not available yet and explanations [there](plantinterpreter_docker.md) - [ ] **virtualplantscanner** is not available yet and explanations [there](virtualplantscanner_docker.md) - - [x] **plantviewer** is available [here](https://hub.docker.com/repository/docker/roboticsmicrofarms/plantviewer) and explanations [there](plantviewer_docker.md) + - [x] **plant 3d explorer** is available [here](https://hub.docker.com/repository/docker/roboticsmicrofarms/plantviewer) and explanations [there](plant3dexplorer_docker.md) ## Use cases with docker-compose In this section we reference the "real-life" use cases of our software. -### Use the plantviewer on a local database directory +### Use the plant 3d explorer on a local database directory To easiest way to use the plantviewer on a local database directory without installing the ROMI libraries (and their dependencies) is to use the pre-built docker image and add a docker-compose YAML recipe. See [here](docker_compose.md#database--plantviewer) for more details. - ## DockerHub ### roboticsmicrofarms diff --git a/docs/Scanner/install/index.md b/docs/Scanner/install/index.md index 012b8cdf..a73797a0 100644 --- a/docs/Scanner/install/index.md +++ b/docs/Scanner/install/index.md @@ -10,7 +10,7 @@ In the following subsections we will details how to install ROMI software for a 0. Plant scans acquisition using the ROMI plant scanner to a database [here](plant_scanner_setup.md). 0. Plant reconstruction pipelines from existing plant scans in a database [here](plant_reconstruction_setup.md). 0. Virtual plant creation (3D modelling of plant architecture with LPY), virtual scan (mimic plant scanner with blender) & reconstruction (same as 2.) [here](virtual_plant_setup.md). -0. Create a web server hosting the plantviewer GUI [here](visualizer_setup.md). +1. Create a web server hosting the plant 3d explorer GUI [here](./plant3dexplorer_setup.md). !!!note You can find **docker images** for use cases #1, #3 & #5 in the dockerhub repository of the ROMI project [here](https://hub.docker.com/orgs/roboticsmicrofarms/repositories). diff --git a/docs/Scanner/install/plant3dexplorer_setup.md b/docs/Scanner/install/plant3dexplorer_setup.md index 46d61ca2..f1bc60ad 100644 --- a/docs/Scanner/install/plant3dexplorer_setup.md +++ b/docs/Scanner/install/plant3dexplorer_setup.md @@ -5,7 +5,7 @@ To follow this guide you should have a `conda` environment, see [here](create_en For the sake of clarity it will be called `Plant 3d explorer`. !!! note - If you do not want the hassle of having to create environment & install python libraries, there is a pre-built docker image, with usage instructions [here](../docker/plantviewer_docker.md). + If you do not want the hassle of having to create environment & install python libraries, there is a pre-built docker image, with usage instructions [here](../docker/plant3dexplorer_docker.md). ## Pre-requisite diff --git a/docs/Scanner/tutorials/plant_3d_explorer.md b/docs/Scanner/tutorials/plant_3d_explorer.md index 079cfd99..7b8c3b51 100644 --- a/docs/Scanner/tutorials/plant_3d_explorer.md +++ b/docs/Scanner/tutorials/plant_3d_explorer.md @@ -10,7 +10,7 @@ After this tutorial, you should be able to: * For each plant, display, overlay and inspect in 3d every data generated during analysis ## Prerequisite -* install romi `plant 3d explorer` (from [source](https://github.com/romi/3d-plantviewer) or using a [docker image](../docker/plantviewer_docker.md) ) - read [install procedure](../install/plant3dexplorer_setup.md) +* install romi `plant 3d explorer` (from [source](https://github.com/romi/3d-plantviewer) or using a [docker image](../docker/plant3dexplorer_docker.md) ) - read [install procedure](../install/plant3dexplorer_setup.md) * install romi `plantdb` (from [source](https://github.com/romi/romidata) or using a [docker image](../docker/romidb_docker.md)) -- read [install procedure](../install/romidb_setup.md) * install romiscan / romirunner (for the Visualisation task -> to be done) * Create and activate isolated python environment (see [here](/docs/Scanner/install/create_env.md) ) @@ -28,12 +28,33 @@ Principle: the `plant 3d explorer` is a web client that will display in your fav if you prefer using docker only (to avoid installs), skip steps 1. and 2. and read the following procedure [Use docker compose to run both database and 3d explorer with docker containers](../docker/docker_compose.md) -### 1. Connect your database to a local server +### 1. Preparing your database for display by the `plant 3d explorer` +**Starting point:** your *database* is made of one or several *datasets*, which all correspond to a single plant phenotyping experiment: each dataset contains at least raw acquisition 2D images and metadata, and possibly several other data generated by subsequent 3D reconstruction, segmentation and analysis. -- Open a terminal -- if romi commands (like `romi_scanner_rest_api`) are not accessible from your terminal, activate the appropriate python environment (e.g. using venv or conda) required for romi commands (or [read this procedure](../install/create_env.md)) +!!! Note + Your database must follow the rules of romi databases: please make sure that you comply to [requirements](../install/romidb_setup.md) + +*example*: let's consider a database called `my_experiment` containing data for 3 datasets for three plants (named plant1, plant2, plant3). + +- open a terminal and go to your local database directory +- if romi commands (like `romi_run_task`) are not accessible from your terminal, activate the appropriate python environment (e.g. using venv or conda) required for romi commands (or [read this procedure](../install/create_env.md)) +- Process all data for the `plant 3d explorer` by running the following code +```bash +dataset_list=('plant1','plant2','plant3') + +for ds in "${dataset_list[@]}" +do + romi_run_task Visualization path_to/my_experiment/"$ds"/ --config ~/config/ml_pipe_real.toml +done +``` +!!! Note + For more information about using romi_run_task command, the Visualization task and the config file, please read XXXXX. + +**check result**: a new folder called `Visualization` should have been created in each dataset of your database + +### 2. Connect your database to a local server +- Continue in the same shell terminal (if you open a new terminal, do not forget to activate appropriate python environment) - set the DB location using the `DB_LOCATION` environment variable -- make sure that the - launch the flask server: ```bash export DB_LOCATION=/path/to/the/db @@ -41,7 +62,7 @@ romi_scanner_rest_api #command that starts the server ``` The terminal prints various information given by the server (e.g. number of plant phenotyping folder ). Do not -### 2. Connect the `plant 3d explorer `to the server +### 3. Connect the `plant 3d explorer` to the server - Open a new terminal - go to your local cloned directory of `3d-plantviewer/` - start the frontend visualization server by entering: @@ -51,21 +72,14 @@ npm start You should now be able to access the `plant 3d explorer` on [http://localhost:3000](http://localhost:3000). Depending on you system preferences, your default web browser may automatically open a window displaying teh server content. if not, open your web browser and enter [http://localhost:3000](http://localhost:3000) in the url bar. !!! note - You need to add a file `.env.local` at project's root to set the API URL: - ```REACT_APP_API_URL='{`API URL}'``` - + You need to add a file `.env.local` at project's root to set the API URL: ```REACT_APP_API_URL='{`API URL}'```. Without this, the app will use: http://localhost:5000 which is the default for `romi_scanner_rest_api`. -### 2. Preparing your database -To access the data from your running DB (`` from ``) -```bash -dataset_list=('2018-12-17_17-05-35' '2018-12-18_13-14-57' '2018-12-20_13-21-24' '2019-01-29_16-56-01' '2019-02-01_10-56-34') +### 4. Explore your database content via the menu page +describe the main menu page -for ds in "${dataset_list[@]}" -do - romi_run_task Visualization ~/db_test/"$ds"/ --config ~/config/ml_pipe_real_2.toml --local-scheduler -done -``` +### 5. Visualize all data related to a single dataset +describe how to display the main interesting data from a dataset. ## Running a production server for the visualizer diff --git a/mkdocs.yml b/mkdocs.yml index a3e0696c..1fa5d2ee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -46,7 +46,7 @@ nav: - 'Plant scanner software setup': 'Scanner/install/plant_scanner_setup.md' - 'Virtual plants scanner software setup': 'Scanner/install/virtual_plant_setup.md' - 'Plant reconstruction software setup': 'Scanner/install/plant_reconstruction_setup.md' - - 'Visualizer software setup': 'Scanner/install/visualizer_setup.md' + - 'Visualizer software setup': 'Scanner/install/plant3dexplorer_setup.md' - 'Tutorials': - 'Home': 'Scanner/tutorials/index.md' - 'Basics': 'Scanner/tutorials/basics.md'