diff --git a/Examples/IPythonNotebooks/doc/IPythonNotebooks.dox b/Examples/IPythonNotebooks/doc/IPythonNotebooks.dox new file mode 100644 index 0000000000..5aeff46798 --- /dev/null +++ b/Examples/IPythonNotebooks/doc/IPythonNotebooks.dox @@ -0,0 +1,19 @@ +/** \page IPythonNotebooks Folder for examplary IPython notebooks. + +This folder contains little (or not so little) IPython notebooks, mainly for tutorial purposes. + +\par +E.g. the notebook SimpleSegmentationManipulation.ipynb in the subfolder segmentation shows how we can load and manipulate a segmentation in an IPython notebook and redisplay it in MITK. + +\par Other usefull notebooks + +SimpleITK: +a huge collection on how to do image processing with SimpleITK. + +VTK: +A nice blog post/notebook on how to use vtk in python. + + + +*/ diff --git a/Examples/PythonPackageExample/README.rst b/Examples/PythonPackageExample/README.rst index dbeaa6b484..81fd013040 100644 --- a/Examples/PythonPackageExample/README.rst +++ b/Examples/PythonPackageExample/README.rst @@ -1,65 +1,68 @@ Sample Module Repository ======================== This simple project is an example repo for Python projects. It is adapted from [this github example](https://github.com/kennethreitz/samplemod/tree/master). [Learn more](). And tries to follow the instructions on [this guide](). The actual code can be found in sample/thinker.py. It implements a toy class which "thinks" random thoughts. The tests for this class are located in sample/tests. Python will automatically discover tests if you name them test_*.py Look at test_advanced.py for a simple unittest example. ## install dependencies either use: ``` pip install -r requirements.txt ``` or ``` make init ``` ## install this package You have two choices: 1. install a development version. This means that if you make changes to the packages code you make will affect the code you write which is based on this package. 2. "normal" install. This will install the current version. After you installed your package, it can be imported in your via import sample where ever you are. ### install development version: either use: ``` python setup.py develop ``` or ``` make install_develop ``` ### "normal" install either use: ``` python setup.py install ``` or ``` make install ``` ## run tests either run: ``` python -m unittest discover ``` or ``` make test ``` + +## execute tutorial +In your console, navigate to the tutorials subfolder and start ipython notebook. diff --git a/Examples/PythonPackageExample/setup.py b/Examples/PythonPackageExample/setup.py index f81e2a9bf8..0061927670 100755 --- a/Examples/PythonPackageExample/setup.py +++ b/Examples/PythonPackageExample/setup.py @@ -1,30 +1,30 @@ # -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( - name='sample', + name='samplepackage', version='0.0.2', description='Sample package adapted from Python-Guide.org for MITK', long_description=readme, - # if you want, put your own name here + # if you want, put your own name here # (this would likely result in people sending you emails) - author='MBI@DKFZ', + author='MBI@DKFZ', author_email='mitk-users@lists.sourceforge.net', url='http://mitk.org', license=license, packages=find_packages(exclude=('tests', 'doc', 'tutorials')), - # the requirements to install this project. + # the requirements to install this project. # Since this one is so simple this is empty. install_requires=[] # a more sophisticated project might have something like: #install_requires=['numpy>=1.11.0', 'scipy>=0.17', 'scikit-learn'] )