5 #ifndef INCLUDED_OCIO_OPENCOLORIO_H
6 #define INCLUDED_OCIO_OPENCOLORIO_H
67 #pragma warning( push )
68 #pragma warning( disable : 4275 )
112 #pragma warning( pop )
247 const char * archivePath,
248 const char * destinationDir
396 unsigned int getMajorVersion()
const;
403 void setMajorVersion(
unsigned int major);
406 unsigned int getMinorVersion()
const;
409 void setMinorVersion(
unsigned int minor);
412 void setVersion(
unsigned int major,
unsigned int minor);
415 void upgradeToLatestVersion() noexcept;
424 void validate()
const;
433 const char *
getName()
const noexcept;
434 void setName(
const char *
name) noexcept;
442 char getFamilySeparator()
const;
444 static char GetDefaultFamilySeparator() noexcept;
451 void setFamilySeparator(
char separator);
454 void setDescription(
const char * description);
462 void serialize(std::ostream & os)
const;
475 const char * getCacheID()
const;
486 void addEnvironmentVar(
const char * name,
const char * defaultValue);
487 int getNumEnvironmentVars()
const;
488 const char * getEnvironmentVarNameByIndex(
int index)
const;
489 const char * getEnvironmentVarDefault(
const char * name)
const;
490 void clearEnvironmentVars();
506 void loadEnvironment() noexcept;
508 const char * getSearchPath()
const;
515 void setSearchPath(
const char *
path);
517 int getNumSearchPaths()
const;
524 const char * getSearchPath(
int index)
const;
525 void clearSearchPaths();
534 void addSearchPath(
const char * path);
536 const char * getWorkingDir()
const;
546 void setWorkingDir(
const char * dirname);
591 int getNumColorSpaces()
const;
599 const char * getColorSpaceNameByIndex(
int index)
const;
609 int getIndexForColorSpace(
const char * name)
const;
625 const char * getCanonicalName(
const char * name)
const;
650 void removeColorSpace(
const char * name);
658 bool isColorSpaceUsed(
const char * name)
const noexcept;
667 void clearColorSpaces();
683 void setInactiveColorSpaces(
const char * inactiveColorSpaces);
684 const char * getInactiveColorSpaces()
const;
687 bool isInactiveColorSpace(
const char * colorspace)
const noexcept;
724 bool isColorSpaceLinear(
const char * colorSpace,
ReferenceSpaceType referenceSpaceType)
const;
745 static const char * IdentifyBuiltinColorSpace(
const ConstConfigRcPtr & srcConfig,
747 const char * builtinColorSpaceName);
779 static void IdentifyInterchangeSpace(
const char ** srcInterchangeName,
780 const char ** builtinInterchangeName,
782 const char * srcColorSpaceName,
784 const char * builtinColorSpaceName);
804 void setRole(
const char * role,
const char * colorSpaceName);
805 int getNumRoles()
const;
807 bool hasRole(
const char * role)
const;
814 const char * getRoleName(
int index)
const;
820 const char * getRoleColorSpace(
int index)
const;
826 const char * getRoleColorSpace(
const char * roleName)
const noexcept;
853 void addSharedView(
const char *
view,
const char * viewTransformName,
854 const char * colorSpaceName,
const char * looks,
855 const char * ruleName,
const char * description);
857 void removeSharedView(
const char * view);
860 int getNumDisplays()
const;
862 const char * getDisplay(
int index)
const;
867 const char *
getDefaultView(
const char * display,
const char * colorspaceName)
const;
873 int getNumViews(
const char * display)
const;
874 const char * getView(
const char * display,
int index)
const;
880 int getNumViews(
const char * display,
const char * colorspaceName)
const;
881 const char * getView(
const char * display,
const char * colorspaceName,
int index)
const;
887 const char * getDisplayViewTransformName(
const char * display,
const char * view)
const;
892 const char * getDisplayViewColorSpaceName(
const char * display,
const char * view)
const;
894 const char * getDisplayViewLooks(
const char * display,
const char * view)
const;
896 const char * getDisplayViewRule(
const char * display,
const char * view)
const noexcept;
898 const char * getDisplayViewDescription(
const char * display,
const char * view)
const noexcept;
904 void addDisplayView(
const char * display,
const char * view,
905 const char * colorSpaceName,
const char * looks);
919 void addDisplayView(
const char * display,
const char * view,
const char * viewTransformName,
920 const char * colorSpaceName,
const char * looks,
921 const char * ruleName,
const char * description);
932 void addDisplaySharedView(
const char * display,
const char * sharedView);
943 void removeDisplayView(
const char * display,
const char * view);
945 void clearDisplays();
963 void addVirtualDisplayView(
const char * view,
964 const char * viewTransformName,
965 const char * colorSpaceName,
967 const char * ruleName,
968 const char * description);
970 void addVirtualDisplaySharedView(
const char * sharedView);
973 int getVirtualDisplayNumViews(
ViewType type)
const noexcept;
975 const char * getVirtualDisplayView(
ViewType type,
int index)
const noexcept;
977 const char * getVirtualDisplayViewTransformName(
const char * view)
const noexcept;
978 const char * getVirtualDisplayViewColorSpaceName(
const char * view)
const noexcept;
979 const char * getVirtualDisplayViewLooks(
const char * view)
const noexcept;
980 const char * getVirtualDisplayViewRule(
const char * view)
const noexcept;
981 const char * getVirtualDisplayViewDescription(
const char * view)
const noexcept;
984 void removeVirtualDisplayView(
const char * view) noexcept;
987 void clearVirtualDisplay() noexcept;
1014 int instantiateDisplayFromMonitorName(
const char * monitorName);
1026 int instantiateDisplayFromICCProfile(
const char * ICCProfileFilepath);
1042 void setActiveDisplays(
const char * displays);
1060 void setActiveViews(
const char * views);
1064 int getNumDisplaysAll()
const noexcept;
1065 const char * getDisplayAll(
int index)
const noexcept;
1066 int getDisplayAllByName(
const char *)
const noexcept;
1071 bool isDisplayTemporary(
int index)
const noexcept;
1079 int getNumViews(
ViewType type,
const char * display)
const;
1080 const char * getView(
ViewType type,
const char * display,
int index)
const;
1114 void getDefaultLumaCoefs(
double * rgb)
const;
1116 void setDefaultLumaCoefs(
const double * rgb);
1127 int getNumLooks()
const;
1129 const char * getLookNameByIndex(
int index)
const;
1142 int getNumViewTransforms()
const noexcept;
1146 const char * getViewTransformNameByIndex(
int i)
const noexcept;
1168 const char * getDefaultViewTransformName()
const noexcept;
1169 void setDefaultViewTransformName(
const char * defaultName) noexcept;
1172 void clearViewTransforms();
1189 int index)
const noexcept;
1192 int getNumNamedTransforms()
const noexcept;
1195 const char * getNamedTransformNameByIndex(
int index)
const noexcept;
1198 int getIndexForNamedTransform(
const char * name)
const noexcept;
1216 void clearNamedTransforms();
1235 const char * getColorSpaceFromFilepath(
const char * filePath)
const;
1243 const char * getColorSpaceFromFilepath(
const char * filePath,
size_t & ruleIndex)
const;
1252 bool filepathOnlyMatchesDefaultRule(
const char * filePath)
const;
1263 OCIO_DEPRECATED(
"This was marked as deprecated starting in v2.0, please use Config::getColorSpaceFromFilepath().")
1266 bool isStrictParsingEnabled()
const;
1267 void setStrictParsingEnabled(
bool enabled);
1292 const char * dstColorSpaceName)
const;
1294 const char * srcColorSpaceName,
1295 const char * dstColorSpaceName)
const;
1300 const char * display,
1305 const char * srcColorSpaceName,
1306 const char * display,
1320 const char * namedTransformName,
1363 const char * srcColorSpaceName,
1364 const char * builtinColorSpaceName);
1372 static ConstProcessorRcPtr GetProcessorFromBuiltinColorSpace(
const char * builtinColorSpaceName,
1374 const char * srcColorSpaceName);
1384 const char * srcColorSpaceName,
1386 const char * dstColorSpaceName);
1389 const char * srcColorSpaceName,
1392 const char * dstColorSpaceName);
1402 const char * srcColorSpaceName,
1403 const char * srcInterchangeName,
1405 const char * dstColorSpaceName,
1406 const char * dstInterchangeName);
1410 const char * srcColorSpaceName,
1411 const char * srcInterchangeName,
1414 const char * dstColorSpaceName,
1415 const char * dstInterchangeName);
1422 const char * srcColorSpaceName,
1424 const char * dstDisplay,
1425 const char * dstView,
1430 const char * srcColorSpaceName,
1433 const char * dstDisplay,
1434 const char * dstView,
1442 const char * srcColorSpaceName,
1443 const char * srcInterchangeName,
1445 const char * dstDisplay,
1446 const char * dstView,
1447 const char * dstInterchangeName,
1452 const char * srcColorSpaceName,
1453 const char * srcInterchangeName,
1456 const char * dstDisplay,
1457 const char * dstView,
1458 const char * dstInterchangeName,
1476 void clearProcessorCache() noexcept;
1506 bool isArchivable()
const;
1532 void archive(std::ostream & ostream)
const;
1543 static void deleter(
Config*
c);
1547 Impl * getImpl() {
return m_impl; }
1548 const Impl * getImpl()
const {
return m_impl; }
1624 size_t getNumEntries() const noexcept;
1627 size_t getIndexForRule(const
char * ruleName) const;
1630 const
char *
getName(
size_t ruleIndex) const;
1633 const
char * getPattern(
size_t ruleIndex) const;
1634 void setPattern(
size_t ruleIndex, const
char *
pattern);
1637 const
char * getExtension(
size_t ruleIndex) const;
1638 void setExtension(
size_t ruleIndex, const
char *
extension);
1641 const
char * getRegex(
size_t ruleIndex) const;
1642 void setRegex(
size_t ruleIndex, const
char * regex);
1645 const
char * getColorSpace(
size_t ruleIndex) const;
1646 void setColorSpace(
size_t ruleIndex, const
char * colorSpace);
1649 size_t getNumCustomKeys(
size_t ruleIndex) const;
1651 const
char * getCustomKeyName(
size_t ruleIndex,
size_t key) const;
1653 const
char * getCustomKeyValue(
size_t ruleIndex,
size_t key) const;
1658 void setCustomKey(
size_t ruleIndex, const
char * key, const
char *
value);
1674 void insertRule(
size_t ruleIndex, const
char *
name, const
char * colorSpace,
1675 const
char * pattern, const
char * extension);
1676 void insertRule(
size_t ruleIndex, const
char * name, const
char * colorSpace,
1677 const
char * regex);
1684 void insertPathSearchRule(
size_t ruleIndex);
1686 void setDefaultRuleColorSpace(const
char * colorSpace);
1695 void removeRule(
size_t ruleIndex);
1698 void increaseRulePriority(
size_t ruleIndex);
1701 void decreaseRulePriority(
size_t ruleIndex);
1707 bool isDefault() const noexcept;
1718 static
void deleter(FileRules*
c);
1724 Impl * getImpl() {
return m_impl; }
1725 const Impl * getImpl()
const {
return m_impl; }
1763 size_t getNumEntries()
const noexcept;
1769 size_t getIndexForRule(
const char * ruleName)
const;
1772 const char *
getName(
size_t ruleIndex)
const;
1775 size_t getNumColorSpaces(
size_t ruleIndex)
const;
1777 const char * getColorSpace(
size_t ruleIndex,
size_t colorSpaceIndex)
const;
1785 void addColorSpace(
size_t ruleIndex,
const char * colorSpace);
1787 void removeColorSpace(
size_t ruleIndex,
size_t colorSpaceIndex);
1790 size_t getNumEncodings(
size_t ruleIndex)
const;
1792 const char * getEncoding(
size_t ruleIndex,
size_t encodingIndex)
const;
1800 void addEncoding(
size_t ruleIndex,
const char * encoding);
1802 void removeEncoding(
size_t ruleIndex,
size_t encodingIndex);
1805 size_t getNumCustomKeys(
size_t ruleIndex)
const;
1807 const char * getCustomKeyName(
size_t ruleIndex,
size_t keyIndex)
const;
1809 const char * getCustomKeyValue(
size_t ruleIndex,
size_t keyIndex)
const;
1814 void setCustomKey(
size_t ruleIndex,
const char * key,
const char *
value);
1825 void insertRule(
size_t ruleIndex,
const char * ruleName);
1828 void removeRule(
size_t ruleIndex);
1844 Impl * getImpl() {
return m_impl; }
1845 const Impl * getImpl()
const {
return m_impl; }
1872 const char *
getName()
const noexcept;
1874 void setName(
const char *
name) noexcept;
1876 size_t getNumAliases()
const noexcept;
1878 const char * getAlias(
size_t idx)
const noexcept;
1886 void addAlias(
const char * alias) noexcept;
1888 void removeAlias(
const char * alias) noexcept;
1889 void clearAliases() noexcept;
1896 const char * getFamily()
const noexcept;
1898 void setFamily(
const char * family);
1907 const char * getEqualityGroup()
const noexcept;
1908 void setEqualityGroup(
const char * equalityGroup);
1911 void setDescription(
const char * description);
1913 BitDepth getBitDepth()
const noexcept;
1914 void setBitDepth(
BitDepth bitDepth);
1943 bool hasCategory(
const char * category)
const;
1950 void addCategory(
const char * category);
1957 void removeCategory(
const char * category);
1959 int getNumCategories()
const;
1966 const char * getCategory(
int index)
const;
1968 void clearCategories();
1988 const char * getEncoding()
const noexcept;
1989 void setEncoding(
const char * encoding);
2003 bool isData()
const noexcept;
2004 void setIsData(
bool isData) noexcept;
2014 void setAllocation(
Allocation allocation) noexcept;
2029 int getAllocationNumVars()
const;
2031 void setAllocationVars(
int numvars,
const float * vars);
2059 Impl * getImpl() {
return m_impl; }
2060 const Impl * getImpl()
const {
return m_impl; }
2104 int getNumColorSpaces()
const;
2109 const char * getColorSpaceNameByIndex(
int index)
const;
2131 int getColorSpaceIndex(
const char * name)
const;
2142 bool hasColorSpace(
const char * name)
const;
2162 void removeColorSpace(
const char * name);
2166 void clearColorSpaces();
2181 Impl * getImpl() {
return m_impl; }
2182 const Impl * getImpl()
const {
return m_impl; }
2244 void setName(
const char *
name);
2246 const char * getProcessSpace()
const;
2247 void setProcessSpace(
const char * processSpace);
2258 void setDescription(
const char * description);
2268 static void deleter(
Look*
c);
2272 Impl * getImpl() {
return m_impl; }
2273 const Impl * getImpl()
const {
return m_impl; }
2294 virtual const char *
getName()
const noexcept = 0;
2295 virtual void setName(
const char *
name) noexcept = 0;
2298 virtual size_t getNumAliases()
const noexcept = 0;
2300 virtual const char * getAlias(
size_t idx)
const noexcept = 0;
2305 virtual void addAlias(
const char * alias) noexcept = 0;
2307 virtual void removeAlias(
const char * alias) noexcept = 0;
2308 virtual void clearAliases() noexcept = 0;
2311 virtual const char * getFamily()
const noexcept = 0;
2313 virtual void setFamily(
const char * family) noexcept = 0;
2316 virtual void setDescription(
const char * description) noexcept = 0;
2319 virtual bool hasCategory(
const char * category)
const noexcept = 0;
2321 virtual void addCategory(
const char * category) noexcept = 0;
2323 virtual void removeCategory(
const char * category) noexcept = 0;
2325 virtual int getNumCategories()
const noexcept = 0;
2327 virtual const char * getCategory(
int index)
const noexcept = 0;
2329 virtual void clearCategories() noexcept = 0;
2336 virtual const char * getEncoding()
const noexcept = 0;
2337 virtual void setEncoding(
const char * encoding) noexcept = 0;
2382 const char *
getName()
const noexcept;
2383 void setName(
const char *
name) noexcept;
2386 const char * getFamily()
const noexcept;
2388 void setFamily(
const char * family);
2391 void setDescription(
const char * description);
2394 bool hasCategory(
const char * category)
const;
2396 void addCategory(
const char * category);
2398 void removeCategory(
const char * category);
2400 int getNumCategories()
const;
2402 const char * getCategory(
int index)
const;
2404 void clearCategories();
2433 Impl * getImpl() {
return m_impl; }
2434 const Impl * getImpl()
const {
return m_impl; }
2451 bool isNoOp()
const;
2457 bool hasChannelCrosstalk()
const;
2459 const char * getCacheID()
const;
2478 int getNumTransforms()
const;
2516 bool isDynamic()
const noexcept;
2547 unsigned edgelen)
const;
2603 Impl * getImpl() {
return m_impl; }
2604 const Impl * getImpl()
const {
return m_impl; }
2615 bool isNoOp()
const;
2623 bool hasChannelCrosstalk()
const;
2625 const char * getCacheID()
const;
2630 BitDepth getOutputBitDepth()
const;
2645 bool isDynamic()
const noexcept;
2651 void apply(
const ImageDesc & imgDesc)
const;
2663 void applyRGB(
float * pixel)
const;
2664 void applyRGBA(
float * pixel)
const;
2680 Impl * getImpl() {
return m_impl; }
2681 const Impl * getImpl()
const {
return m_impl; }
2691 bool isNoOp()
const;
2693 bool hasChannelCrosstalk()
const;
2695 const char * getCacheID()
const;
2717 Impl * getImpl() {
return m_impl; }
2718 const Impl * getImpl()
const {
return m_impl; }
2734 int getNumFiles()
const;
2735 const char * getFile(
int index)
const;
2737 int getNumLooks()
const;
2738 const char * getLook(
int index)
const;
2740 void addFile(
const char * fname);
2741 void addLook(
const char * look);
2755 Impl * getImpl() {
return m_impl; }
2756 const Impl * getImpl()
const {
return m_impl; }
2799 const char * getFormat()
const;
2801 void setFormat(
const char * formatName);
2814 const char * getInputSpace()
const;
2816 void setInputSpace(
const char * inputSpace);
2818 const char * getShaperSpace()
const;
2825 void setShaperSpace(
const char * shaperSpace);
2834 void setLooks(
const char * looks);
2836 const char * getTargetSpace()
const;
2838 void setTargetSpace(
const char * targetSpace);
2840 const char * getDisplay()
const;
2841 const char * getView()
const;
2843 void setDisplayView(
const char * display,
const char *
view);
2845 int getShaperSize()
const;
2851 void setShaperSize(
int shapersize);
2853 int getCubeSize()
const;
2858 void setCubeSize(
int cubesize);
2861 void bake(std::ostream & os)
const;
2864 static int getNumFormats();
2870 static const char * getFormatNameByIndex(
int index);
2875 static const char * getFormatExtensionByIndex(
int index);
2885 static void deleter(
Baker* o);
2889 Impl * getImpl() {
return m_impl; }
2890 const Impl * getImpl()
const {
return m_impl; }
2912 virtual void * getRData()
const = 0;
2914 virtual void * getGData()
const = 0;
2916 virtual void * getBData()
const = 0;
2921 virtual void * getAData()
const = 0;
2924 virtual BitDepth getBitDepth()
const = 0;
2927 virtual long getWidth()
const = 0;
2929 virtual long getHeight()
const = 0;
2932 virtual ptrdiff_t getXStrideBytes()
const = 0;
2937 virtual ptrdiff_t getYStrideBytes()
const = 0;
2944 virtual bool isRGBAPacked()
const = 0;
2946 virtual bool isFloat()
const = 0;
2987 long width,
long height,
2990 ptrdiff_t chanStrideBytes,
2991 ptrdiff_t xStrideBytes,
2992 ptrdiff_t yStrideBytes);
2995 long width,
long height,
2999 long width,
long height,
3002 ptrdiff_t chanStrideBytes,
3003 ptrdiff_t xStrideBytes,
3004 ptrdiff_t yStrideBytes);
3012 BitDepth getBitDepth()
const override;
3015 void * getData()
const;
3017 void * getRData()
const override;
3018 void * getGData()
const override;
3019 void * getBData()
const override;
3020 void * getAData()
const override;
3022 long getWidth()
const override;
3023 long getHeight()
const override;
3024 long getNumChannels()
const;
3026 ptrdiff_t getChanStrideBytes()
const;
3027 ptrdiff_t getXStrideBytes()
const override;
3028 ptrdiff_t getYStrideBytes()
const override;
3030 bool isRGBAPacked()
const override;
3031 bool isFloat()
const override;
3036 Impl * getImpl() {
return m_impl; }
3037 const Impl * getImpl()
const {
return m_impl; }
3061 PlanarImageDesc(
void * rData,
void * gData,
void * bData,
void * aData,
3071 PlanarImageDesc(
void * rData,
void * gData,
void * bData,
void * aData,
3072 long width,
long height,
3074 ptrdiff_t xStrideBytes,
3075 ptrdiff_t yStrideBytes);
3079 void * getRData()
const override;
3080 void * getGData()
const override;
3081 void * getBData()
const override;
3082 void * getAData()
const override;
3085 BitDepth getBitDepth()
const override;
3087 long getWidth()
const override;
3088 long getHeight()
const override;
3090 ptrdiff_t getXStrideBytes()
const override;
3091 ptrdiff_t getYStrideBytes()
const override;
3093 bool isRGBAPacked()
const override;
3094 bool isFloat()
const override;
3099 Impl * getImpl() {
return m_impl; }
3100 const Impl * getImpl()
const {
return m_impl; }
3172 const char * getUniqueID()
const noexcept;
3173 void setUniqueID(
const char * uid) noexcept;
3179 const char * getFunctionName()
const noexcept;
3181 void setFunctionName(
const char *
name) noexcept;
3183 const char * getPixelName()
const noexcept;
3185 void setPixelName(
const char * name) noexcept;
3194 const char * getResourcePrefix()
const noexcept;
3196 void setResourcePrefix(
const char * prefix) noexcept;
3198 virtual const char * getCacheID()
const noexcept;
3201 virtual void begin(
const char * uid);
3206 virtual void setTextureMaxWidth(
unsigned maxWidth) = 0;
3207 virtual unsigned getTextureMaxWidth()
const noexcept = 0;
3210 virtual void setAllowTexture1D(
bool allowed) = 0;
3211 virtual bool getAllowTexture1D()
const = 0;
3217 unsigned getNextResourceIndex() noexcept;
3232 virtual bool addUniform(
const char * name,
3235 virtual bool addUniform(
const char * name,
3238 virtual bool addUniform(
const char * name,
3241 virtual bool addUniform(
const char * name,
3245 virtual bool addUniform(
const char * name,
3253 unsigned getNumDynamicProperties() const noexcept;
3284 virtual void addTexture(
const char * textureName,
3285 const char * samplerName,
3287 TextureType channel,
3288 TextureDimensions dimensions,
3290 const float *
values) = 0;
3300 virtual void add3DTexture(
const char * textureName,
3301 const char * samplerName,
3304 const float *
values) = 0;
3307 virtual void addToDeclareShaderCode(
const char * shaderCode);
3308 virtual void addToHelperShaderCode(
const char * shaderCode);
3309 virtual void addToFunctionHeaderShaderCode(
const char * shaderCode);
3310 virtual void addToFunctionShaderCode(
const char * shaderCode);
3311 virtual void addToFunctionFooterShaderCode(
const char * shaderCode);
3321 virtual void createShaderText(
const char * shaderDeclarations,
3322 const char * shaderHelperMethods,
3323 const char * shaderFunctionHeader,
3324 const char * shaderFunctionBody,
3325 const char * shaderFunctionFooter);
3327 virtual void finalize();
3528 virtual unsigned getNumUniforms() const noexcept = 0;
3530 virtual const
char * getUniform(
unsigned index, UniformData &
data) const = 0;
3533 virtual
unsigned getNumTextures() const noexcept = 0;
3534 virtual
void getTexture(
unsigned index,
3535 const
char *& textureName,
3536 const
char *& samplerName,
3539 TextureType & channel,
3540 TextureDimensions & dimensions,
3542 virtual
void getTextureValues(
unsigned index, const
float *&
values) const = 0;
3545 virtual
unsigned getNum3DTextures() const noexcept = 0;
3546 virtual
void get3DTexture(
unsigned index,
3547 const
char *& textureName,
3548 const
char *& samplerName,
3551 virtual
void get3DTextureValues(
unsigned index, const
float *&
values) const = 0;
3554 const
char * getShaderText() const noexcept;
3610 const char * getCacheID()
const;
3612 void setSearchPath(
const char *
path);
3613 const char * getSearchPath()
const;
3615 int getNumSearchPaths()
const;
3616 const char * getSearchPath(
int index)
const;
3617 void clearSearchPaths();
3618 void addSearchPath(
const char * path);
3619 void setWorkingDir(
const char * dirname);
3620 const char * getWorkingDir()
const;
3625 void setStringVar(
const char *
name,
const char *
value) noexcept;
3628 const char * getStringVar(
const char * name)
const noexcept;
3630 int getNumStringVars()
const;
3631 const char * getStringVarNameByIndex(
int index)
const;
3633 const char * getStringVarByIndex(
int index)
const;
3635 void clearStringVars();
3645 void loadEnvironment() noexcept;
3650 const char * resolveStringVar(
const char *
string)
const noexcept;
3653 const char * resolveStringVar(
const char *
string,
ContextRcPtr & usedContextVars)
const noexcept;
3665 const char * resolveFileLocation(
const char *
filename)
const;
3668 const char * resolveFileLocation(
const char * filename,
ContextRcPtr & usedContextVars)
const;
3675 Context(
const Context &) =
delete;
3676 Context&
operator= (
const Context &) =
delete;
3683 static void deleter(Context*
c);
3687 Impl * getImpl() {
return m_impl; }
3688 const Impl * getImpl()
const {
return m_impl; }
3711 virtual size_t getNumBuiltins()
const noexcept = 0;
3716 virtual const char * getBuiltinStyle(
size_t index)
const = 0;
3718 virtual const char * getBuiltinDescription(
size_t index)
const = 0;
3741 virtual size_t getNumBuiltinConfigs()
const noexcept = 0;
3745 virtual const char * getBuiltinConfigName(
size_t configIndex)
const = 0;
3749 virtual const char * getBuiltinConfigUIName(
size_t configIndex)
const = 0;
3753 virtual const char * getBuiltinConfig(
size_t configIndex)
const = 0;
3757 virtual const char * getBuiltinConfigByName(
const char * configName)
const = 0;
3771 virtual bool isBuiltinConfigRecommended(
size_t configIndex)
const = 0;
3774 OCIO_DEPRECATED(
"This was marked as deprecated starting in v2.3, please use ResolveConfigPath(\"ocio://default\").")
3775 virtual const char * getDefaultBuiltinConfigName()
const = 0;
3801 virtual bool isSupported()
const noexcept = 0;
3808 virtual size_t getNumMonitors()
const noexcept = 0;
3817 virtual const char * getMonitorName(
size_t idx)
const = 0;
3819 virtual const char * getProfileFilepath(
size_t idx)
const = 0;
3852 virtual std::vector<uint8_t> getLutData(
const char * filepath)
const = 0;
3878 virtual std::string getFastLutFileHash(
const char * filepath)
const = 0;
3883 #endif // INCLUDED_OCIO_OPENCOLORIO_H
OCIOEXPORT ConstConfigRcPtr GetCurrentConfig()
Get the current configuration.
EnvironmentMode
Controls which environment variables are loaded into a Context object.
GLuint GLsizei const GLchar * message
OCIO_SHARED_PTR< const ViewTransform > ConstViewTransformRcPtr
static const char * DefaultRuleName
Reserved rule name for the default rule.
class OCIOEXPORT GpuShaderDesc
PXL_API const char * getDescription(const ColorSpace *space)
Return the description of the color space.
GT_API const UT_StringHolder filename
OCIOEXPORT ConstColorSpaceSetRcPtr operator&&(const ConstColorSpaceSetRcPtr &lcss, const ConstColorSpaceSetRcPtr &rcss)
Perform the intersection of two sets.
PXL_API void getColorSpaces(UT_StringArray &names)
Returns a list of the supported color spaces.
This class holds the GPU-related information needed to build a shader program from a specific process...
std::function< const float *()> VectorFloatGetter
Function returning a float *, used by uniforms.
class OCIOEXPORT ColorSpaceSet
OCIOEXPORT void SetLoggingLevel(LoggingLevel level)
Set the global logging level.
OCIO_SHARED_PTR< ViewingRules > ViewingRulesRcPtr
OCIOEXPORT void SetComputeHashFunction(ComputeHashFunction hashFunction)
Set the Compute Hash Function to use; otherwise, use the default.
OCIO_SHARED_PTR< GpuShaderCreator > GpuShaderCreatorRcPtr
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
PXL_API void getActiveViews(UT_StringArray &names)
Returns the list of active views.
ChannelOrdering
Used by PackedImageDesc to indicate the channel ordering of the image to process. ...
This is a light-weight wrapper around an image, that provides a context for pixel access...
OCIO_SHARED_PTR< Processor > ProcessorRcPtr
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
GLsizei const GLchar *const * string
class OCIOEXPORT BuiltinTransformRegistry
GLsizei const GLchar *const * path
OptimizationFlags
Provides control over how the ops in a Processor are combined in order to improve performance...
const Impl * getImpl() const
class OCIOEXPORT ViewingRules
OCIO_SHARED_PTR< const Transform > ConstTransformRcPtr
bool isIdentity(const MatType &m)
Determine if a matrix is an identity matrix.
OCIO_SHARED_PTR< FileRules > FileRulesRcPtr
std::function< int()> SizeGetter
Function returning an int, used by uniforms.
An exception class to throw for errors detected at runtime.
OCIO_SHARED_PTR< const BuiltinTransformRegistry > ConstBuiltinTransformRegistryRcPtr
OCIOEXPORT bool operator!=(const GradingRGBM &lhs, const GradingRGBM &rhs)
std::function< const Float3 &()> Float3Getter
Functions returning a Float3, used by uniforms.
OCIO_SHARED_PTR< ConfigIOProxy > ConfigIOProxyRcPtr
Only need a red channel texture.
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
PXL_API const char * getDefaultView(const char *display=NULL)
Returns the current color space name.
DynamicPropertyType
Types for dynamic properties.
GLenum GLenum GLsizei const GLuint GLboolean enabled
OCIOEXPORT void LogMessage(LoggingLevel level, const char *message)
Log a message using the library logging function.
class OCIOEXPORT Exception
OCIOEXPORT int GetVersionHex()
Get the version number for the library, as a single 4-byte hex number (e.g., 0x01050200 for "1...
OCIO_SHARED_PTR< const NamedTransform > ConstNamedTransformRcPtr
static const char * FilePathSearchRuleName
Reserved rule name for the file path search rule.
std::function< const int *()> VectorIntGetter
Function returning an int *, used by uniforms.
OCIOEXPORT void ClearAllCaches()
GpuLanguage
Used when there is a choice of hardware shader language.
ProcessorCacheFlags
cpp:type:: Enum to control the behavior of the internal caches e.g. the processor cache in ...
OCIO_SHARED_PTR< Look > LookRcPtr
OCIO_SHARED_PTR< const ProcessorMetadata > ConstProcessorMetadataRcPtr
class OCIOEXPORT GpuShaderCreator
GLint GLsizei GLsizei height
OCIO_SHARED_PTR< const Context > ConstContextRcPtr
OCIOEXPORT ConstColorSpaceSetRcPtr operator||(const ConstColorSpaceSetRcPtr &lcss, const ConstColorSpaceSetRcPtr &rcss)
Perform the union of two sets.
class OCIOEXPORT CPUProcessor
OCIO_SHARED_PTR< ProcessorMetadata > ProcessorMetadataRcPtr
OCIO_SHARED_PTR< const CPUProcessor > ConstCPUProcessorRcPtr
OCIOEXPORT void SetLoggingFunction(LoggingFunction logFunction)
Set the logging function to use; otherwise, use the default (i.e. std::cerr).
OCIOEXPORT void ResetToDefaultLoggingFunction()
class OCIOEXPORT ViewTransform
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
class OCIOEXPORT ConfigIOProxy
OCIO_SHARED_PTR< Baker > BakerRcPtr
OCIOEXPORT const char * GetEnvVariable(const char *name)
class OCIOEXPORT ProcessorMetadata
A config defines all the color spaces to be available at runtime.
class OCIOEXPORT GPUProcessor
PXL_API bool getAllocationVars(const ColorSpace *space, bool &uniform, fpreal &min, fpreal &max, fpreal &offset)
Return the allocation variable meta data about the color space.
OPENVDB_API void setVersion(std::ios_base &, const VersionId &libraryVersion, uint32_t fileVersion)
Associate specific file format and library version numbers with the given stream. ...
std::function< void(const char *)> LoggingFunction
Define the logging function signature.
std::function< double()> DoubleGetter
Function returning a double, used by uniforms. GPU converts double to float.
OCIOEXPORT void SetEnvVariable(const char *name, const char *value)
OCIO_SHARED_PTR< const Processor > ConstProcessorRcPtr
GLuint const GLchar * name
OCIO_SHARED_PTR< const ColorSpaceSet > ConstColorSpaceSetRcPtr
OCIO_SHARED_PTR< const FileRules > ConstFileRulesRcPtr
#define OCIO_DEPRECATED(msg)
PXL_API const char * getDefaultDisplay()
Returns the current color space name.
GA_API const UT_StringHolder transform
OCIOEXPORT void ResetComputeHashFunction()
PXL_API const char * parseColorSpaceFromString(const char *string)
OCIOEXPORT const char * GetVersion()
Get the version number for the library, as a dot-delimited string (e.g., "1.0.0").
UniformDataType
Types for uniform data.
std::function< std::string(const std::string &)> ComputeHashFunction
Define Compute Hash function signature.
OCIO_SHARED_PTR< const SystemMonitors > ConstSystemMonitorsRcPtr
std::function< bool()> BoolGetter
Function returning a bool, used by uniforms.
OCIO_SHARED_PTR< ColorSpaceSet > ColorSpaceSetRcPtr
OCIO_SHARED_PTR< const Config > ConstConfigRcPtr
OCIO_SHARED_PTR< NamedTransform > NamedTransformRcPtr
OCIO_SHARED_PTR< const Look > ConstLookRcPtr
GLenum GLsizei GLsizei GLint * values
class OCIOEXPORT Processor
OCIOEXPORT bool operator==(const GradingRGBM &lhs, const GradingRGBM &rhs)
class OCIOEXPORT ImageDesc
OCIO_SHARED_PTR< Config > ConfigRcPtr
LeafData & operator=(const LeafData &)=delete
class OCIOEXPORT NamedTransform
OCIO_SHARED_PTR< Context > ContextRcPtr
OCIOEXPORT void SetCurrentConfig(const ConstConfigRcPtr &config)
Set the current configuration. This will then store a copy of the specified config.
OCIOEXPORT void ExtractOCIOZArchive(const char *archivePath, const char *destinationDir)
Extract an OCIO Config archive.
OCIOEXPORT std::ostream & operator<<(std::ostream &, const ColorSpaceMenuParameters &)
OCIO_SHARED_PTR< GpuShaderDesc > GpuShaderDescRcPtr
class OCIOEXPORT FileRules
OCIOEXPORT void UnsetEnvVariable(const char *name)
OCIOEXPORT bool IsEnvVariablePresent(const char *name)
cpp:function::
class OCIOEXPORT SystemMonitors
OCIO_SHARED_PTR< GroupTransform > GroupTransformRcPtr
class OCIOEXPORT ColorSpace
PXL_API void getLooks(UT_StringArray &looks)
Returns a list of looks (color transforms)
const ptrdiff_t AutoStride
OCIO_SHARED_PTR< const ViewingRules > ConstViewingRulesRcPtr
PXL_API void getActiveDisplays(UT_StringArray &names)
Returns the list of active displays.
OCIO_SHARED_PTR< ColorSpace > ColorSpaceRcPtr
OCIOEXPORT const char * ResolveConfigPath(const char *originalPath) noexcept
Make a config path forward-compatible by replacing special built-in config names with the current nam...
OCIOEXPORT LoggingLevel GetLoggingLevel()
Get the global logging level.
An exception class for errors detected at runtime.
OCIO_SHARED_PTR< const ColorSpace > ConstColorSpaceRcPtr
OCIOEXPORT ConstColorSpaceSetRcPtr operator-(const ConstColorSpaceSetRcPtr &lcss, const ConstColorSpaceSetRcPtr &rcss)
Perform the difference of two sets.
OIIO_UTIL_API std::string extension(string_view filepath, bool include_dot=true) noexcept
OCIO_SHARED_PTR< const GPUProcessor > ConstGPUProcessorRcPtr
The File Rules are a set of filepath to color space mappings that are evaluated from first to last...
OCIO_SHARED_PTR< ViewTransform > ViewTransformRcPtr
OCIO_SHARED_PTR< DynamicProperty > DynamicPropertyRcPtr
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.