Pixpipe.js is an attempt of building an image processing pipeline entirely in native Javascript for browsers. Its architecture was somewhat inspired by ITK, making a clear distinction between objects that contains data (inherit from PixpipeContainer
) from object that processes data (inherit from Filter
).
The concept of pipeline implies that the output of a Filter
can be used as an input for the next one, like in ITK. In Pixpipe.js, this is done by using the Filter
’s methods addInput()
and getOuput()
. Some Filter
may have several input or output of different kinds.
npm install --save pixpipe
The bundle in dist/pixpipe.js
is a umd bundle, meaning it’s ugly but it’s compatible everywhere.
In HTML file:
<script src="pixpipe/dist/pixpipe.js"></script>
<!-- or alternatively -->
<script src="pixpipe/dist/pixpipe.min.js"></script>
In Node:
const pixpipe = require("pixpipe");
In ES6 module:
import pixpipe from 'pixpipe';
Or, if you don’t want to export the whole bundle, you can select sub-parts of Pixpipe:
import { UrlToArrayBufferReader, FileToArrayBufferReader, Image2D } from 'pixpipe/dist/pixpipe.esmodule.js';
To make image processing:
pixpipe.js
Here are some slides to present Pixpipejs. Maybe an easier introduction.
The best way to learn how to uses Pixpipe is by going through the cookbook. You’ll find in-depth descriptions of the core components, examples and how-to’s.
This documentation is autogenerated from source comments and thus is pretty complete. Interested in how to generate your own? go there.
Here is the list of compatible formats:
HERE is the repo where some sample data are stored (mainly to avoid this repos to be too fat).
This is the binary file format used to store data from a Pixpipe pipeline. Thanks to it’s proximity to Pixpipe structures a PixBin file can be opened and create the Pixpipe object instances as you left them.
The codec for PixBin is part of Pixpipejs but is also available as a separate package here. A in-depth description of the file format is also available here.
Pixpipejs is open to contribution via fork + pull requests.
In addition, if you have an idea of a feature you would like to see in Pixpipejs, you can mention if in the Wiki and we’ll see what we can do.
MIT - See LICENSE file.