summaryrefslogtreecommitdiff
path: root/docs/manual
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-02-26 14:56:56 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-02-26 14:56:56 +0100
commit7c68a8cc21b2e3d6c6b0f1c7aa5bc005d840f029 (patch)
tree8b995b01374c5a2677e54dd2c59627f37eab518a /docs/manual
parentfb6bf542caefd5f5965debb7cf201610d7e7d42d (diff)
Fix FAQ documentation
Diffstat (limited to 'docs/manual')
-rw-r--r--docs/manual/faq.rst28
1 files changed, 6 insertions, 22 deletions
diff --git a/docs/manual/faq.rst b/docs/manual/faq.rst
index efa568a..dd64e85 100644
--- a/docs/manual/faq.rst
+++ b/docs/manual/faq.rst
@@ -43,10 +43,7 @@ Because the UFO core system is unable to locate the filters. By default it looks
into ``${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/ufo``, where the installation
prefix is usually something like ``/usr`` or ``/usr/local``. If you don't want
to install the filters system-wide, you can tell the system to try other paths
-as well::
-
- >>> from gi.repository import Ufo
- >>> graph = Ufo.Graph(paths='/home/user/path/to/filters:/another/path')
+as well by appending paths to the ``UFO_PLUGIN_PATHS`` environment variable.
Can I split a linear data stream?
@@ -110,24 +107,11 @@ process Numpy arrays data::
arrays = [ i*np.eye(100, dtype=np.float32) for i in range(1, 10) ]
buffers = [ ufo.numpy.fromarray(a) for a in arrays ]
- g = Ufo.Graph()
- numpy_input = g.get_filter('bufferinput')
+ pm = Ufo.PluginManager()
+ numpy_input = pm.get_task('bufferinput')
numpy_input.set_properties(buffers=buffers)
-How can I instantiate and pass parameters when creating a filter?
------------------------------------------------------------------
-
-Yes, the same module that is used to access Numpy buffers has a convenience
-wrapper around the :c:type:`UfoGraph` class that provides a ``new_filter`` method::
-
- import ufotools.patch
-
- g = ufotools.patch.Graph()
- rd = g.new_filter('reader', path='/home/src', count=5)
- wr = g.new_filter('writer', path='/home/dst', prefix='foo-')
-
-
.. _faq-synchronize-properties:
How can I synchronize two properties?
@@ -142,9 +126,9 @@ known. In Python you can use the ``bind_property`` function from the
from gi.repository import Ufo
import ufotools.bind_property
- g = Ufo.Graph()
- cor = g.get_filter('centerofrotation')
- bp = g.get_filter('backproject')
+ pm = Ufo.PluginManager()
+ cor = g.get_task('centerofrotation')
+ bp = g.get_task('backproject')
# Now connect the properties
ufotools.bind_property(cor, 'center', bp, 'axis-pos')