ShowContourFilterDlg example for C++ Builder

void __fastcall TForm1::ShowContourFilterDlg1Click(TObject *Sender) 
{
   L_INT nRet; 
   LEADDlgImgEffect1->MaxError = 5; 
   LEADDlgImgEffect1->DeltaDirection = 5; 
   LEADDlgImgEffect1->Option = CONTOUR_LINK_COLOR; 
   LEADDlgImgEffect1->Threshold = 5; 
   LEADDlgImgEffect1->OptionFlags = DLG_CONTOURFILTER_SHOW_OPTION_ALL; 
   LEADDlgImgEffect1->DlgFlags = DLG_CONTOURFILTER_SHOW_PREVIEW |
                                 DLG_CONTOURFILTER_SHOW_DELTADIRECTION |
                                 DLG_CONTOURFILTER_SHOW_MAXIMUMERROR |
                                 DLG_CONTOURFILTER_SHOW_OPTION |
                                 DLG_CONTOURFILTER_SHOW_THRESHOLD |
                                 DLG_CONTOURFILTER_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgEffect1->LEADImage = LEADImage1; 

   nRet= LEADDlgImgEffect1->ShowContourFilterDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      LEADImage1->ContourFilter ( LEADDlgImgEffect1->Threshold
                                  LEADDlgImgEffect1->DeltaDirection
                                  LEADDlgImgEffect1->MaxError
                                  LEADDlgImgEffect1->Option ); 
   }
}