Synergy Color Management Component - SDK -  2018.0.80
SYNCOLOR::NativeCatalogManager Class Referenceabstract

SynColor transform catalog manager. More...

Public Types

typedef SynStatus(* ConnectionSpaceCallback )(const char *name)
 Callback function to obtain the list of connection color spaces. More...
 

Public Member Functions

virtual SynStatus loadTemplate (TemplateType type, TemplatePtr &pTemplate)=0
 Create a native color transform template of the specified type. More...
 
virtual SynStatus reloadCatalogs ()=0
 Refresh the catalog. More...
 
virtual SynStatus getConnectionSpaces (ColorSpaceType type, ConnectionSpaceCallback cb)=0
 Connection space list. More...
 
virtual SynStatus addUserColorSpace (ColorSpaceType type, const char *connectionSpace, const char *uniqueName, const char *userFacingName, const char *hierarchy, const char *displayType, const char *imageState, const char *transformPath, bool useResolvedTransform)=0
 Add a user color space to the native catalog manager. More...
 
virtual SynStatus addUserPureViewTransform (const char *inputSpace, const char *outputSpace, const char *uniqueName, const char *userFacingName, const char *hierarchy, const Lut3DOpInterpolationAlgo lut3dInterpolation, const char *transformPath)=0
 Add a user pure view transform to the native catalog manager. More...
 
virtual SynStatus addUserColorSpace (const char *serializedUserColorSpace)=0
 Add a user color space or a user pure view transform to the native catalog manager from a serialized version. More...
 
virtual SynStatus serializeUserColorSpace (const char *uniqueName, UserColorSpaceSerializer &writer) const =0
 Serialize the user defined color space in XML. More...
 
virtual SynStatus removeUserColorSpace (const char *uniqueName)=0
 Remove a previously added user color space from the native catalog manager. More...
 
virtual bool isUserColorSpace (const char *uniqueName) const =0
 Checks if a color space is a user defined color space. More...
 

Static Public Member Functions

static NativeCatalogManagerinstance ()
 Get the catalog manager. More...
 

Private Member Functions

 NativeCatalogManager (const NativeCatalogManager &other)
 Forbidden copy constructor. More...
 
NativeCatalogManageroperator= (const NativeCatalogManager &other)
 Forbidden assignment operator. More...
 

Detailed Description

SynColor transform catalog manager.

The SynColor native transform catalog can be used to create native color transform templates and permits adding and removing additional transforms to the template system.

The catalog manager looks at all CTF files in the Autodesk SynColor transform collection and in the shared transform directory defined in the SynColor configuration (see SYNCOLOR::getSharedColorTransformPath() ). If metadata is present in these files, the manager determines which of the various template parameters (eg. working spaces, input color spaces and viewing transforms) the transform corresponds to.

If a transform is added to the catalog manager, this transform will be available as template parameters of the corresponding type. When a transform is added, a wrapper CTF file containing the required metadata and referencing the added transform is added in the shared transform directory.

Warning
Manually removing wrapper CTF files from the shared transform directory effectively removes the added transforms from the catalog. Conversely adding a CTF file with the appropriate metadata will add the associated transform to the catalog. These changes take effect after a restart of the client application using SynColor.

Member Typedef Documentation

typedef SynStatus(* SYNCOLOR::NativeCatalogManager::ConnectionSpaceCallback)(const char *name)

Callback function to obtain the list of connection color spaces.

This callback is called once per available connection space. A connection space must be specified when adding a user color space to the catalog manager.

See also
NativeCatalogManager::addUserColorSpace().
Parameters
nameConnection space name.

Constructor & Destructor Documentation

SYNCOLOR::NativeCatalogManager::NativeCatalogManager ( const NativeCatalogManager other)
private

Forbidden copy constructor.

Parameters
otherN/A.

Member Function Documentation

static NativeCatalogManager& SYNCOLOR::NativeCatalogManager::instance ( )
static

Get the catalog manager.

Returns
Catalog manager singleton instance.
virtual SynStatus SYNCOLOR::NativeCatalogManager::loadTemplate ( TemplateType  type,
TemplatePtr pTemplate 
)
pure virtual

