Installation and quick-start
The source-code for the PixelPipes framwork can be downloaded from Github, but the most convenient way of testing it is by installing a prebuilt version. The package can be installed as a Python wheel package, currently from a testing PyPi compatible repository located here.
`
> pip install pixelpipes -i https://data.vicos.si/lukacu/pypi/
`
Simple example
To demonstrate a very simple example of using a PixelPipes pipeline (without any image operations), lets sample random numbers from a pre-defined list and display them.
from itertools import count
from pixelpipes.graph import Constant
from pixelpipes.list import GetRandom
from pixelpipes.utilities import pipeline
@pipeline()
def simple():
a = Constant([1, 2, 3, 7, 8, 9, 4, 5, 6])
return GetRandom(a)
p = simple()
for i in count(1):
print(p.run(i)[0])
Note that this sequence will be the same every time you run the script with the same sample indices. This example is very simple, but shows how a pipleine is built. More complex examples with image operations are presented here.