Skip to content

Commit b1dd43a

Browse files
committed
DOC: Convert documentation to ReadTheDocs
1 parent ef905ea commit b1dd43a

143 files changed

Lines changed: 14714 additions & 12 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.readthedocs.yaml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
1-
# Read the Docs configuration file
1+
# Read the Docs configuration file for Sphinx
22
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
33

44
# Required
55
version: 2
66

77
# Set the OS, Python version, and other tools you might need
88
build:
9-
os: ubuntu-24.04
9+
os: ubuntu-22.04
1010
tools:
11-
python: "3.13"
11+
python: "3.11"
12+
jobs:
13+
post_checkout:
14+
# Cancel building pull requests when a new commit is pushed
15+
- |
16+
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git show-ref --verify --quiet "refs/remotes/origin/$READTHEDOCS_VERSION"; then
17+
echo "Canceling build as a newer commit is available"
18+
exit 183
19+
fi
1220
13-
# Build documentation in the "docs/" directory with Sphinx
21+
# Build documentation with Sphinx
1422
sphinx:
15-
builder: html
16-
# configuration: PlusDoc/conf.py
23+
configuration: docs/conf.py
24+
fail_on_warning: false
1725

18-
# Optionally, but recommended,
19-
# declare the Python requirements required to build your documentation
20-
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
21-
# python:
22-
# install:
23-
# - requirements: docs/requirements.txt
26+
# Optionally build your docs in additional formats such as PDF and ePub
27+
formats:
28+
- pdf
29+
- epub
30+
31+
# Python dependencies
32+
python:
33+
install:
34+
- requirements: docs/requirements.txt
2435

