IMVFilterData

The IMVFilterData interface offers methods to save the current configuration of a MontiVision image processing filter, in the registry. Read the remarks for ímplementation details.

GetFilterRegKey Returns the registry key that is used by default to save filter configurations.
GetFilterData Returns the current configuration of the filter.
PutFilterData Sets the configuration of the filter.
GetMaxDataSize Returns the maximum size of the filter configuration data. Used to create a temporary buffer to load and save the filter's configuration data.

Header file: iMVFilterData.h
Interface definition language file: iMVFilterData.idl
Interface ID:
IID_IMVFilterData

 

HRESULT GetFilterRegKey( [out] BSTR *pbstrRegKey );

Returns the Registry Key that is used by default to save filter configurations. The standard MontiVision filter property page load/save dialog stores configurations there.

Parameter:

pbstrRegKey A pointer to an BSTR that receives the registry key.

 

HRESULT GetFilterData( [in ] int cMax, [out, size_is(cMax)] byte *pFilterData );

Returns the current configuration of the filter. You can use this function to store project specific filter configurations at a user defined place for later use.

Parameter:

cMax Size of the data buffer.
pFilterData Pointer to an array of bytes that receives the filter data.

 

HRESULT PutFilterData( [in ] int cMax, [in , size_is(cMax)] byte *pFilterData );

Sets the current configuration of a MontiVision filter. You can only use data that was previously returned using the GetFilterData method.

Parameter:

cMax Size of the data buffer.
pFilterData Pointer to an array of bytes that holds the filter data.

 

HRESULT GetMaxDataSize( [out, retval] int *piMaxDataSize );

Returns the maximum filter configuration data size. The returned value is used to reserve memory for the methods GetFilterData and PutFilterData.

Parameter:

piMaxDataSize A pointer to an integer that receives the maximum size of the filter configuration data.

 

 

Remarks

The following sequence is an example usage of the filter.

int iMaxDataSize;
byte * pbyFilterData
IMVFilterData *pIMVFilterData;

pIMVFilterData->GetMaxDataSize( &iMaxDataSize );
if( iMaxDataSize > 0 )
{
    pIMVFilterData->GetFilterData( iMaxDataSize, pbyFilterData );

    ... // Save data somewhere and load another configuration that you saved before

    pIMVFilterData->PutFilterData( iMaxDataSize, pbyFilterData );
}