| 20 | #include "IPLSynthesize.h" |
| 21 | |
| 22 | void 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 | |
| 56 | void IPLSynthesize::destroy() |
| 57 | { |
nothing calls this directly
no test coverage detected