GetTransformationParameters Example for C++ 5.0 and later

ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);
int nRet;

nRet = m_pRasterProc->IsRegistrationMark(m_LeadRasterView.GetRaster (), RGS_T, 90, 110, 31, 29);
if (nRet == 0)
    MessageBox (TEXT("it is a registration mark"));
m_pRasterProc->Release();

m_pRasterProc->PutReferencePointsX(0,81400);
m_pRasterProc->PutReferencePointsY(0,11300);

m_pRasterProc->PutReferencePointsX(1,78600);
m_pRasterProc->PutReferencePointsY(1,87400);

m_pRasterProc->PutReferencePointsX(2,79400);
m_pRasterProc->PutReferencePointsX(2,116000);


m_pRasterProc->MarksCount = 3;

m_pRasterProc->GetMark(0)->Type = RGS_T;
m_pRasterProc->GetMark(0)->MinScale = 90;
m_pRasterProc->GetMark(0)->MaxScale = 110;
m_pRasterProc->GetMark(0)->Width = 31;
m_pRasterProc->GetMark(0)->Height = 29;
m_pRasterProc->GetMark(0)->Top = 72;
m_pRasterProc->GetMark(0)->Left = 741;
m_pRasterProc->GetMark(0)->Bottom = 171;
m_pRasterProc->GetMark(0)->Right = 896;
m_pRasterProc->GetMark(0)->NumberOfExpectedMarks = 1;

m_pRasterProc->GetMark(1)->Type = RGS_T;
m_pRasterProc->GetMark(1)->MinScale = 90;
m_pRasterProc->GetMark(1)->MaxScale = 110;
m_pRasterProc->GetMark(1)->Width = 31;
m_pRasterProc->GetMark(1)->Height = 29;
m_pRasterProc->GetMark(1)->Top = 836;
m_pRasterProc->GetMark(1)->Left = 706;
m_pRasterProc->GetMark(1)->Bottom = 908;
m_pRasterProc->GetMark(1)->Right = 840;
m_pRasterProc->GetMark(1)->NumberOfExpectedMarks = 1;

m_pRasterProc->GetMark(2)->Type = RGS_T;
m_pRasterProc->GetMark(2)->MinScale = 90;
m_pRasterProc->GetMark(2)->MaxScale = 110;
m_pRasterProc->GetMark(2)->Width = 31;
m_pRasterProc->GetMark(2)->Height = 29;
m_pRasterProc->GetMark(2)->Top = 1118;
m_pRasterProc->GetMark(2)->Left = 729;
m_pRasterProc->GetMark(2)->Bottom = 1199;
m_pRasterProc->GetMark(2)->Right = 852;
m_pRasterProc->GetMark(2)->NumberOfExpectedMarks = 1;


m_pRasterProc->SearchRegMarks (m_LeadRasterView.GetRaster());

for (int i = 0; i<3 ;++i)
{
    m_pRasterProc->PutMarkPointX(i, m_pRasterProc->GetMark(i)->GetDetectedMarkPointX(0));
    m_pRasterProc->PutMarkPointY(i,m_pRasterProc->GetMark(i)->GetDetectedMarkPointY (0));
}

m_pRasterProc->GetMarksCenterMass (m_LeadRasterView.GetRaster());

for (int i = 0; i<3 ;++i)
{
    m_pRasterProc->PutTransformedPointsX(i, m_pRasterProc->GetMarkCMPointX(i));
    m_pRasterProc->PutTransformedPointsY(i, m_pRasterProc->GetMarkCMPointY(i));
}

m_pRasterProc->GetTransformationParameters(m_LeadRasterView.GetRaster());
m_pRasterProc->ApplyTransformationParameters(m_LeadRasterView.GetRaster(),
                   m_pRasterProc->XTranslation,
                   m_pRasterProc->YTranslation,
                   m_pRasterProc->TransformationAngle,
                   m_pRasterProc->XScale,
                   m_pRasterProc->YScale,
                   RGS_SIZE_NORMAL|RGS_SIZE_FAVORWHITE);
}