Create a native color transform template of the specified type.

Parameters
typeTemplate type. See SYNCOLOR::TemplateType.
pTemplateReturned template instance.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
See also
Detailed description of SYNCOLOR::Template.
virtual SynStatus SYNCOLOR::NativeCatalogManager::reloadCatalogs ( )
pure virtual

Refresh the catalog.

This method reloads the transform catalogs and by default, rebuilds the shared transform directory catalog.

Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::NativeCatalogManager::getConnectionSpaces ( ColorSpaceType  type,
ConnectionSpaceCallback  cb 
)
pure virtual

Connection space list.

A connection space must be specified when adding a transform to the catalog manager. With the help of the ConnectionSpaceCallback, the list of connecting spaces is made available for UI selection.

Parameters
typeColor space type. See SYNCOLOR::UseColorSpaceType.
cbCallback instance.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::NativeCatalogManager::addUserColorSpace ( ColorSpaceType  type,
const char *  connectionSpace,
const char *  uniqueName,
const char *  userFacingName,
const char *  hierarchy,
const char *  displayType,
const char *  imageState,
const char *  transformPath,
bool  useResolvedTransform 
)
pure virtual

Add a user color space to the native catalog manager.

A wrapper CTF file containing the specified metadata and referencing the added transform is added in the shared transform directory. This ensures that the transform remains in the catalog manager across application sessions.

Warning
Manually removing wrapper CTF files from the shared transform directory effectively removes the added transforms from the catalog. Conversely adding a CTF file with the appropriate metadata will add the associated transform to the catalog. In either case, the catalog must be reloaded by the client application for these changes to take effect. For reference: SYNCOLOR::NativeCatalogManager::reloadCatalogs().
Parameters
typeColor space type. See SYNCOLOR::ColorSpaceType.
connectionSpaceColor space connecting the new transform to a known reference. This corresponds to:
uniqueNameUnique name of the new transform. This name will appear in the template parameter list corresponding to the type. As its name implies, this name must be unique.
userFacingNameUser facing name of the new transform. This name is only meant to be displayed in the UI. This name is not required to be unique.
hierarchyhierarchy of the new transform. This value will be used to organize the transform in hierarchical groups. NULL or empty string can be used to place the new transform at the root of the hierarchy.
displayTypespecifies the type attribute for user displays only. This is a noop for other type of color spaces.
imageStatespecifies the image state attribute for user input color space. This is a noop for other type of color spaces.
transformPathFile path of the user color space transform.
useResolvedTransformWhether the definition contains a reference to the user color space transform or a self-contained resolved version of the user color space transform.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::NativeCatalogManager::addUserPureViewTransform ( const char *  inputSpace,
const char *  outputSpace,
const char *  uniqueName,
const char *  userFacingName,
const char *  hierarchy,
const Lut3DOpInterpolationAlgo  lut3dInterpolation,
const char *  transformPath 
)
pure virtual

Add a user pure view transform to the native catalog manager.

A wrapper CTF file containing the specified metadata and containing the added transform is added in the shared transform directory. This ensures that the transform remains in the catalog manager across application sessions.

Warning
Manually removing wrapper CTF files from the shared transform directory effectively removes the added transforms from the catalog. Conversely adding a CTF file with the appropriate metadata will add the associated transform to the catalog. In either case, the catalog must be reloaded by the client application for these changes to take effect. For reference: SYNCOLOR::NativeCatalogManager::reloadCatalogs().
Parameters
inputSpaceis the input color space of the pure view
outputSpaceis the output color space of the pure view
uniqueNameUnique name of the new transform. This name will appear in the template parameter list corresponding to the type. As its name implies, this name must be unique.
userFacingNameUser facing name of the new transform. This name is only meant to be displayed in the UI. This name is not required to be unique.
hierarchyhierarchy of the new transform. This value will be used to organize the transform in hierarchical groups. NULL or empty string can be used to place the new transform at the root of the hierarchy.
lut3dInterpolation.If the user's LUT includes any Lut3DOps, the SynColor InterpolationAlgo member variable of those ops is set to the requested value.
transformPathFile path of the user color space transform.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::NativeCatalogManager::addUserColorSpace ( const char *  serializedUserColorSpace)
pure virtual

