Mako 8.4.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
idomfunction.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007-2026 Hybrid Software Helix Ltd. All rights reserved.
3 * Hybrid Software Helix Ltd. Confidential Information.
4 */
5
6#ifndef EDLIDOMFUNCTION_H
7#define EDLIDOMFUNCTION_H
8
10#include <edl/edltypes.h>
11#include <edl/iedlobject.h>
12#include <edl/edlstream.h>
13#include <edl/isession.h>
14#include <edl/edlvector.h>
15#include <edl/idomhashable.h>
16
18
25class IDOMFunction : public IEDLObject, public IDOMHashable
26{
27public:
28
29 virtual ~IDOMFunction() {}
30
42
47 virtual eFunctionType getFunctionType() const = 0;
48
53 virtual uint32 getNumInputValues() const = 0;
54
59 virtual uint32 getNumOutputValues() const = 0;
60
61#ifdef SWIG
62 %apply float &OUTPUT { float &low };
63 %apply float &OUTPUT { float &high };
64#endif
71 virtual void getInputDomain(uint32 inputNum, float &low, float &high) const = 0;
72
81 virtual bool getOutputRange(uint32 outputNum, float &low, float &high) const = 0;
82#ifdef SWIG
83 %clear float &low;
84 %clear float &high;
85#endif
86
87#ifdef SWIG
88#if SWIGJAVA
89 %apply float[] { const float *inputValues };
90 %apply float[] { float *outputValues };
91#endif
92#if SWIGCSHARP
93 %apply float INPUT [] { const float *inputValues };
94 %apply float OUTPUT [] { float *outputValues };
95#endif
96#endif
104 virtual void evaluate (const float *inputValues, float *outputValues) const = 0;
105#ifdef SWIG
106 %clear const float *inputValues;
107 %clear float *outputValues;
108#endif
109
110#ifdef SWIG
111#if SWIGJAVA
112 %apply int32_t[] { const int32 *inputValues };
113 %apply float[] { float *outputValues };
114#endif
115#if SWIGCSHARP
116 %apply int32_t INPUT [] { const int32 *inputValues };
117 %apply float OUTPUT [] { float *outputValues };
118#endif
119#endif
127 virtual void evaluate (const int32 *inputValues, float *outputValues) const = 0;
128#ifdef SWIG
129 %clear const int32 *inputValues;
130 %clear float *outputValues;
131#endif
132};
133
135#define edlobj2IDOMFunction(src) edl_cast((IDOMFunction *)NULL, src)
136
138
139
147{
148#define IDOMSampledFunctionClassID 0x4f107645, 0x3bad4e88, 0xb28abc9d, 0x77fdc5ac
149public:
150
152
157 static const CClassID &classID()
158 {
160 return id;
161 };
162
171
193
199 virtual uint32 getTableDimension(uint32 inputNum) const = 0;
200
205 virtual uint8 getBitsPerSample() const = 0;
206
212
213#ifdef SWIG
214 %apply float &OUTPUT { float &low };
215 %apply float &OUTPUT { float &high };
216#endif
223 virtual void getInputEncode(uint32 inputNum, float &low, float &high) const = 0;
224
231 virtual void getOutputDecode(uint32 outputNum, float &low, float &high) const = 0;
232#ifdef SWIG
233 %clear float &low;
234 %clear float &high;
235#endif
236
244 virtual const CEDLVector<uint8> &getTableData() const = 0;
245
246};
247
249#define edlobj2IDOMSampledFunction(src) edl_cast((IDOMSampledFunction *)NULL, src)
250
259{
260#define IDOMExponentialFunctionClassID 0x2daf61c4, 0x7e1e11dc, 0x83140800, 0x200c9a66
261public:
262
264
269 static const CClassID &classID()
270 {
272 return id;
273 };
274
292
298 virtual float getOutputC0(uint32 outputNum) const = 0;
299
305 virtual float getOutputC1(uint32 outputNum) const = 0;
306
311 virtual float getExponent() const = 0;
312
313};
314
316#define edlobj2IDOMExponentialFunction(src) edl_cast((IDOMExponentialFunction *)NULL, src)
317
318
328{
329#define IDOMStitchingFunctionClassID 0x565924fc, 0x7e2011dc, 0x83140800, 0x200c9a66
330public:
331
333
338 static const CClassID &classID()
339 {
341 return id;
342 };
343
362
367 virtual uint32 getNumFunctions() const = 0;
368
374 virtual IDOMFunctionPtr getFunctionAtIndex(uint32 index) const = 0;
375
380 virtual const CEDLVector<float> &getBoundsVector() const = 0;
381
386 virtual const CEDLVector<float> &getEncodeVector() const = 0;
387
388};
389
391#define edlobj2IDOMStitchingFunction(src) edl_cast((IDOMStitchingFunction *)NULL, src)
392
403{
404#define IDOMGroupingFunctionClassID 0x77077047, 0x5d4a4d47, 0xb4b08719, 0x25b1b24f
405public:
406
408
413 static const CClassID &classID()
414 {
416 return id;
417 };
418
423 class Data : public CClassParams
424 {
425 public:
427 };
428
433 virtual uint32 getNumFunctions() const = 0;
434
440 virtual IDOMFunctionPtr getFunctionAtIndex(uint32 index) const = 0;
441
442};
444#define edlobj2IDOMGroupingFunction(src) edl_cast((IDOMGroupingFunction *)NULL, src)
445
446
454{
455#define IDOMPostScriptCalculatorFunctionClassID 0x220a9a6c, 0x7e2511dc, 0x83140800, 0x200c9a66
456public:
457
459
464 static const CClassID &classID()
465 {
467 return id;
468 };
469
487
492 virtual IInputStreamPtr getCalculatorAsPostScriptStream() const = 0;
493
498 virtual JawsMako::IPDFArrayPtr getCalculator () const = 0;
499};
500
502#define edlobj2IDOMPostScriptCalculatorFunction(src) edl_cast((IDOMPostScriptCalculatorFunction *)NULL, src)
503
504
506
507#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:286
CEDLVector< float > range
Definition idomfunction.h:287
Data()
Definition idomfunction.h:282
float exponent
Definition idomfunction.h:290
CEDLVector< float > c1
Definition idomfunction.h:289
CEDLVector< float > c0
Definition idomfunction.h:288
CEDLVector< float > domain
Definition idomfunction.h:285
Interface for exponential functions. See section 3.9.2 of the PDF 1.7 Reference. Default values are a...
Definition idomfunction.h:259
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:269
virtual float getExponent() const =0
Get the exponent (N) value for the function.
virtual ~IDOMExponentialFunction()
Definition idomfunction.h:263
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:26
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:29
eFunctionType
An enum for the various types of functions.
Definition idomfunction.h:35
@ eFTStitching
Definition idomfunction.h:38
@ eFTExponential
Definition idomfunction.h:37
@ eFTPostScriptCalculator
Definition idomfunction.h:40
@ eFTGrouping
Definition idomfunction.h:39
@ eFTSampled
Definition idomfunction.h:36
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:424
CFunctionVector functions
Definition idomfunction.h:426
Interface to encapsulate an array of x-input-1-output functions.
Definition idomfunction.h:403
virtual ~IDOMGroupingFunction()
Definition idomfunction.h:407
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:413
Abstract interface for objects that can be hashed.
Definition idomhashable.h:28
CEDLVector< float > range
Definition idomfunction.h:483
IEDLClassFactory * pFactory
Definition idomfunction.h:485
CEDLVector< float > domain
Definition idomfunction.h:480
uint32 numInputs
Definition idomfunction.h:481
Data()
Definition idomfunction.h:477
JawsMako::IPDFArrayPtr proc
Definition idomfunction.h:484
uint32 numOutputs
Definition idomfunction.h:482
Interface for PostScript calculator functions. See section 3.9.4 of the PDF 1.7 Reference....
Definition idomfunction.h:454
virtual ~IDOMPostScriptCalculatorFunction()
Definition idomfunction.h:458
static const CClassID & classID()
Retrieves class id of IDOM.
Definition idomfunction.h:464
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:187
eInterpolationMethod interpolationMethod
Definition idomfunction.h:188
uint32 numInputs
Definition idomfunction.h:182
CEDLVector< float > domain
Definition idomfunction.h:183
uint32 numOutputs
Definition idomfunction.h:184
CEDLVector< float > decode
Definition idomfunction.h:190
CEDLVector< float > encode
Definition idomfunction.h:189
CEDLVector< uint32 > size
Definition idomfunction.h:186
Data()
Definition idomfunction.h:179
CEDLVector< uint8 > table
Definition idomfunction.h:191
CEDLVector< float > range
Definition idomfunction.h:185
Interface for sampled functions. See section 3.9.1 of the PDF 1.7 Reference. Default values are as pe...
Definition idomfunction.h:147
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:157
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:151
eInterpolationMethod
Enum for interpolation types.
Definition idomfunction.h:167
@ eCubicInterpolation
Definition idomfunction.h:169
@ eLinearInterpolation
Definition idomfunction.h:168
CEDLVector< float > encode
Definition idomfunction.h:359
CEDLVector< float > bounds
Definition idomfunction.h:358
uint32 numOutputs
Definition idomfunction.h:356
CFunctionVector functions
Definition idomfunction.h:360
CEDLVector< float > domain
Definition idomfunction.h:355
Data()
Definition idomfunction.h:351
CEDLVector< float > range
Definition idomfunction.h:357
Interface for stitching functions. See section 3.9.3 of the PDF 1.7 Reference. Default values are as ...
Definition idomfunction.h:328
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:338
virtual ~IDOMStitchingFunction()
Definition idomfunction.h:332
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:329
#define IDOMSampledFunctionClassID
Definition idomfunction.h:148
CEDLVector< IDOMFunctionPtr > CFunctionVector
Definition idomfunction.h:137
#define IDOMPostScriptCalculatorFunctionClassID
Definition idomfunction.h:455
#define IDOMExponentialFunctionClassID
Definition idomfunction.h:260
#define IDOMGroupingFunctionClassID
Definition idomfunction.h:404
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211