Skip to content

Commit

Permalink
solves ERROR: Unexpected indentation for sphinx-build (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxochicale committed Jun 22, 2023
1 parent f3d9e6b commit 3d38a24
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions doc/02_0_Build_Your_Own_Systems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,51 @@ Build Your Own Image Guided Surgery System

3. Get B.A.R.D.
::

git clone https://github.com/SciKit-Surgery/scikit-surgerybard.git

or navigate to https://github.com/SciKit-Surgery/scikit-surgerybard
and use the download button

navigate to the scikit-surgerybard directory and run
::

pip install .

You may need to add
::

pip install --user

if you don't have administrative permissions.

**Another method to get BARD and all its dependant packages is the following**
::

git clone https://github.com/SciKit-Surgery/scikit-surgerybard.git

Change directory to the newly created `scikit-surgerybard` by
::

cd scikit-surgerybard

Run the tox commands
::

tox

If tox run successfully,
For Mac and Linux, activate the virtual environment using command
::

source .tox/py36/bin/activate

If all goes well the prompt should be preceded by (py36).


For Windows, activate the virtual environment using command
::

.tox\py36\Scripts\activate

If all goes well the prompt should be preceded by (py36).
Expand Down
2 changes: 2 additions & 0 deletions doc/02_1_Calibrate_Your_Camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ or write a script to make one.

Take 5-20 pictures of chessboard using:
::

python bardVideoCalibration.py -c config/video_calib_chessboard.json

Hit the 'c' key to capture an image. Press the 'q' key to quite the application.
Expand All @@ -53,6 +54,7 @@ Use the '-s' option to specify a directory to save to, and the

For example:
::

python bardVideoCalibration.py -c config/video_calib_chessboard.json -s tests/output -p myresults

Then, each time the program recalibrates, the results will be saved to the 'tests/output' folder, with the filename prefix 'myresults'.
Expand Down
4 changes: 3 additions & 1 deletion doc/02_2_Tracking_With_AuRcoTags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ OpenCV.

1. Try running the following, and check that the USB camera can track the reference marker
::

python sksurgerybard.py --config config/example_config.json


Expand All @@ -36,7 +37,8 @@ a registration to be performed once. Here we have glued the marker to the phanto
so model2reference should not change.

Now try running
::
::

python sksurgerybard.py --config config/reference_with_model.json

Move the webcam so that the reference markers are visible, and you should see
Expand Down
5 changes: 5 additions & 0 deletions doc/02_3_Make_Your_Own_Pointer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ can be reliably located in both the model (e.g. CT scan) and patient (i.e. physi
Within the data directory there are files based on a CT scan of the
pelvis phantom.
::

ls data/PelvisPhantom
CT_Fiduicial_Markers.txt
FullPelvis.vtk
Expand All @@ -36,6 +37,7 @@ pointer, using the "pointer" markers, a pen, some cardboard and some sort of adh

Now run this:
::

python sksurgerybard.py --config config/pointer_markers.json

Move the pointer around in front of the camera. You should be able to see that
Expand All @@ -49,6 +51,7 @@ move either the pointer tip or the tracking system (webcam).

When you have a directory of pointer matrices you can run this;
::

python bardPivotCalibration.py --help
python bardPivotCalibration.py --input pointer_positions/bard_pointer_matrices

Expand All @@ -63,13 +66,15 @@ less pointer poses.

Now edit config/pointer_markers.json to include the the pointer_tag_to_tip transform, within the pointerData entry:
::

"pointerData": {
"pointer_tag_file": "data/pointer.txt",
"pointer_tag_to_tip": "data/pointer_tip.txt"
},

Now run;
::

python sksurgerybard.py --config config/pointer_markers.json

When you place the pointer in front of the camera, you should now see an additional sphere
Expand Down
3 changes: 3 additions & 0 deletions doc/02_4_Register_And_Ovelay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ Create a plain text-file containing the coordinates of the prostate phantom fidu

Compute the registration of CT points in CT_Fiduicial_Markers.txt to your world points, run this;
::

python bardProcrustes.py -f world.txt -m data/PelvisPhantom/CT_Fiduicial_Markers.txt

So here -f stands for "fixed" points, also called "target" points in the literature, and -m stands for "moving" points, also called "source" points in the literature.
This will output a rotation, a translation, and Fiducial Registration Error.
Cut and paste the rotation and translation into a CT_to_world.txt file as
::

R11 R12 R13 T1
R21 R22 R23 T2
R31 R31 R33 T3
Expand All @@ -25,6 +27,7 @@ and edit config/reference_with_model.json to use this file instead of data/id.tx

Rerun BARD using this configuration file, using:
::

python sksurgerybard.py --config config/reference_with_model.json

and see what happens.
Expand Down

0 comments on commit 3d38a24

Please sign in to comment.