5 #ifndef INCLUDED_OCIO_OPENCOLORIO_H
6 #define INCLUDED_OCIO_OPENCOLORIO_H
68 #pragma warning( push )
69 #pragma warning( disable : 4275 )
113 #pragma warning( pop )
248 const char * archivePath,
249 const char * destinationDir
399 unsigned int getMajorVersion()
const;
406 void setMajorVersion(
unsigned int major);
409 unsigned int getMinorVersion()
const;
412 void setMinorVersion(
unsigned int minor);
415 void setVersion(
unsigned int major,
unsigned int minor);
418 void upgradeToLatestVersion() noexcept;
427 void validate()
const;
436 const char *
getName()
const noexcept;
437 void setName(
const char *
name) noexcept;
445 char getFamilySeparator()
const;
447 static char GetDefaultFamilySeparator() noexcept;
454 void setFamilySeparator(
char separator);
457 void setDescription(
const char * description);
465 void serialize(std::ostream & os)
const;
478 const char * getCacheID()
const;
489 void addEnvironmentVar(
const char * name,
const char * defaultValue);
490 int getNumEnvironmentVars()
const;
491 const char * getEnvironmentVarNameByIndex(
int index)
const;
492 const char * getEnvironmentVarDefault(
const char * name)
const;
493 void clearEnvironmentVars();
509 void loadEnvironment() noexcept;
511 const char * getSearchPath()
const;
518 void setSearchPath(
const char *
path);
520 int getNumSearchPaths()
const;
527 const char * getSearchPath(
int index)
const;
528 void clearSearchPaths();
537 void addSearchPath(
const char * path);
539 const char * getWorkingDir()
const;
549 void setWorkingDir(
const char * dirname);
594 int getNumColorSpaces()
const;
602 const char * getColorSpaceNameByIndex(
int index)
const;
612 int getIndexForColorSpace(
const char * name)
const;
628 const char * getCanonicalName(
const char * name)
const;
653 void removeColorSpace(
const char * name);
661 bool isColorSpaceUsed(
const char * name)
const noexcept;
670 void clearColorSpaces();
686 void setInactiveColorSpaces(
const char * inactiveColorSpaces);
687 const char * getInactiveColorSpaces()
const;
690 bool isInactiveColorSpace(
const char * colorspace)
const noexcept;
727 bool isColorSpaceLinear(
const char * colorSpace,
ReferenceSpaceType referenceSpaceType)
const;
748 static const char * IdentifyBuiltinColorSpace(
const ConstConfigRcPtr & srcConfig,
750 const char * builtinColorSpaceName);
782 static void IdentifyInterchangeSpace(
const char ** srcInterchangeName,
783 const char ** builtinInterchangeName,
785 const char * srcColorSpaceName,
787 const char * builtinColorSpaceName);
807 void setRole(
const char * role,
const char * colorSpaceName);
808 int getNumRoles()
const;
810 bool hasRole(
const char * role)
const;
817 const char * getRoleName(
int index)
const;
823 const char * getRoleColorSpace(
int index)
const;
829 const char * getRoleColorSpace(
const char * roleName)
const noexcept;
856 void addSharedView(
const char * view,
const char * viewTransformName,
857 const char * colorSpaceName,
const char * looks,
858 const char * ruleName,
const char * description);
860 void removeSharedView(
const char * view);
863 int getNumDisplays()
const;
865 const char * getDisplay(
int index)
const;
870 const char *
getDefaultView(
const char * display,
const char * colorspaceName)
const;
876 int getNumViews(
const char * display)
const;
877 const char * getView(
const char * display,
int index)
const;
883 int getNumViews(
const char * display,
const char * colorspaceName)
const;
884 const char * getView(
const char * display,
const char * colorspaceName,
int index)
const;
890 const char * getDisplayViewTransformName(
const char * display,
const char * view)
const;
895 const char * getDisplayViewColorSpaceName(
const char * display,
const char * view)
const;
897 const char * getDisplayViewLooks(
const char * display,
const char * view)
const;
899 const char * getDisplayViewRule(
const char * display,
const char * view)
const noexcept;
901 const char * getDisplayViewDescription(
const char * display,
const char * view)
const noexcept;
907 void addDisplayView(
const char * display,
const char * view,
908 const char * colorSpaceName,
const char * looks);
922 void addDisplayView(
const char * display,
const char * view,
const char * viewTransformName,
923 const char * colorSpaceName,
const char * looks,
924 const char * ruleName,
const char * description);
935 void addDisplaySharedView(
const char * display,
const char * sharedView);
946 void removeDisplayView(
const char * display,
const char * view);
948 void clearDisplays();
966 void addVirtualDisplayView(
const char * view,
967 const char * viewTransformName,
968 const char * colorSpaceName,
970 const char * ruleName,
971 const char * description);
973 void addVirtualDisplaySharedView(
const char * sharedView);
976 int getVirtualDisplayNumViews(
ViewType type)
const noexcept;
978 const char * getVirtualDisplayView(
ViewType type,
int index)
const noexcept;
980 const char * getVirtualDisplayViewTransformName(
const char * view)
const noexcept;
981 const char * getVirtualDisplayViewColorSpaceName(
const char * view)
const noexcept;
982 const char * getVirtualDisplayViewLooks(
const char * view)
const noexcept;
983 const char * getVirtualDisplayViewRule(
const char * view)
const noexcept;
984 const char * getVirtualDisplayViewDescription(
const char * view)
const noexcept;
987 void removeVirtualDisplayView(
const char * view) noexcept;
990 void clearVirtualDisplay() noexcept;
1017 int instantiateDisplayFromMonitorName(
const char * monitorName);
1029 int instantiateDisplayFromICCProfile(
const char * ICCProfileFilepath);
1045 void setActiveDisplays(
const char * displays);
1063 void setActiveViews(
const char * views);
1067 int getNumDisplaysAll()
const noexcept;
1068 const char * getDisplayAll(
int index)
const noexcept;
1069 int getDisplayAllByName(
const char *)
const noexcept;
1074 bool isDisplayTemporary(
int index)
const noexcept;
1082 int getNumViews(
ViewType type,
const char * display)
const;
1083 const char * getView(
ViewType type,
const char * display,
int index)
const;
1117 void getDefaultLumaCoefs(
double * rgb)
const;
1119 void setDefaultLumaCoefs(
const double * rgb);
1130 int getNumLooks()
const;
1132 const char * getLookNameByIndex(
int index)
const;
1145 int getNumViewTransforms()
const noexcept;
1149 const char * getViewTransformNameByIndex(
int i)
const noexcept;
1171 const char * getDefaultViewTransformName()
const noexcept;
1172 void setDefaultViewTransformName(
const char * defaultName) noexcept;
1175 void clearViewTransforms();
1192 int index)
const noexcept;
1195 int getNumNamedTransforms()
const noexcept;
1198 const char * getNamedTransformNameByIndex(
int index)
const noexcept;
1201 int getIndexForNamedTransform(
const char * name)
const noexcept;
1219 void clearNamedTransforms();
1238 const char * getColorSpaceFromFilepath(
const char * filePath)
const;
1246 const char * getColorSpaceFromFilepath(
const char * filePath,
size_t & ruleIndex)
const;
1255 bool filepathOnlyMatchesDefaultRule(
const char * filePath)
const;
1266 OCIO_DEPRECATED(
"This was marked as deprecated starting in v2.0, please use Config::getColorSpaceFromFilepath().")
1269 bool isStrictParsingEnabled()
const;
1270 void setStrictParsingEnabled(
bool enabled);
1295 const char * dstColorSpaceName)
const;
1297 const char * srcColorSpaceName,
1298 const char * dstColorSpaceName)
const;
1303 const char * display,
1308 const char * srcColorSpaceName,
1309 const char * display,
1323 const char * namedTransformName,
1366 const char * srcColorSpaceName,
1367 const char * builtinColorSpaceName);
1375 static ConstProcessorRcPtr GetProcessorFromBuiltinColorSpace(
const char * builtinColorSpaceName,
1377 const char * srcColorSpaceName);
1387 const char * srcColorSpaceName,
1389 const char * dstColorSpaceName);
1392 const char * srcColorSpaceName,
1395 const char * dstColorSpaceName);
1405 const char * srcColorSpaceName,
1406 const char * srcInterchangeName,
1408 const char * dstColorSpaceName,
1409 const char * dstInterchangeName);
1413 const char * srcColorSpaceName,
1414 const char * srcInterchangeName,
1417 const char * dstColorSpaceName,
1418 const char * dstInterchangeName);
1425 const char * srcColorSpaceName,
1427 const char * dstDisplay,
1428 const char * dstView,
1433 const char * srcColorSpaceName,
1436 const char * dstDisplay,
1437 const char * dstView,
1445 const char * srcColorSpaceName,
1446 const char * srcInterchangeName,
1448 const char * dstDisplay,
1449 const char * dstView,
1450 const char * dstInterchangeName,
1455 const char * srcColorSpaceName,
1456 const char * srcInterchangeName,
1459 const char * dstDisplay,
1460 const char * dstView,
1461 const char * dstInterchangeName,
1479 void clearProcessorCache() noexcept;
1509 bool isArchivable()
const;
1535 void archive(std::ostream & ostream)
const;
1546 static void deleter(
Config*
c);
1550 Impl * getImpl() {
return m_impl; }
1551 const Impl * getImpl()
const {
return m_impl; }
1627 size_t getNumEntries() const noexcept;
1630 size_t getIndexForRule(const
char * ruleName) const;
1633 const
char *
getName(
size_t ruleIndex) const;
1636 const
char * getPattern(
size_t ruleIndex) const;
1637 void setPattern(
size_t ruleIndex, const
char *
pattern);
1640 const
char * getExtension(
size_t ruleIndex) const;
1641 void setExtension(
size_t ruleIndex, const
char *
extension);
1644 const
char * getRegex(
size_t ruleIndex) const;
1645 void setRegex(
size_t ruleIndex, const
char * regex);
1648 const
char * getColorSpace(
size_t ruleIndex) const;
1649 void setColorSpace(
size_t ruleIndex, const
char * colorSpace);
1652 size_t getNumCustomKeys(
size_t ruleIndex) const;
1654 const
char * getCustomKeyName(
size_t ruleIndex,
size_t key) const;
1656 const
char * getCustomKeyValue(
size_t ruleIndex,
size_t key) const;
1661 void setCustomKey(
size_t ruleIndex, const
char * key, const
char *
value);
1677 void insertRule(
size_t ruleIndex, const
char *
name, const
char * colorSpace,
1678 const
char * pattern, const
char * extension);
1679 void insertRule(
size_t ruleIndex, const
char * name, const
char * colorSpace,
1680 const
char * regex);
1687 void insertPathSearchRule(
size_t ruleIndex);
1689 void setDefaultRuleColorSpace(const
char * colorSpace);
1698 void removeRule(
size_t ruleIndex);
1701 void increaseRulePriority(
size_t ruleIndex);
1704 void decreaseRulePriority(
size_t ruleIndex);
1710 bool isDefault() const noexcept;
1721 static
void deleter(FileRules*
c);
1727 Impl * getImpl() {
return m_impl; }
1728 const Impl * getImpl()
const {
return m_impl; }
1766 size_t getNumEntries()
const noexcept;
1772 size_t getIndexForRule(
const char * ruleName)
const;
1775 const char *
getName(
size_t ruleIndex)
const;
1778 size_t getNumColorSpaces(
size_t ruleIndex)
const;
1780 const char * getColorSpace(
size_t ruleIndex,
size_t colorSpaceIndex)
const;
1788 void addColorSpace(
size_t ruleIndex,
const char * colorSpace);
1790 void removeColorSpace(
size_t ruleIndex,
size_t colorSpaceIndex);
1793 size_t getNumEncodings(
size_t ruleIndex)
const;
1795 const char * getEncoding(
size_t ruleIndex,
size_t encodingIndex)
const;
1803 void addEncoding(
size_t ruleIndex,
const char * encoding);
1805 void removeEncoding(
size_t ruleIndex,
size_t encodingIndex);
1808 size_t getNumCustomKeys(
size_t ruleIndex)
const;
1810 const char * getCustomKeyName(
size_t ruleIndex,
size_t keyIndex)
const;
1812 const char * getCustomKeyValue(
size_t ruleIndex,
size_t keyIndex)
const;
1817 void setCustomKey(
size_t ruleIndex,
const char * key,
const char *
value);
1828 void insertRule(
size_t ruleIndex,
const char * ruleName);
1831 void removeRule(
size_t ruleIndex);
1847 Impl * getImpl() {
return m_impl; }
1848 const Impl * getImpl()
const {
return m_impl; }
1875 const char *
getName()
const noexcept;
1877 void setName(
const char *
name) noexcept;
1879 size_t getNumAliases()
const noexcept;
1881 const char * getAlias(
size_t idx)
const noexcept;
1883 bool hasAlias(
const char * alias)
const noexcept;
1891 void addAlias(
const char * alias) noexcept;
1893 void removeAlias(
const char * alias) noexcept;
1894 void clearAliases() noexcept;
1901 const char * getFamily()
const noexcept;
1903 void setFamily(
const char * family);
1912 const char * getEqualityGroup()
const noexcept;
1913 void setEqualityGroup(
const char * equalityGroup);
1916 void setDescription(
const char * description);
1918 BitDepth getBitDepth()
const noexcept;
1919 void setBitDepth(
BitDepth bitDepth);
1948 bool hasCategory(
const char * category)
const;
1955 void addCategory(
const char * category);
1962 void removeCategory(
const char * category);
1964 int getNumCategories()
const;
1971 const char * getCategory(
int index)
const;
1973 void clearCategories();
1993 const char * getEncoding()
const noexcept;
1994 void setEncoding(
const char * encoding);
2008 bool isData()
const noexcept;
2009 void setIsData(
bool isData) noexcept;
2019 void setAllocation(
Allocation allocation) noexcept;
2034 int getAllocationNumVars()
const;
2036 void setAllocationVars(
int numvars,
const float * vars);
2064 Impl * getImpl() {
return m_impl; }
2065 const Impl * getImpl()
const {
return m_impl; }
2109 int getNumColorSpaces()
const;
2114 const char * getColorSpaceNameByIndex(
int index)
const;
2136 int getColorSpaceIndex(
const char * name)
const;
2147 bool hasColorSpace(
const char * name)
const;
2167 void removeColorSpace(
const char * name);
2171 void clearColorSpaces();
2186 Impl * getImpl() {
return m_impl; }
2187 const Impl * getImpl()
const {
return m_impl; }
2249 void setName(
const char *
name);
2251 const char * getProcessSpace()
const;
2252 void setProcessSpace(
const char * processSpace);
2263 void setDescription(
const char * description);
2273 static void deleter(
Look*
c);
2277 Impl * getImpl() {
return m_impl; }
2278 const Impl * getImpl()
const {
return m_impl; }
2299 virtual const char *
getName()
const noexcept = 0;
2300 virtual void setName(
const char *
name) noexcept = 0;
2303 virtual size_t getNumAliases()
const noexcept = 0;
2305 virtual const char * getAlias(
size_t idx)
const noexcept = 0;
2307 virtual bool hasAlias(
const char* alias)
const noexcept = 0;
2312 virtual void addAlias(
const char * alias) noexcept = 0;
2314 virtual void removeAlias(
const char * alias) noexcept = 0;
2315 virtual void clearAliases() noexcept = 0;
2318 virtual const char * getFamily()
const noexcept = 0;
2320 virtual void setFamily(
const char * family) noexcept = 0;
2323 virtual void setDescription(
const char * description) noexcept = 0;
2326 virtual bool hasCategory(
const char * category)
const noexcept = 0;
2328 virtual void addCategory(
const char * category) noexcept = 0;
2330 virtual void removeCategory(
const char * category) noexcept = 0;
2332 virtual int getNumCategories()
const noexcept = 0;
2334 virtual const char * getCategory(
int index)
const noexcept = 0;
2336 virtual void clearCategories() noexcept = 0;
2343 virtual const char * getEncoding()
const noexcept = 0;
2344 virtual void setEncoding(
const char * encoding) noexcept = 0;
2389 const char *
getName()
const noexcept;
2390 void setName(
const char *
name) noexcept;
2393 const char * getFamily()
const noexcept;
2395 void setFamily(
const char * family);
2398 void setDescription(
const char * description);
2401 bool hasCategory(
const char * category)
const;
2403 void addCategory(
const char * category);
2405 void removeCategory(
const char * category);
2407 int getNumCategories()
const;
2409 const char * getCategory(
int index)
const;
2411 void clearCategories();
2440 Impl * getImpl() {
return m_impl; }
2441 const Impl * getImpl()
const {
return m_impl; }
2458 bool isNoOp()
const;
2464 bool hasChannelCrosstalk()
const;
2470 const char * getCacheID()
const;
2489 int getNumTransforms()
const;
2527 bool isDynamic()
const noexcept;
2558 unsigned edgelen)
const;
2614 Impl * getImpl() {
return m_impl; }
2615 const Impl * getImpl()
const {
return m_impl; }
2626 bool isNoOp()
const;
2634 bool hasChannelCrosstalk()
const;
2636 const char * getCacheID()
const;
2641 BitDepth getOutputBitDepth()
const;
2656 bool isDynamic()
const noexcept;
2662 void apply(
const ImageDesc & imgDesc)
const;
2674 void applyRGB(
float * pixel)
const;
2675 void applyRGBA(
float * pixel)
const;
2691 Impl * getImpl() {
return m_impl; }
2692 const Impl * getImpl()
const {
return m_impl; }
2702 bool isNoOp()
const;
2704 bool hasChannelCrosstalk()
const;
2706 const char * getCacheID()
const;
2728 Impl * getImpl() {
return m_impl; }
2729 const Impl * getImpl()
const {
return m_impl; }
2745 int getNumFiles()
const;
2746 const char * getFile(
int index)
const;
2748 int getNumLooks()
const;
2749 const char * getLook(
int index)
const;
2751 void addFile(
const char * fname);
2752 void addLook(
const char * look);
2766 Impl * getImpl() {
return m_impl; }
2767 const Impl * getImpl()
const {
return m_impl; }
2810 const char * getFormat()
const;
2812 void setFormat(
const char * formatName);
2825 const char * getInputSpace()
const;
2827 void setInputSpace(
const char * inputSpace);
2829 const char * getShaperSpace()
const;
2836 void setShaperSpace(
const char * shaperSpace);
2845 void setLooks(
const char * looks);
2847 const char * getTargetSpace()
const;
2849 void setTargetSpace(
const char * targetSpace);
2851 const char * getDisplay()
const;
2852 const char * getView()
const;
2854 void setDisplayView(
const char * display,
const char * view);
2856 int getShaperSize()
const;
2862 void setShaperSize(
int shapersize);
2864 int getCubeSize()
const;
2869 void setCubeSize(
int cubesize);
2872 void bake(std::ostream & os)
const;
2875 static int getNumFormats();
2881 static const char * getFormatNameByIndex(
int index);
2886 static const char * getFormatExtensionByIndex(
int index);
2896 static void deleter(
Baker* o);
2900 Impl * getImpl() {
return m_impl; }
2901 const Impl * getImpl()
const {
return m_impl; }
2923 virtual void * getRData()
const = 0;
2925 virtual void * getGData()
const = 0;
2927 virtual void * getBData()
const = 0;
2932 virtual void * getAData()
const = 0;
2935 virtual BitDepth getBitDepth()
const = 0;
2938 virtual long getWidth()
const = 0;
2940 virtual long getHeight()
const = 0;
2943 virtual ptrdiff_t getXStrideBytes()
const = 0;
2948 virtual ptrdiff_t getYStrideBytes()
const = 0;
2955 virtual bool isRGBAPacked()
const = 0;
2957 virtual bool isFloat()
const = 0;
2998 long width,
long height,
3001 ptrdiff_t chanStrideBytes,
3002 ptrdiff_t xStrideBytes,
3003 ptrdiff_t yStrideBytes);
3006 long width,
long height,
3010 long width,
long height,
3013 ptrdiff_t chanStrideBytes,
3014 ptrdiff_t xStrideBytes,
3015 ptrdiff_t yStrideBytes);
3023 BitDepth getBitDepth()
const override;
3026 void * getData()
const;
3028 void * getRData()
const override;
3029 void * getGData()
const override;
3030 void * getBData()
const override;
3031 void * getAData()
const override;
3033 long getWidth()
const override;
3034 long getHeight()
const override;
3035 long getNumChannels()
const;
3037 ptrdiff_t getChanStrideBytes()
const;
3038 ptrdiff_t getXStrideBytes()
const override;
3039 ptrdiff_t getYStrideBytes()
const override;
3041 bool isRGBAPacked()
const override;
3042 bool isFloat()
const override;
3047 Impl * getImpl() {
return m_impl; }
3048 const Impl * getImpl()
const {
return m_impl; }
3072 PlanarImageDesc(
void * rData,
void * gData,
void * bData,
void * aData,
3082 PlanarImageDesc(
void * rData,
void * gData,
void * bData,
void * aData,
3083 long width,
long height,
3085 ptrdiff_t xStrideBytes,
3086 ptrdiff_t yStrideBytes);
3090 void * getRData()
const override;
3091 void * getGData()
const override;
3092 void * getBData()
const override;
3093 void * getAData()
const override;
3096 BitDepth getBitDepth()
const override;
3098 long getWidth()
const override;
3099 long getHeight()
const override;
3101 ptrdiff_t getXStrideBytes()
const override;
3102 ptrdiff_t getYStrideBytes()
const override;
3104 bool isRGBAPacked()
const override;
3105 bool isFloat()
const override;
3110 Impl * getImpl() {
return m_impl; }
3111 const Impl * getImpl()
const {
return m_impl; }
3183 const char * getUniqueID()
const noexcept;
3184 void setUniqueID(
const char * uid) noexcept;
3190 const char * getFunctionName()
const noexcept;
3192 void setFunctionName(
const char *
name) noexcept;
3194 const char * getPixelName()
const noexcept;
3196 void setPixelName(
const char * name) noexcept;
3205 const char * getResourcePrefix()
const noexcept;
3207 void setResourcePrefix(
const char * prefix) noexcept;
3209 virtual const char * getCacheID()
const noexcept;
3212 virtual void begin(
const char * uid);
3217 virtual void setTextureMaxWidth(
unsigned maxWidth) = 0;
3218 virtual unsigned getTextureMaxWidth()
const noexcept = 0;
3221 virtual void setAllowTexture1D(
bool allowed) = 0;
3222 virtual bool getAllowTexture1D()
const = 0;
3228 unsigned getNextResourceIndex() noexcept;
3243 virtual bool addUniform(
const char * name,
3246 virtual bool addUniform(
const char * name,
3249 virtual bool addUniform(
const char * name,
3252 virtual bool addUniform(
const char * name,
3256 virtual bool addUniform(
const char * name,
3264 unsigned getNumDynamicProperties() const noexcept;
3295 virtual void addTexture(
const char * textureName,
3296 const char * samplerName,
3298 TextureType channel,
3299 TextureDimensions dimensions,
3301 const float *
values) = 0;
3311 virtual void add3DTexture(
const char * textureName,
3312 const char * samplerName,
3315 const float *
values) = 0;
3318 virtual void addToDeclareShaderCode(
const char * shaderCode);
3319 virtual void addToHelperShaderCode(
const char * shaderCode);
3320 virtual void addToFunctionHeaderShaderCode(
const char * shaderCode);
3321 virtual void addToFunctionShaderCode(
const char * shaderCode);
3322 virtual void addToFunctionFooterShaderCode(
const char * shaderCode);
3332 virtual void createShaderText(
const char * shaderDeclarations,
3333 const char * shaderHelperMethods,
3334 const char * shaderFunctionHeader,
3335 const char * shaderFunctionBody,
3336 const char * shaderFunctionFooter);
3338 virtual void finalize();
3539 virtual unsigned getNumUniforms() const noexcept = 0;
3541 virtual const
char * getUniform(
unsigned index, UniformData &
data) const = 0;
3544 virtual
unsigned getNumTextures() const noexcept = 0;
3545 virtual
void getTexture(
unsigned index,
3546 const
char *& textureName,
3547 const
char *& samplerName,
3550 TextureType & channel,
3551 TextureDimensions & dimensions,
3553 virtual
void getTextureValues(
unsigned index, const
float *&
values) const = 0;
3556 virtual
unsigned getNum3DTextures() const noexcept = 0;
3557 virtual
void get3DTexture(
unsigned index,
3558 const
char *& textureName,
3559 const
char *& samplerName,
3562 virtual
void get3DTextureValues(
unsigned index, const
float *&
values) const = 0;
3565 const
char * getShaderText() const noexcept;
3621 const char * getCacheID()
const;
3623 void setSearchPath(
const char *
path);
3624 const char * getSearchPath()
const;
3626 int getNumSearchPaths()
const;
3627 const char * getSearchPath(
int index)
const;
3628 void clearSearchPaths();
3629 void addSearchPath(
const char * path);
3630 void setWorkingDir(
const char * dirname);
3631 const char * getWorkingDir()
const;
3636 void setStringVar(
const char *
name,
const char *
value) noexcept;
3639 const char * getStringVar(
const char * name)
const noexcept;
3641 int getNumStringVars()
const;
3642 const char * getStringVarNameByIndex(
int index)
const;
3644 const char * getStringVarByIndex(
int index)
const;
3646 void clearStringVars();
3656 void loadEnvironment() noexcept;
3661 const char * resolveStringVar(
const char *
string)
const noexcept;
3664 const char * resolveStringVar(
const char *
string,
ContextRcPtr & usedContextVars)
const noexcept;
3676 const char * resolveFileLocation(
const char *
filename)
const;
3679 const char * resolveFileLocation(
const char * filename,
ContextRcPtr & usedContextVars)
const;
3686 Context(
const Context &) =
delete;
3687 Context&
operator= (
const Context &) =
delete;
3694 static void deleter(Context*
c);
3698 Impl * getImpl() {
return m_impl; }
3699 const Impl * getImpl()
const {
return m_impl; }
3722 virtual size_t getNumBuiltins()
const noexcept = 0;
3727 virtual const char * getBuiltinStyle(
size_t index)
const = 0;
3729 virtual const char * getBuiltinDescription(
size_t index)
const = 0;
3752 virtual size_t getNumBuiltinConfigs()
const noexcept = 0;
3756 virtual const char * getBuiltinConfigName(
size_t configIndex)
const = 0;
3760 virtual const char * getBuiltinConfigUIName(
size_t configIndex)
const = 0;
3764 virtual const char * getBuiltinConfig(
size_t configIndex)
const = 0;
3768 virtual const char * getBuiltinConfigByName(
const char * configName)
const = 0;
3782 virtual bool isBuiltinConfigRecommended(
size_t configIndex)
const = 0;
3785 OCIO_DEPRECATED(
"This was marked as deprecated starting in v2.3, please use ResolveConfigPath(\"ocio://default\").")
3786 virtual const char * getDefaultBuiltinConfigName()
const = 0;
3812 virtual bool isSupported()
const noexcept = 0;
3819 virtual size_t getNumMonitors()
const noexcept = 0;
3828 virtual const char * getMonitorName(
size_t idx)
const = 0;
3830 virtual const char * getProfileFilepath(
size_t idx)
const = 0;
3863 virtual std::vector<uint8_t> getLutData(
const char * filepath)
const = 0;
3870 virtual std::string getConfigData()
const = 0;
3889 virtual std::string getFastLutFileHash(
const char * filepath)
const = 0;
3894 #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)
class OCIOEXPORT BuiltinTransformRegistry
GLsizei const GLfloat * value
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
GLint GLint GLsizei GLint GLenum GLenum type
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.