MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / init

Method init

IPL/src/processes/IPLSynthesize.cpp:22–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "IPLSynthesize.h"
21
22void IPLSynthesize::init()
23{
24 // init
25 _result = NULL;
26 _type = 0;
27 _width = 512;
28 _height = 512;
29 _amplitude = 0.5f;
30 _offset = 0.5f;
31 _wavelength = 8;
32 _direction = 0;
33 _decay = 0;
34
35 // basic settings
36 setClassName("IPLSynthesize");
37 setTitle("Synthesize Image");
38 setCategory(IPLProcess::CATEGORY_IO);
39 setIsSource(true);
40
41 // inputs and outputs
42 addOutput("Image", IPL_IMAGE_GRAYSCALE);
43
44 // all properties which can later be changed by gui
45 addProcessPropertyInt("type", "Type:Flat|Plane Wave|Center Wave","flat|plane|radial", _type, IPL_WIDGET_GROUP);
46 addProcessPropertyInt("width", "Width","", _width, IPL_WIDGET_SLIDER, 1, 1024);
47 addProcessPropertyInt("height", "Height","", _height, IPL_WIDGET_SLIDER, 1, 1024);
48 addProcessPropertyDouble("amplitude", "Amptlitude","", _amplitude, IPL_WIDGET_SLIDER, 0.0f, 1.0f);
49 addProcessPropertyDouble("offset", "Offset","", _offset, IPL_WIDGET_SLIDER, 0.0f, 1.0f);
50 addProcessPropertyInt("wavelength", "Wavelength","", _wavelength, IPL_WIDGET_SLIDER, 1, 1024);
51 addProcessPropertyInt("plane_direction", "Direction","", _direction, IPL_WIDGET_SLIDER, 0, 360);
52 addProcessPropertyInt("decay", "Decay","", _decay, IPL_WIDGET_SLIDER, 0, 1024);
53 addProcessPropertyColor("flat_color", "Color","", IPLColor(0,0,0), IPL_WIDGET_COLOR_RGB);
54}
55
56void IPLSynthesize::destroy()
57{

Callers

nothing calls this directly

Calls 5

setClassNameFunction · 0.85
setTitleFunction · 0.85
setCategoryFunction · 0.85
setIsSourceFunction · 0.85
IPLColorClass · 0.85

Tested by

no test coverage detected