MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / simplifyTransform

Function simplifyTransform

src/OpenColorIO/ConfigUtils.cpp:844–855  ·  view source on GitHub ↗

Simplify a transform by removing nested group transforms and identities.

Source from the content-addressed store, hash-verified

842// Simplify a transform by removing nested group transforms and identities.
843//
844ConstTransformRcPtr simplifyTransform(const ConstGroupTransformRcPtr & gt)
845{
846 ConstConfigRcPtr config = Config::CreateRaw();
847 ConstProcessorRcPtr p = config->getProcessor(gt);
848 ConstProcessorRcPtr opt = p->getOptimizedProcessor(OPTIMIZATION_DEFAULT);
849 GroupTransformRcPtr finalGt = opt->createGroupTransform();
850 if (finalGt->getNumTransforms() == 1)
851 {
852 return finalGt->getTransform(0);
853 }
854 return finalGt;
855}
856
857ConstTransformRcPtr invertTransform(const ConstTransformRcPtr & t)
858{

Callers 1

getRefSpaceConverterFunction · 0.85

Calls 5

getOptimizedProcessorMethod · 0.80
createGroupTransformMethod · 0.80
getProcessorMethod · 0.45
getNumTransformsMethod · 0.45
getTransformMethod · 0.45

Tested by

no test coverage detected