Skip to content

Commit

Permalink
fix nav issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fabfabBesnard committed Mar 18, 2021
1 parent 7cd35f9 commit d71bb4f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 23 deletions.
5 changes: 2 additions & 3 deletions docs/Scanner/docker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/Scanner/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion docs/Scanner/install/plant3dexplorer_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 32 additions & 18 deletions docs/Scanner/tutorials/plant_3d_explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) )
Expand All @@ -28,20 +28,41 @@ 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
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:
Expand All @@ -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
Expand Down

0 comments on commit d71bb4f

Please sign in to comment.