diff --git a/.gitignore b/.gitignore index 3f4d780..7b8c4c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,10 @@ -.vscode - -cpp/generated/ -cpp/build/ - -python/petsird/ -**/__pycache__/ +/cpp/generated/ +/cpp/build/ +/python/petsird/ +__pycache__/ # Common editor backups +/.vscode/ ~$* *~ *.bak diff --git a/README.md b/README.md index 661d827..6db6314 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ The purpose of this repo is to have a simple working example of a data model for PET imaging (list mode data). This is **not complete**, and aspects do not follow the actual proposal of PETSIRD yet. ## Background + The [Emission Tomography Standardization Initiative (ETSI)](https://etsinitiative.org/) is working towards establishing a standard for PET Raw Data, called PETSIRD ("PET ETSI Raw Data"). @@ -17,9 +18,11 @@ in a [VS Code devcontainer](https://code.visualstudio.com/docs/devcontainers/con This codespace/container will contain all necessary tools, including `yardl` itself, as well as the current repository. 2. Browse the [`model`](./model/README.md) directory. 3. Use `yardl` to generate C++ and Python code for the model: - ```sh - cd model - yardl generate - ``` + + ```sh + cd model + yardl generate + ``` + 4. Have a look at (and try!) the examples in the [`cpp`](cpp/README.md) and/or [`python`](python/README.md) directories. diff --git a/cpp/README.md b/cpp/README.md index dad82e2..cd06f6c 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -5,15 +5,15 @@ This directory contains some C++ example code to read/write PETSIRD data. You ne The C++ code shows writing to and reading from an HDF5 file 1. Compile the code: + ```sh - cd /whereever/cpp - mkdir -p build && cd build` - cmake -G Ninja -S .. -DHDF5_ROOT=$CONDA_PREFIX - ninja` + mkdir -p build + cmake -G Ninja -S . -B build -DHDF5_ROOT=$CONDA_PREFIX + ninja ``` + If you did not use `conda` to install HDF5, do not add the `-DHDF5_ROOT=$CONDA_PREFIX` part of the `cmake` line. 2. Run the generator: `./petsird_generator test.h5` 3. Run the analyzer: `./petsird_analysis test.h5` 4. You can inspect the HDF5 file by running `h5dump test.h5` - diff --git a/python/README.md b/python/README.md index a6aa51a..4dc83c6 100644 --- a/python/README.md +++ b/python/README.md @@ -9,7 +9,8 @@ reading it from standard in. This can be used as follows: 1. `python petsird_generator.py | python petsird_analysis.py` There is also a very basic utility to plot the scanner geometry. For instance -``` -python petsird_generator.py > test.bin -python petsird_plot_scanner.py < test.bin` +```sh +python petsird_generator.py > test.bin +python petsird_plot_scanner.py < test.bin +```