Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
idomfunction.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef EDLIDOMFUNCTION_H
6#define EDLIDOMFUNCTION_H
7
9#include <edl/edltypes.h>
10#include <edl/iedlobject.h>
11#include <edl/edlstream.h>
12#include <edl/isession.h>
13#include <edl/edlvector.h>
14#include <edl/idomhashable.h>
15
17
24class IDOMFunction : public IEDLObject, public IDOMHashable
25{
26public:
27
28 virtual ~IDOMFunction() {}
29
41
46 virtual eFunctionType getFunctionType() const = 0;
47
52 virtual uint32 getNumInputValues() const = 0;
53
58 virtual uint32 getNumOutputValues() const = 0;
59
60#ifdef SWIG
61 %apply float &OUTPUT { float &low };
62 %apply float &OUTPUT { float &high };
63#endif
70 virtual void getInputDomain(uint32 inputNum, float &low, float &high) const = 0;
71
80 virtual bool getOutputRange(uint32 outputNum, float &low, float &high) const = 0;
81#ifdef SWIG
82 %clear float &low;
83 %clear float &high;
84#endif
85
86#ifdef SWIG
87#if SWIGJAVA
88 %apply float[] { const float *inputValues };
89 %apply float[] { float *outputValues };
90#endif
91#if SWIGCSHARP
92 %apply float INPUT [] { const float *inputValues };
93 %apply float OUTPUT [] { float *outputValues };
94#endif
95#endif
103 virtual void evaluate (const float *inputValues, float *outputValues) const = 0;
104#ifdef SWIG
105 %clear const float *inputValues;
106 %clear float *outputValues;
107#endif
108
109#ifdef SWIG
110#if SWIGJAVA
111 %apply int32_t[] { const int32 *inputValues };
112 %apply float[] { float *outputValues };
113#endif
114#if SWIGCSHARP
115 %apply int32_t INPUT [] { const int32 *inputValues };
116 %apply float OUTPUT [] { float *outputValues };
117#endif
118#endif
126 virtual void evaluate (const int32 *inputValues, float *outputValues) const = 0;
127#ifdef SWIG
128 %clear const int32 *inputValues;
129 %clear float *outputValues;
130#endif
131};
132
134#define edlobj2IDOMFunction(src) edl_cast((IDOMFunction *)NULL, src)
135
137
138
146{
147#define IDOMSampledFunctionClassID 0x4f107645, 0x3bad4e88, 0xb28abc9d, 0x77fdc5ac
148public:
149
151
156 static const CClassID &classID()
157 {
159 return id;
160 };
161
170
192
198 virtual uint32 getTableDimension(uint32 inputNum) const = 0;
199
204 virtual uint8 getBitsPerSample() const = 0;
205
211
212#ifdef SWIG
213 %apply float &OUTPUT { float &low };
214 %apply float &OUTPUT { float &high };
215#endif
222 virtual void getInputEncode(uint32 inputNum, float &low, float &high) const = 0;
223
230 virtual void getOutputDecode(uint32 outputNum, float &low, float &high) const = 0;
231#ifdef SWIG
232 %clear float &low;
233 %clear float &high;
234#endif
235
243 virtual const CEDLVector<uint8> &getTableData() const = 0;
244
245};
246
248#define edlobj2IDOMSampledFunction(src) edl_cast((IDOMSampledFunction *)NULL, src)
249
258{
259#define IDOMExponentialFunctionClassID 0x2daf61c4, 0x7e1e11dc, 0x83140800, 0x200c9a66
260public:
261
263
268 static const CClassID &classID()
269 {
271 return id;
272 };
273
291
297 virtual float getOutputC0(uint32 outputNum) const = 0;
298
304 virtual float getOutputC1(uint32 outputNum) const = 0;
305
310 virtual float getExponent() const = 0;
311
312};
313
315#define edlobj2IDOMExponentialFunction(src) edl_cast((IDOMExponentialFunction *)NULL, src)
316
317
327{
328#define IDOMStitchingFunctionClassID 0x565924fc, 0x7e2011dc, 0x83140800, 0x200c9a66
329public:
330
332
337 static const CClassID &classID()
338 {
340 return id;
341 };
342
361
366 virtual uint32 getNumFunctions() const = 0;
367
373 virtual IDOMFunctionPtr getFunctionAtIndex(uint32 index) const = 0;
374
379 virtual const CEDLVector<float> &getBoundsVector() const = 0;
380
385 virtual const CEDLVector<float> &getEncodeVector() const = 0;
386
387};
388
390#define edlobj2IDOMStitchingFunction(src) edl_cast((IDOMStitchingFunction *)NULL, src)
391
402{
403#define IDOMGroupingFunctionClassID 0x77077047, 0x5d4a4d47, 0xb4b08719, 0x25b1b24f
404public:
405
407
412 static const CClassID &classID()
413 {
415 return id;
416 };
417
422 class Data : public CClassParams
423 {
424 public:
426 };
427
432 virtual uint32 getNumFunctions() const = 0;
433
439 virtual IDOMFunctionPtr getFunctionAtIndex(uint32 index) const = 0;
440
441};
443#define edlobj2IDOMGroupingFunction(src) edl_cast((IDOMGroupingFunction *)NULL, src)
444
445
453{
454#define IDOMPostScriptCalculatorFunctionClassID 0x220a9a6c, 0x7e2511dc, 0x83140800, 0x200c9a66
455public:
456
458
463 static const CClassID &classID()
464 {
466 return id;
467 };
468
486
491 virtual IInputStreamPtr getCalculatorAsPostScriptStream() const = 0;
492
497 virtual JawsMako::IPDFArrayPtr getCalculator () const = 0;
498};
499
501#define edlobj2IDOMPostScriptCalculatorFunction(src) edl_cast((IDOMPostScriptCalculatorFunction *)NULL, src)
502
503
505
506#endif /* EDLIDOMFUNCTION_H */
An object to represent a 128-bit globally unique ID.
Definition objclassid.h:29
EDL Object Interface.
Definition iedlobject.h:31
Definition edlvector.h:30
uint32 numOutputs
Definition idomfunction.h:285
CEDLVector< float > range
Definition idomfunction.h:286
Data()
Definition idomfunction.h:281
float exponent
Definition idomfunction.h:289
CEDLVector< float > c1
Definition idomfunction.h:288
CEDLVector< float > c0
Definition idomfunction.h:287
CEDLVector< float > domain
Definition idomfunction.h:284
Interface for exponential functions. See section 3.9.2 of the PDF 1.7 Reference. Default values are a...
Definition idomfunction.h:258
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:268
virtual float getExponent() const =0
Get the exponent (N) value for the function.
virtual ~IDOMExponentialFunction()
Definition idomfunction.h:262
virtual float getOutputC1(uint32 outputNum) const =0
Get the C1 value for a given output to the function.
virtual float getOutputC0(uint32 outputNum) const =0
Get the output C0 value for a given output to the function.
Base class for PDF/PS Style functions All function instances throw IEDLError exceptions on failure.
Definition idomfunction.h:25
virtual void evaluate(const int32 *inputValues, float *outputValues) const =0
Evaluate the input through the function and return the result.
virtual void evaluate(const float *inputValues, float *outputValues) const =0
Evaluate the input through the function and return the result.
virtual uint32 getNumOutputValues() const =0
Get the number of output values that this function will produce.
virtual void getInputDomain(uint32 inputNum, float &low, float &high) const =0
Get the input domain for a given input to the function.
virtual ~IDOMFunction()
Definition idomfunction.h:28
eFunctionType
An enum for the various types of functions.
Definition idomfunction.h:34
@ eFTStitching
Definition idomfunction.h:37
@ eFTExponential
Definition idomfunction.h:36
@ eFTPostScriptCalculator
Definition idomfunction.h:39
@ eFTGrouping
Definition idomfunction.h:38
@ eFTSampled
Definition idomfunction.h:35
virtual eFunctionType getFunctionType() const =0
Retrieves function type.
virtual bool getOutputRange(uint32 outputNum, float &low, float &high) const =0
Get the output range for a given input to the function.
virtual uint32 getNumInputValues() const =0
Get the number of input values that this function will operate on.
Initialization data.
Definition idomfunction.h:423
CFunctionVector functions
Definition idomfunction.h:425
Interface to encapsulate an array of x-input-1-output functions.
Definition idomfunction.h:402
virtual ~IDOMGroupingFunction()
Definition idomfunction.h:406
virtual IDOMFunctionPtr getFunctionAtIndex(uint32 index) const =0
Get the function for a given function index.
virtual uint32 getNumFunctions() const =0
Get the number of functions in the group.
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:412
Abstract interface for objects that can be hashed.
Definition idomhashable.h:28
CEDLVector< float > range
Definition idomfunction.h:482
IEDLClassFactory * pFactory
Definition idomfunction.h:484
CEDLVector< float > domain
Definition idomfunction.h:479
uint32 numInputs
Definition idomfunction.h:480
Data()
Definition idomfunction.h:476
JawsMako::IPDFArrayPtr proc
Definition idomfunction.h:483
uint32 numOutputs
Definition idomfunction.h:481
Interface for PostScript calculator functions. See section 3.9.4 of the PDF 1.7 Reference....
Definition idomfunction.h:453
virtual ~IDOMPostScriptCalculatorFunction()
Definition idomfunction.h:457
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:463
virtual IInputStreamPtr getCalculatorAsPostScriptStream() const =0
Get the PostScript Calculator function as a PostScript Procedure.
virtual JawsMako::IPDFArrayPtr getCalculator() const =0
Get the PostScript Calculator function as an executable PS procedure.
uint8 bitsPerSample
Definition idomfunction.h:186
eInterpolationMethod interpolationMethod
Definition idomfunction.h:187
uint32 numInputs
Definition idomfunction.h:181
CEDLVector< float > domain
Definition idomfunction.h:182
uint32 numOutputs
Definition idomfunction.h:183
CEDLVector< float > decode
Definition idomfunction.h:189
CEDLVector< float > encode
Definition idomfunction.h:188
CEDLVector< uint32 > size
Definition idomfunction.h:185
Data()
Definition idomfunction.h:178
CEDLVector< uint8 > table
Definition idomfunction.h:190
CEDLVector< float > range
Definition idomfunction.h:184
Interface for sampled functions. See section 3.9.1 of the PDF 1.7 Reference. Default values are as pe...
Definition idomfunction.h:146
virtual const CEDLVector< uint8 > & getTableData() const =0
Get a pointer to the sample table. Values in this table are stored in the same format as described by...
virtual void getInputEncode(uint32 inputNum, float &low, float &high) const =0
Get the input encode range for a given input to the function.
virtual void getOutputDecode(uint32 outputNum, float &low, float &high) const =0
Get the output range for a given input to the function.
virtual eInterpolationMethod getInterpolationMethod() const =0
Get the interpolation method used for sample lookup.
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:156
virtual uint8 getBitsPerSample() const =0
Get the bits per sample for the sample table.
virtual uint32 getTableDimension(uint32 inputNum) const =0
Get the dimension of the sample table for a given input number.
virtual ~IDOMSampledFunction()
Definition idomfunction.h:150
eInterpolationMethod
Enum for interpolation types.
Definition idomfunction.h:166
@ eCubicInterpolation
Definition idomfunction.h:168
@ eLinearInterpolation
Definition idomfunction.h:167
CEDLVector< float > encode
Definition idomfunction.h:358
CEDLVector< float > bounds
Definition idomfunction.h:357
uint32 numOutputs
Definition idomfunction.h:355
CFunctionVector functions
Definition idomfunction.h:359
CEDLVector< float > domain
Definition idomfunction.h:354
Data()
Definition idomfunction.h:350
CEDLVector< float > range
Definition idomfunction.h:356
Interface for stitching functions. See section 3.9.3 of the PDF 1.7 Reference. Default values are as ...
Definition idomfunction.h:327
virtual uint32 getNumFunctions() const =0
Get the number of functions that are stitched.
virtual IDOMFunctionPtr getFunctionAtIndex(uint32 index) const =0
Get the function for a given function index.
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:337
virtual ~IDOMStitchingFunction()
Definition idomfunction.h:331
virtual const CEDLVector< float > & getEncodeVector() const =0
Get a reference to the encode vector for this function.
virtual const CEDLVector< float > & getBoundsVector() const =0
Get a reference to the bounds vector for this function.
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
#define _END_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:110
#define _BEGIN_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:109
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
unsigned int uint32
Definition edltypes.h:34
signed int int32
Definition edltypes.h:29
unsigned char uint8
Definition edltypes.h:32
Simple template vector class for general use.
#define IDOMStitchingFunctionClassID
Definition idomfunction.h:328
#define IDOMSampledFunctionClassID
Definition idomfunction.h:147
CEDLVector< IDOMFunctionPtr > CFunctionVector
Definition idomfunction.h:136
#define IDOMPostScriptCalculatorFunctionClassID
Definition idomfunction.h:454
#define IDOMExponentialFunctionClassID
Definition idomfunction.h:259
#define IDOMGroupingFunctionClassID
Definition idomfunction.h:403
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211