a filter chain or graph to manipulate a imageOrder of filters matters. The processing direction is a bit like raytracing as nodes request their parent. More...
#include <oyranos_alpha.h>
Data Fields | |
oyOBJECT_e | type_ |
oyStruct_Copy_f | copy |
oyStruct_Release_f | release |
oyObject_s | oy_ |
oyFilterNode_s * | input |
oyFilterNode_s * | out_ |
Related Functions | |
(Note that these are not member functions.) | |
oyConversion_s * | oyConversion_CreateBasic (oyImage_s *input, oyImage_s *output, oyOptions_s *options, oyObject_s object) |
allocate initialise a basic oyConversion_s object | |
oyConversion_s * | oyConversion_CreateInput (oyImage_s *input, oyObject_s object) |
initialise from a input image for later adding more filters | |
oyConversion_s * | oyConversion_Copy (oyConversion_s *conversion, oyObject_s object) |
copy or reference a oyConversion_s object | |
int | oyConversion_Release (oyConversion_s **obj) |
release and zero a conversion object | |
int | oyConversion_FilterAdd (oyConversion_s *conversion, oyFilter_s *filter) |
add a filter to a oyConversion_s filter list | |
int | oyConversion_OutputAdd (oyConversion_s *conversion, oyImage_s *output) |
close a oyConversion_s with a target image | |
int | oyConversion_Run (oyConversion_s *conversion, oyPixelAccess_s *pixel_access, oyRegion_s *region) |
iterate over a conversion graph | |
oyPointer * | oyConversion_GetOnePixel (oyConversion_s *conversion, int32_t x, int32_t y, int32_t *feedback) |
compute one pixel at the given position | |
int ** | oyConversion_GetAdjazenzlist (oyConversion_s *conversion, oyAlloc_f allocateFunc) |
adjazenzliste of a conversion graph | |
char * | oyConversion_ToText (oyConversion_s *conversion, const char *head_line, int reserved, oyAlloc_f allocateFunc) |
text description of a conversion graph |
a filter chain or graph to manipulate a image
Order of filters matters. The processing direction is a bit like raytracing as nodes request their parent.
The graph is allowed to be a directed graph without cycles.
oyConversion_s shall provide access to the graph and help in processing and managing nodes.
Creating Graphs:
Most simple is to use the oyConversion_CreateBasic() function to create a profile to profile and possible image buffer to image buffer linear graph.
The next possibility is to create a linear graph by chaining linear nodes together with oyConversion_CreateInput(), oyConversion_FilterAdd() and oyConversion_OutputAdd() in that order. A linear node is one that can have exactly one parent and one child node. The above scheme illustrates a linear graph.
The last possibility is to create a non linear graph. The input member be accessed for this directly.
While it would be possible to have several open ends in a graph, there are two endpoints considered as special. The input member prepresents the top most required node to be provided in a oyConversion_s graph. The input node is accessible for user manipulation. The other one is the out_ member. It is the closing node in the graph. It will be set by Oyranos during closing the graph, e.g. in oyConversion_OutputAdd().
Using Graphs:
To obtain the data the oyConversion_GetNextPixel() and oyConversion_GetOnePixel() functions are available.
oyStruct_Copy_f oyConversion_s::copy |
copy function
the input image filter; Most users will start logically with this pice and chain their filters to get the final result.
Referenced by oyConversion_CreateInput(), oyConversion_FilterAdd(), oyConversion_OutputAdd(), oyConversion_Release(), and oyConversion_ToText().
the Oyranos output image. Oyranos will stream the filters starting from the end. This element will be asked on its first plug.
Referenced by oyConversion_GetOnePixel(), oyConversion_OutputAdd(), oyConversion_Release(), and oyConversion_Run().
base object
Referenced by oyConversion_Copy(), oyConversion_CreateInput(), oyConversion_FilterAdd(), and oyConversion_Release().
oyStruct_Release_f oyConversion_s::release |
release function
struct type oyOBJECT_CONVERSION_S
Referenced by oyConversion_Release(), and oyConversion_ToText().