docs/CommonCoordinateSystems.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Definition of commonly used coordinate systems
2+
3+
In Plus the following coordinate systems are used commonly:
4+
5+
Reference frame name | Origin | Unit | Axes directions
6+
----------------------|---------|-------|-----------------
7+
Tracker | Origin of the tracking system (position of the field generator, camera, etc.) | mm | as defined by the tracking system manufacturer
8+
Stylus | Origin of the marker that is attached to the pointer tool | mm | as defined by the tracking system / marker manufacturer
9+
Probe | Origin of the marker that is attached to the ultrasound probe (transducer) | mm | as defined by the tracking system / marker manufacturer
10+
Reference | Origin of the marker attached to the object of interest (phantom, cadaver, patient, etc.) | mm | as defined by the tracking system / marker manufacturer
11+
StylusTip | Tip of the stylus | mm | X axis: aligned with the Stylus coordinate system's X axis (unless StylusTip Z axis is parallel with the StylusTip Z axis - in this case the StylusTip Y axis is aligned with the Stylus X axis). <br/> Y axis: chosen to be the cross product of the Z and X axes. <br/> Z axis: the axis that points from the Stylus coordinate system origin towards StylusTip coordinate syste origin.
12+
Image | Position of the pixel that is in the origin of the MF oriented image | pixel | X axis: towards the marked side of the transducer <br/> Y axis: towards the direction that points away (far) from the transducer <br/> Z axis: cross product of X and Y
13+
Transducer| Center of the transducer crystal array | mm | X axis: towards the marked side of the transducer <br/> Y axis: towards the direction that points away (far) from the transducer <br/> Z axis: cross product of X and Y
14+
15+
Coordinate systems overview sketch (3D Slicer compatible interactive 3D model of the figure below is available <a href="https://github.com/PlusToolkit/PlusDoc/blob/master/specifications/CoordinateSystems/CoordinateSystems.mrb" target="_blank">here</a>):
16+
17+
![Coordinate system definitions fCal](images/CoordinateSystemDefinitionsfCal.png)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Coordinate systems definitions
2+
3+
The pose of the acquired image slices, tools, and other objects are defined by specifying a 3D Cartesian coordinate system
4+
(a.k.a. reference frame) for each object and transformations between them. The transformation is assumed to be rigid and each
5+
transformation is represented by 4x4 homogeneous transformation matrix. Each coordinate system is defined by its name, origin
6+
position, axis directions, and unit. These definitions must be completed for all coordinate systems and archived along with
7+
the corresponding configuration files to avoid any chance of misunderstandings.
8+
9+
One of the most frequently needed operations in image-guided intervention systems is to compute transformation between two
10+
arbitrary reference frames. Although this operation is very simple in theory -- just a multiplication and inversion of selected
11+
matrices in a certain order -- the implementation can be quite complex and error-prone in practice, when there are a large number
12+
of transformations. Hard-coded implementation of the computations also greatly reduces the flexibility of the software. The
13+
number of potentially needed transformations is high even for a simple case: a tracker with 3 tracked objects typically uses
14+
7 coordinate systems (3 markers, 3 objects that the markers are attached to, 1 tracker), which leads to 42 different transformations.
15+
16+
Therefore, in Plus a common repository is used for storing all transformations as edges of a graph, where each vertex of
17+
the graph corresponds to a coordinate system (identified by its unique name). Plus can then compute transformations between any
18+
coordinate systems automatically: first the path (list of transformations) between the two coordinate systems (vertices) is searched in the graph,
19+
then the corresponding transformations are chained in the correct order and inverted as needed.
20+
21+
## Coordinate systems naming convention
22+
23+
Plus uses a standardized naming convention for constructing transformation names. The name is constructed from the name of the coordinate system
24+
that it transforms from (e.g., 'FrameA'), the 'To' word, and the reference frame name it transforms to (e.g., 'FrameB'):
25+
FrameAToFrameB. To ensure unambigous interpretation of the transformation name, the reference frame names must not contain
26+
the 'To' word.
27+
28+
## Transformation matrix definition
29+
30+
If coordinate values of a point are known in the 'FrameA' coordinate system and coordinates of the same point
31+
are needed in the 'FrameB' coordinate system: multiply the coordinates by the FrameAToToFrameB matrix from the left.
32+
33+
The transformation that computes coordinates of point P in FrameB ('To' coordinate system) from its coordinates in FrameA
34+
('From' coordinate system):
35+
36+
FrameAToFrameBTransform = [Rxx] [Rxy] [Rxz] [Tx] [Ryx] [Ryy] [Ryz] [Ty] [Rzx] [Rzy] [Rzz] [Tz] 0 0 0 1
37+
38+
where
39+
40+
[ Position_in_FrameB_x ] = [ Rxx Rxy Rxz Tx ] * [Position_in_FrameA_x ]
41+
[ Position_in_FrameB_y ] [ Ryx Ryy Ryz Ty ] [Position_in_FrameA_y ]
42+
[ Position_in_FrameB_z ] [ Rzx Rzy Rzz Tz ] [Position_in_FrameA_z ]
43+
[ 1 ] [ 0 0 0 1 ] [ 1 ]
44+
45+
Unit of T... values is the same as the unit of the 'FrameB' coordinate system (as the Tx, Ty, and Tz values are multiplied by 1
46+
and the result is a position in the To coordinate system).
47+
48+
Unit of R... values are the ratio of unit of the To coordinate system divided by the unit of the From coordinate system
49+
(as a position value in the From coordinate system's unit multiplied by Rij results in a position value in the To coordinate system's unit).
50+
51+
Note that the standardized naming convention is better than the some commonly used generic transformation names such as "CalibrationMatrix"
52+
or "ReferenceTransform", because when using such ad-hoc names the associated reference frames and transformation direction must be documented separately.
53+
This separate documentation may be missing, incomplete, or incorrect. The transformation names generated with the above described scheme
54+
are inherently correct and fully specify the transformation. Using a simple string as transformation name is also beneficial when the
55+
transformations are saved into file or transmitted to another system.
56+
57+
## - \subpage CommonCoordinateSystems
58+
- `ApplicationfCalCoordinateSystemDefinitions`
59+
60+
## Configuration settings
61+
62+
- **CoordinateDefinitions**
63+
- **Transform**
64+
- **From**: 'From' coordinate frame of the transform
65+
- **To**: 'To' coordinate frame of the transform
66+
- **Matrix**
67+
- **Date**
68+
- **Error**

0 commit comments

Comments
 (0)