diff --git a/GettingStarted.md b/GettingStarted.md index 8766d1aba..960fab451 100644 --- a/GettingStarted.md +++ b/GettingStarted.md @@ -1,5 +1,4 @@ -Getting started -=============== +# Getting started Here are suggested steps for the RTK beginner. diff --git a/INSTALLATION.md b/INSTALLATION.md index e3ced9d55..baab652a5 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -1,8 +1,6 @@ -RTK installation -================ +# RTK installation -Configuration, compilation and installation with ITK ----------------------------------------------------- +## Configuration, compilation and installation with ITK RTK is a module of [ITK](https://www.itk.org), the Insight Toolkit. Follow the instructions of the [ITK software guide](https://itk.org/ITKSoftwareGuide/html) ([chapter 2](https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch2.html) mainly) for configuring and compiling ITK. The following CMake options are RTK specific: * `Module_RTK`: Activates RTK download and compilation. Default is `OFF`. Turn it `ON` to activate RTK or compile RTK independently (see below). @@ -15,8 +13,7 @@ RTK is a module of [ITK](https://www.itk.org), the Insight Toolkit. Follow the i RTK will automatically be installed when installing ITK. -Independent configuration and compilation ------------------------------------------ +## Independent configuration and compilation For RTK developpers, it may be useful to compile RTK independently from ITK. This is possible, simply: * Compile ITK with `Module_RTK=OFF`. * If you want to use CUDA, also activate `Module_CudaCommon` or compile it separately as RTK in the following two bullet points (cloning its [GitHub repository](https://github.com/RTKConsortium/ITKCudaCommon) or downloading it as a [zip package](https://codeload.github.com/RTKConsortium/ITKCudaCommon/zip/main)). @@ -25,8 +22,7 @@ For RTK developpers, it may be useful to compile RTK independently from ITK. Thi Installation is currently not supported for independent RTK compilations. -Pre-compiled binaries ---------------------- +## Python pre-compiled binaries We only provide pre-compiled binaries for the Python package which depends on ITK. Use the following commands to install the RTK module with `pip`. ``` python -m pip install --upgrade pip @@ -42,6 +38,40 @@ python -m pip install itk-rtk-cuda124 python -m pip install itk-rtk-cuda124 ``` -Getting started ---------------- +### GUI tools +Some RTK command-line tools, such as `rtkshowgeometry`, require graphical visualization capabilities. To use these tools, install the GUI optional dependencies: +``` +python -m pip install itk-rtk[gui] +``` + +This installs: +* `pyvista` - for 3D visualization +* `matplotlib` - for additional graphics support + +### Testing +To run RTK Python tests with pytest, install the test dependencies from the directory containing `pyproject.toml`: + +``` +pip install --group test +``` + +This installs: +* `pytest>=7.0` - for running Python unit tests +* `matplotlib` - for visualization in tests + +After installing, run the tests with: +``` +pytest test/ +``` + +### Documentation +To build the RTK documentation, install the documentation dependencies from the directory containing `pyproject.toml`: + +``` +pip install --group doc +``` + +This installs Sphinx and related tools for documentation generation. + +## Getting started See [GettingStarted.md](GettingStarted.md). Your `CMakeLists.txt` can now use RTK when importing ITK as shown in the [FirstReconstruction's CMakeLists.txt](https://github.com/RTKConsortium/RTK/blob/main/examples/FirstReconstruction/CMakeLists.txt#L7). diff --git a/README.md b/README.md index 69caef0ba..09a27ca0c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -RTK: The Reconstruction ToolKit -=============================== +# RTK: The Reconstruction ToolKit [![GitHub release](https://img.shields.io/github/release/RTKConsortium/RTK.svg)](https://github.com/RTKConsortium/RTK/releases/latest) [![PyPI](https://img.shields.io/pypi/v/itk-rtk.svg)](https://pypi.python.org/pypi/itk-rtk) @@ -11,8 +10,7 @@ RTK: The Reconstruction ToolKit [gha-link]: https://github.com/RTKConsortium/RTK/actions/workflows/build-test-package.yml -Links ------ +## Links * [Homepage](https://www.openrtk.org) * [Download](https://www.openrtk.org/RTK/resources/software.html) @@ -22,8 +20,7 @@ Links * [Issue tracking](https://github.com/RTKConsortium/RTK/issues) -Copyright RTK Consortium ------------------------- +## Copyright RTK Consortium Licensed under the Apache License, Version 2.0 (the "[License](https://www.apache.org/licenses/LICENSE-2.0.txt)"); you may not use diff --git a/applications/rtkshowgeometry/README.md b/applications/rtkshowgeometry/README.md index 0565b4a3e..7eeac271e 100644 --- a/applications/rtkshowgeometry/README.md +++ b/applications/rtkshowgeometry/README.md @@ -4,6 +4,16 @@ ![geom](../../documentation/docs/ExternalData/ShowGeometry.png){w=800 alt="Show Geometry"} +## Installation + +`rtkshowgeometry` requires the GUI optional dependencies. Install RTK with GUI support using: + +```bash +pip install itk-rtk[gui] +``` + +## Usage + All geometries described in the [documentation](../../documentation/docs/Geometry.md) are supported: cone-beam and parallel (`SDD = 0`), flat and cylindrical (`RadiusCylindricalDetector > 0`) detectors. If no projections are given, the detector size defaults to 40% of the Source-to-Isocenter Distance (SID) and is centered around point `(u,v)=(0,0)`. ```{literalinclude} showgeometry.sh diff --git a/examples/README.md b/examples/README.md index 48aeaf70a..d6d775f18 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,5 +1,4 @@ -C++ / Python examples -======== +# C++ / Python examples This section provides a collection of C++ and Python code examples to demonstrate how to effectively use RTK in various applications. diff --git a/index.md b/index.md index a14fe2085..a954c6d77 100644 --- a/index.md +++ b/index.md @@ -1,5 +1,4 @@ -The Reconstruction Toolkit (RTK) -================================ +# The Reconstruction Toolkit (RTK) RTK is an open-source and cross-platform software for fast circular cone-beam CT reconstruction based on the Insight Toolkit (ITK). RTK is developed by the RTK consortium. diff --git a/pyproject.toml b/pyproject.toml index 7db108f2f..0cbf3706e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,12 @@ dependencies = [ "itk == 5.4.*", ] +[project.optional-dependencies] +gui = [ + "pyvista", + "matplotlib" +] + [project.scripts] rtkadmmtotalvariation = "itk.rtkadmmtotalvariation:main" rtkadmmwavelets = "itk.rtkadmmwavelets:main" @@ -152,3 +158,13 @@ minimum-version = "0.8.2" # The build directory. Defaults to a temporary directory, but can be set. build-dir = "build/{wheel_tag}" + +[dependency-groups] +test = ["pytest>=7.0", "matplotlib"] +doc = [ + "furo", + "myst-parser[linkify]", + "sphinx>=7.2.6", + "sphinx-copybutton", + "sphinx-design", +]