Skip to content

Commit

Permalink
updated docs & added submodule API docs. Docstring tweaks. Dropped na…
Browse files Browse the repository at this point in the history
…poleon from requirements & bumped pydicom
  • Loading branch information
jrkerns committed Jan 29, 2015
1 parent 3c49ba6 commit 8a51582
Show file tree
Hide file tree
Showing 12 changed files with 254 additions and 164 deletions.
25 changes: 7 additions & 18 deletions docs/source/cbct_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Overview
--------

.. automodule:: pylinac.cbct
:no-members:

Running the Demo
----------------
Expand Down Expand Up @@ -87,13 +88,12 @@ The CBCT module is based on the tests and values given in the CatPhan 504 Manual

**Restrictions**

.. warning:: Analysis can catastrophically fail or give unreliable results if any Restriction is violated.
.. warning:: Analysis can fail or give unreliable results if any Restriction is violated.

* The phantom used must be an unmodified CatPhan 504, as endorsed and supplied by Varian.
* The phantom must have <0.5cm offset in the z (In-Out) direction (work to remove this is in the plans).



**Pre-Analysis**

* **Determine image properties** -- Upon load, the image set is analyzed for its DICOM properties to determine mm/pixel
Expand Down Expand Up @@ -148,54 +148,43 @@ The CBCT class uses several other classes. There are several Slices of Interest
SoIs have a base class as well as specialized classes for each specific slice.

.. autoclass:: pylinac.cbct.CBCT
:members:
:inherited-members:
:no-show-inheritance:

Supporting Data Structure

.. autoclass:: pylinac.cbct.Algo_Data
:members:
:no-show-inheritance:

Slice Objects

.. autoclass:: pylinac.cbct.HU_Slice
:members:

.. autoclass:: pylinac.cbct.Base_HU_Slice
:members:

.. autoclass:: pylinac.cbct.UNIF_Slice
:members:

.. autoclass:: pylinac.cbct.GEO_Slice
:members:

.. autoclass:: pylinac.cbct.SR_Slice
:members:

.. autoclass:: pylinac.cbct.Locon_Slice
:members:

.. autoclass:: pylinac.cbct.Slice
:members:
:no-show-inheritance:

ROI Objects

.. autoclass:: pylinac.cbct.HU_ROI
:members:

.. autoclass:: pylinac.cbct.GEO_ROI
:members:

.. autoclass:: pylinac.cbct.SR_Circle_ROI
:members:

.. autoclass:: pylinac.cbct.ROI_Disk
:members:

.. autoclass:: pylinac.cbct.ROI
:members:
:no-show-inheritance:

.. autoclass:: pylinac.cbct.GEO_Line
:members:


3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

# TODO: replace above with: autodoc_mock_imports when RTD upgrades to v1.3; http://sphinx-doc.org/latest/ext/autodoc.html#confval-autodoc_mock_imports

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -66,6 +68,7 @@
copyright = '2015, James Kerns'
# Document both class docstring and __init__ docstring. See: http://sphinx-doc.org/ext/autodoc.html#confval-autoclass_content
autoclass_content = 'both'
autodoc_default_flags = ['members', 'show-inheritance'] # See: http://sphinx-doc.org/latest/ext/autodoc.html#confval-autodoc_default_flags

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
31 changes: 31 additions & 0 deletions docs/source/core_modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
==========================
Core Modules Documentation
==========================

The following is the API documentation for the core modules of pylinac. These can be used
directly, or as the base for mixin classes or methods.

Analysis Module
---------------
.. automodule:: pylinac.core.analysis
:no-show-inheritance:
Image Module
------------
.. automodule:: pylinac.core.image

Geometry Module
---------------
.. automodule:: pylinac.core.geometry

IO Module
---------
.. automodule:: pylinac.core.io

Utilities Module
----------------
.. automodule:: pylinac.core.utilities

Decorators Module
-----------------
.. automodule:: pylinac.core.decorators

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ or jump right in by doing :ref:`installation` and then :ref:`getting_started`!
starshot_docs
vmat_docs
cbct_docs
core_modules


Indices and tables
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Pylinac, as a scientific package, has fairly standard scientific dependencies (>
* numpy >= 1.8
* scipy >= 0.13
* matplotlib >= 1.3.1; Image plotting
* pydicom >= 0.9.8; For reading DICOM files
* pydicom >= 0.9.9; For reading DICOM files
* Pillow >= 2.5; For reading image files

.. note::
Expand Down
10 changes: 3 additions & 7 deletions docs/source/starshot_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Overview
--------

.. automodule:: pylinac.starshot
:no-members:

Running the Demo
----------------
Expand Down Expand Up @@ -84,7 +85,7 @@ Algorithm

**Restrictions**

.. warning:: Analysis can catastrophically fail or give unreliable results if any Restriction is violated.
.. warning:: Analysis can fail or give unreliable results if any Restriction is violated.

* The center of the "star" must be in the central 1/3 of the image.
* The radiation spokes must extend to both sides of the center. I.e. the spokes must not end at the center of the circle.
Expand Down Expand Up @@ -123,14 +124,9 @@ API Documentation
-----------------

.. autoclass:: pylinac.starshot.Starshot
:members:
:inherited-members:

.. autoclass:: pylinac.starshot.StarProfile
:members:
:inherited-members:

.. autoclass:: pylinac.starshot.Wobble
:members:
:inherited-members:


18 changes: 10 additions & 8 deletions docs/source/vmat_docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Overview
--------

.. automodule:: pylinac.vmat
:no-members:

Running the Demo
----------------
Expand Down Expand Up @@ -90,7 +91,7 @@ The minimum needed to get going is to:
dmlc_img = "C:/QA Folder/VMAT/dmlc_field.dcm"
# load the images from the file path
myvmat.load_image(open_img, im_type='open')
myvmat.load_image(mlc_img, im_type='mlc')
myvmat.load_image(dmlc_img, im_type='mlc')

# *OR*

Expand Down Expand Up @@ -131,7 +132,7 @@ The algorithm works like such:

**Restrictions**

.. warning:: Analysis can catastrophically fail or give unreliable results if any Restriction is violated.
.. warning:: Analysis can fail or give unreliable results if any Restriction is violated.

* The tests must be delivered using the DICOM RT plan files provided by Varian which follow the test layout of Jorgensen et al.
* The images must be acquired with the EPID.
Expand All @@ -145,6 +146,10 @@ The algorithm works like such:

**Analysis**

.. note::
Calculations tend to be lazy, computed only on demand. This represents a nominal analysis
where all calculations are performed.

* **Calculate sample boundaries & extract** -- Because the Jorgensen tests are always the
same in terms of where the radiation gets delivered, these values are hardcoded as offsets from the center pixel.
These values are then scaled with the image scaling factor determined above. The mean of the pixel values within
Expand All @@ -166,14 +171,11 @@ API Documentation
-----------------

.. autoclass:: pylinac.vmat.VMAT
:members:
:inherited-members:
:no-show-inheritance:

.. autoclass:: pylinac.vmat.Segment
:members:
:inherited-members:
:no-show-inheritance:

.. autoclass:: pylinac.vmat.Sample
:members:
:inherited-members:


Loading

0 comments on commit 8a51582

Please sign in to comment.