Skip to content

Commit

Permalink
Merge pull request #203 from zhujun98/gui
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
zhujun98 authored Sep 18, 2023
2 parents c468c8f + 2840007 commit fa746f6
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 54 deletions.
44 changes: 28 additions & 16 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
A modern C++ compiler supporting C++17 is required.

```sh
module load gcc/11.3.0
```
## From source

## Installing the reconstruction server
We recommend using the [Anaconda](https://www.anaconda.com/download) environment.

### Installing the reconstruction server

On the GPU node `x02da-gpu-1`
On a GPU node (Linux only),

```sh
cd /afs/psi.ch/project/TOMCAT_dev/recastx
git clone --recursive <repo>
git clone --recursive https://github.com/<repo>/recastx.git
cd recastx

conda env create -f environment-recon.yml
conda activate recastx-recon

mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} \
-DBUILD_TEST=ON
module load gcc/11.3.0 # optional
mkdir build-recon && cd build-recon
cmake .. -DCMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
make -j12 && make install
```

## Installing the GUI
### Installing the GUI

On the graphics workstation `x02da-gws-3`
On a graphics node or a laptop (Linux / MacOS),

```sh
cd /afs/psi.ch/project/TOMCAT_dev/recastx
git clone --recursive <repo>
git clone --recursive https://github.com/<repo>/recastx.git
cd recastx

conda env create -f environment-gui.yml
conda activate recastx-gui

module load gcc/11.3.0 # optional
mkdir build-gui && cd build-gui
cmake .. -DCMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} \
-DBUILD_GUI=ON -DBUILD_TEST=ON
-DBUILD_GUI=ON
make -j12 && make install
```
```

## Package managers

TBD

## Deployment

### At TOMCAT

- GPU node: `x02da-gpu-1`
- Graphics workstation: `x02da-gws-3`
- DAQ node: `xbl-daq-36`
Empty file.
70 changes: 33 additions & 37 deletions docs/docs/user_guide/usage.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,62 @@
![architecture](../media/recastx-architecture.png)

### At TOMCAT
## Step 1: Starting the reconstruction server

#### Step 1: Start the GUI
```sh
conda activate recastx-recon
```

Log in (no ssh) onto the graphics workstation `x02da-gws-3` and open a terminal
For a local data source:
```sh
conda activate recastx-gui
recastx-gui --recon-host x02da-gpu-1
recastx-recon --rows 800 --cols 384 --angles 400
```

Or on the Ra cluster, you can only run the OpenGL GUI inside a [NoMachine](https://www.psi.ch/en/photon-science-data-services/remote-interactive-access
) client by
For a remote data source (e.g. DAQ node):
```sh
vglrun recastx-gui --recon-host x02da-gpu-1
recastx-recon --rows 800 --cols 384 --angles 400 --daq-host <hostname>
```
**Note**: there is still a problem of linking the OpenGL GUI on Ra.

Or on a local PC
For more information, type
```sh
ssh -L 9971:localhost:9971 x02da-gpu-1
recastx-recon -h
```

#### Step 2: Start the reconstruction server
## Step 2: Starting the GUI

```sh
conda activate recastx-recon
conda activate recastx-gui
```

# Receiving the data stream and running the GUI both locally
recastx-recon --rows 800 --cols 384 --angles 400
You can specify the reconstruction server
```sh
recastx-gui --recon-host <hostname>
```

# Receiving the data stream from a DAQ node
recastx-recon --daq-host xbl-daq-36 --rows 800 --cols 384 --angles 400
or make use of local port forwarding
```sh
ssh -L 9971:localhost:9971 <hostname>
recastx-gui
```

For more information, type
You can also start the GUI on a node with [NoMachine](https://www.psi.ch/en/photon-science-data-services/remote-interactive-access
) installed
```sh
recastx-recon -h
vglrun recastx-gui --recon-host <hostname>
```

#### Step 3: Stream the data
## Step 3: Streaming the data

**Option1**: Streaming data from files on the GPU node
### Option 1: streaming data from an area detector

Install [foamstream](https://github.com/zhujun98/foamstream.git), and stream real
experimental data, for example, by
```sh
foamstream-tomcat --datafile pet1 --ordered
Contact the corresponding specialists at the facility.

# pet1: recastx-recon --rows 800 --cols 384 --angles 400 --threads 32
# h1: recastx-recon --rows 2016 --cols 288 --angles 500 --threads 32
### Option 2: streaming data from files

```
or stream fake data, for example, by
We recommend using [foamstream](https://github.com/zhujun98/foamstream.git).
```sh
foamstream-tomcat --rows 800 --cols 384 --projections 10000
```

**Option2**: On the DAQ node
pip install foamstream

Start data acquisition with GigaFRoST camera.

### At other facilities
foamstream-tomcat --datafile pet1
```

TBD: a data adaptor should be needed
Please feel free to use your own file streamer as long as the [data protocol](./data_protocol.md) is compatible.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ nav:
- User Guide:
- Getting started: user_guide/usage.md
- GUI: user_guide/gui.md
- Data protocol: user_guide/data_protocol.md
- FAQ: faq.md
theme:
name: material
2 changes: 1 addition & 1 deletion gui/include/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Application {

int width_ = 1440;
int height_ = 1080;
const std::string title_ = "RECASTX - Quasi-3D Real-time Tomographic Reconstruction";
const std::string title_ = "RECASTX - REConstruction of Arbitrary Slabs in Tomography X";

ImVec4 bg_color_ = ImVec4(0.5f, 0.5f, 0.5f, 1.0f);

Expand Down

0 comments on commit fa746f6

Please sign in to comment.