Skip to content

Commit

Permalink
Refactor module structure
Browse files Browse the repository at this point in the history
Broke large modules into multiple files.
Fixed broken demo notebooks.
Added Azure Pipelines as a CI service.
Used YAPF to format all code.
  • Loading branch information
carterbox committed Mar 28, 2019
2 parents a6fa94c + cbac53d commit 50db6a2
Show file tree
Hide file tree
Showing 46 changed files with 2,406 additions and 1,933 deletions.
29 changes: 20 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,47 @@ XDesign
:target: https://codeclimate.com/github/tomography/xdesign
:alt: Code Climate

**XDesign** is an open-source Python package for generating
configurable simulation phantoms for benchmarking tomographic
image reconstruction.
**XDesign** is an open-source Python package for generating configurable
x-ray imaging `phantoms <https://en.wikipedia.org/wiki/Imaging_phantom>`_,
simulating `data acquisition <https://en.wikipedia.org/wiki/Data_acquisition>`_,
and benchmarking x-ray `tomographic image reconstruction
<https://en.wikipedia.org/wiki/Tomography>`_.

Current Scope

Goals
=====
* Assist faster development of new generation tomographic reconstruction methods
* Allow quantitative comparison of different reconstruction methods
* Create a framework for designing x-ray imaging experiments


Current Scope
=============
* Customizable 2D phantoms constructed from circles and convex polygons
* Quantitative reconstruction quality and probe coverage metrics
* Attenuation interactions with X-ray probes of uniform flux
* Use of analytic (exact) solutions for algorithms and computation


Contribute
==========
* Issue Tracker: https://github.com/tomography/xdesign/issues
* Documentation: https://github.com/tomography/xdesign/tree/master/docs
* Source Code: https://github.com/tomography/xdesign/tree/master/xdesign
* Tests: https://github.com/tomography/xdesign/tree/master/tests


License
=======
The project is licensed under the
`BSD-3 <https://github.com/tomography/xdesign/blob/master/LICENSE.txt>`_ license.


Install
=======

First, install XDesign's dependencies using pip. Then install XDesign
in the usual way. Using pip or by running setup.py.
Since version 0.5, XDesign is available on the conda-forge channel. Install it
in the usual way:

.. code-block:: bash
$ pip install -r requirements.txt
$ pip install .
$ conda install xdesign -c conda-forge
34 changes: 34 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

jobs:

- job: 'Test'
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 4

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: python -m pip install --upgrade pip && pip install -r requirements.txt nose python-coveralls
displayName: 'Install dependencies'

- script: python setup.py install
displayName: 'Install XDesign'

- script: nosetests
displayName: 'nosetests'
25 changes: 9 additions & 16 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
API
===

.. rubric:: **XDesign Modules:**

.. toctree::

api/xdesign.acquisition
api/xdesign.algorithms
api/xdesign.geometry
api/xdesign.constants
api/xdesign.formats
api/xdesign.material
api/xdesign.metrics
api/xdesign.phantom
api/xdesign.plot
API Documentation
=================

.. automodule:: xdesign
:members:
:undoc-members:
:show-inheritance:

.. toctree::
:maxdepth: 4
:hidden:
:glob:

api/*
3 changes: 3 additions & 0 deletions docs/source/api/xdesign.constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
========================

.. automodule:: xdesign.constants
:members:
:show-inheritance:
:undoc-members:
66 changes: 60 additions & 6 deletions docs/source/api/xdesign.geometry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,70 @@
:show-inheritance:
:inherited-members:

.. rubric:: **Classes:**

.. autosummary::
Zero dimensional entities
-------------------------

Entity
Point
.. automodule:: xdesign.geometry.point
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Classes:**

.. autosummary::

Point


One dimensional entities
------------------------

.. automodule:: xdesign.geometry.line
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Classes:**

.. autosummary::

Line
Segment


Two dimensional entities
-------------------------

.. automodule:: xdesign.geometry.area
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Classes:**

.. autosummary::

Curve
Circle
Line
Polygon
Triangle
Rectangle
Square
Polygon
Mesh


Intersect
---------

.. automodule:: xdesign.geometry.intersect
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Functions:**

.. autosummary::

clip_SH
halfspacecirc
21 changes: 0 additions & 21 deletions docs/source/api/xdesign.metrics.fullref.rst

This file was deleted.

64 changes: 48 additions & 16 deletions docs/source/api/xdesign.metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,57 @@
======================

.. automodule:: xdesign.metrics
:members:
:show-inheritance:
:undoc-members:
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Classes:**

.. autosummary::
Coverage metrics
----------------

ImageQuality
.. automodule:: xdesign.metrics.coverage
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Functions:**
.. rubric:: **Functions:**

.. autosummary::
.. autosummary::

pcc
ssim
msssim
compute_mtf
compute_mtf_ffst
compute_mtf_lwkj
compute_nps_ffst
compute_neq_d
coverage_approx


Full-reference metrics
----------------------

.. automodule:: xdesign.metrics.fullref
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Functions:**

.. autosummary::

pcc
ssim
msssim


Standards-based metrics
-----------------------

.. automodule:: xdesign.metrics.standards
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Functions:**

.. autosummary::

compute_mtf
compute_mtf_ffst
compute_mtf_lwkj
compute_nps_ffst
compute_neq_d
81 changes: 56 additions & 25 deletions docs/source/api/xdesign.phantom.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,59 @@
:mod:`xdesign.phantom`
=======================
======================

.. automodule:: xdesign.phantom
:members:
:show-inheritance:
:undoc-members:

.. rubric:: **Classes:**

.. autosummary::

Phantom
save_phantom
load_phantom
pickle_phantom
unpickle_phantom
XDesignDefault
HyperbolicConcentric
DynamicRange
DogaCircles
SlantedSquares
UnitCircle
Soil
WetCircles
SiemensStar
Foam
Softwood
:members:
:show-inheritance:
:undoc-members:


Phantoms
--------

.. automodule:: xdesign.phantom.phantom
:members:
:show-inheritance:
:undoc-members:

.. autosummary::

Phantom
save_phantom
load_phantom
pickle_phantom
unpickle_phantom


Standard phantoms
-----------------

.. automodule:: xdesign.phantom.standards
:members:
:show-inheritance:
:undoc-members:

.. autosummary::

XDesignDefault
HyperbolicConcentric
DynamicRange
DogaCircles
SlantedSquares
UnitCircle
SiemensStar


Custom phantoms
---------------

.. automodule:: xdesign.phantom.custom
:members:
:show-inheritance:
:undoc-members:

.. autosummary::

Soil
WetCircles
Foam
Softwood
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`xdesign.algorithms`
:mod:`xdesign.recon`
=========================

.. automodule:: xdesign.algorithms
.. automodule:: xdesign.recon
:members:
:show-inheritance:
:undoc-members:
Expand Down

0 comments on commit 50db6a2

Please sign in to comment.