Wiki
Clone wikiPyCA / Home
PyCA Wiki
Welcome to the PyCA wiki!
Required / Optional Dependencies
Operating Systems
- Linux is the only operating system supported at this time. We currently have preliminary Mac support and preliminary Windows support.
The build system uses CMake. The current required prerequisites are:
- C++ Compiler (gcc preferred: see this commit if you have version 4.7+)
- CMake 2.8+
- SWIG <= 3.0.2 or >= 3.0.10 (see issue
#64) - CUDA (any version)
- Python (version 2.7 or lower: see Python/numpy Issues)
- FFTW
- boost headers and runtime
- numpy (development version including headers required)
The following are optional:
- matplotlib 1.1.1+ (for full functionality in PyCA.Display and reading / writing png images)
- scipy (some additional image/linear algebra functionality)
- ITK (for reading/writing image formats other than png)
- Doxygen (for generating html documentation and python docstrings)
Building the library:
Clone the git repository:
#!bash git clone git@bitbucket.org:scicompanat/pyca.git [local directory to create]
If you omit the [local directory to create] it will just be cloned into a directory named 'pyca'. By default you will be on the latest development version. To check out a stable version, enter the source directory (cd pyca
) and run git tag -l
to see available versions, and check out the latest one. For example SEE NOTE BELOW:
#!bash > cd pyca > git tag -l v0.00 v0.01 > git checkout v0.01 [some output here] > cd ..
NOTE: the current version (0.01) is very old, until 0.02 comes out you are probably better off using the development head, just omit the previous steps.
Next create a build directory and use cmake to configure the build:
#!bash mkdir pyca-bin cd pyca-bin ccmake ../pyca
PYTHON_INSTALL_DIR
) is ~/python/site-python
. You can change this value if desired. If you want ITK support for reading / writing file formats and you've built ITK yourself (Note that ITK should be built with BUILD_SHARED_LIBS ON in order to enable the -fPIC flag), you may have to enter the build directory in the ITK_DIR
entry. It's okay if CUDA_SDK_ROOT_DIR
is not found. Press 'c' a few times until you get the 'g' (generate) option, then press 'g' to generate the build. You'll be dropped back to the shell, where you can build and install the project
#!bash
make
make docstring
make
make install
make docstring
is optional and required Doxygen (this command inserts Doxygen documentation into python docstrings). The second make
will include the docstring in the build result, it is only necessary if you made docstring. Make sure your python path is set to your installation directory by running the following or adding it to your ~/.bashrc
script
#!bash export PYTHONPATH=~/python/site-packages:${PYTHONPATH}
#!bash
python ROFTV.py
Running testing:
From the Testing directory, all tests can be automatically discovered and run using unittest:
#!bash python -m unittest discover -v -p '*UnitTest.py'
#!python import CpuGpuUnitTest as cgtest cgtc = cgtest.CpuGpuTestCase() cgtc.test_Exp(disp=True)
Tutorials and Web Documentation
We have web tutorials that are IPython notebooks
- Introduction to Image3D and Field3D types (view / download)
- Standard numerical operations (view / download)
- Displaying (no tutorial yet)
- I/O (no tutorial yet)
- Difference operations/Gradients (no tutorial yet)
- Applying deformations (view / download)
- Memory Manager (view / download)
- Multiscale Operations (view / download)
- Filtering (no tutorial yet)
If you download the ipython, simply run
ipython notebook _TutorialName_.ipynb
Running Examples
The examples in the Examples directory can be run simply as (for example running ROFTV.py):
#!bash
python ROFTV.py
%run ROFTV.py
Matplotlib Setup
See this page
IPython Notes
See this page
Changelog
Developer Information
Windows support
Preliminary windows support is being actively developed. Check this wiki page for the latest status of PyCA on Windows.
Common Problems
If you get the following error:
.../Libraries/PyCA/inc/types/typesPYTHON_wrap.cxx:3478:31: fatal error: numpy/arrayobject.h: No such file or directory
Relevant links
Updated