Add a user color space or a user pure view transform to the native catalog manager from a serialized version.

Note

A user color space can be created externally without using the SynColor API methods: SYNCOLOR::addUserColorSpace() or SYNCOLOR::addUserPureViewTransform(). For example, a user color space can be defined in a color transform file (.ctf) using a text editor, providing that the following minimally required metadata information is present:

The transform's "ProcessList" element must contain an "Info" child element.

For "Input", "InputTagOnly", "LogWorkingSpace", "SceneLinearWorkingSpace", or "VideoWorkingSpace" color space tag, the user defined color space unique name must be specified in the Info/InputSpace/ShortName child element, whereas the connecting space must be specified in the Info/OutputSpace/ShortName child element:

<Info>
<Category>
<Tags>
<Flame />
<Maya />
<[colorSpaceTag] />
</Tags>
</Category>
<ImageState>[userColorSpaceState]</ImageState>
<ShortName>[userColorSpaceUniqueName]</ShortName>
<ID>[userColorSpaceUniqueName]</ID>
<OutputSpace>
<ImageState>[outputSpaceState]</ImageState>
<ShortName>[outputSpaceUniqueName]</ShortName>
<ID>[outputSpaceID]</ID>
</OutputSpace>
</Info>

For "OutputTagOnly", "Display", "Display_PreProcess", "View", or "View_PreProcess" color space tag, the user defined color space unique name must be specified in the Info/OutputSpace/ShortName child element, whereas the connecting space must be specified in the Info/InputSpace/ShortName child element:
<Info>
<Category>
<Tags>
<Flame />
<Maya />
<[colorSpaceTag] />
</Tags>
</Category>
<ImageState>[inputSpaceState]</ImageState>
<ShortName>[inputSpaceUniqueName]</ShortName>
<ID>[inputSpaceID]</ID>
<OutputSpace>
<ImageState>[userColorSpaceState]</ImageState>
<ShortName>[userColorSpaceUniqueName]</ShortName>
<ID>[userColorSpaceUniqueName]</ID>
</OutputSpace>
</Info>
For "PureView" color space tag,
<ProcessList version="1.3" id="[userColorSpaceUniqueName]" name="[userColorSpaceUniqueName]">
<Info>
<Category>
<Tags>
<Flame />
<Maya />
<PureView />
</Tags>
</Category>
<ImageState>[inputSpaceState]</ImageState>
<ShortName>[inputSpaceUniqueName]</ShortName>
<ID>[inputSpaceID]</ID>
<OutputSpace>
<ImageState>[outputSpaceState]</ImageState>
<ShortName>[outputSpaceUniqueName]</ShortName>
<ID>[outputSpaceID]</ID>
</OutputSpace>
</Info>
Parameters
serializedUserColorSpaceA serialized user color space.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
virtual SynStatus SYNCOLOR::NativeCatalogManager::serializeUserColorSpace ( const char *  uniqueName,
UserColorSpaceSerializer writer 
) const
pure virtual

Serialize the user defined color space in XML.

Parameters
uniqueNameName of the user color space to be serialized.
writerThe writer to receive the UTF-8 string containing XML formatting
Returns
returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred. See SYNCOLOR::SynStatus above.
virtual SynStatus SYNCOLOR::NativeCatalogManager::removeUserColorSpace ( const char *  uniqueName)
pure virtual

Remove a previously added user color space from the native catalog manager.

Parameters
uniqueNameName of user color space to be removed.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
virtual bool SYNCOLOR::NativeCatalogManager::isUserColorSpace ( const char *  uniqueName) const
pure virtual

Checks if a color space is a user defined color space.

Parameters
uniqueNameUnique name of the color space to check.
Returns
True if the supplied color space is a user color space.
NativeCatalogManager& SYNCOLOR::NativeCatalogManager::operator= ( const NativeCatalogManager other)
private

Forbidden assignment operator.

Parameters
otherN/A.
Returns
N/A.