Home DALSA Digital Imaging Home

Features Download Buy News Support

WiT Engine

The WiT Engine allows you to create applications with custom GUIs which use algorithms designed in WiT to perform the image processing and analysis tasks. The WiT Engine is usable as:

ActiveX Control for Visual Basic or MFC
An ActiveX control gives you access to all the image processing and hardware control capabilities of WiT while leveraging the popularity and support for Visual Basic to create effective, custom user interfaces for your clients. The WiT ActiveX control allows your VB application to load and run igraphs, redirect images or numeric results from WiT to form controls and callbacks in VB, and associate changes to scrollbars, gauges, dials, etc. to changes in parameter values belonging to icons in an igraph. WiT runs igraphs in the background as a separate thread. That means a user can interact with your VB application while WiT processes and uploads results from igraphs at the same time!

DLL for C/C++ or MFC
For users who want to create custom user interfaces for their clients using MFC, C/C++, or other languages, the WiT DLL gives you access to all the capabilities that the WiT ActiveX control but through a set of DLL functions.

Initial concept to deliverable application in a few quick steps:

  1. Using the programming environment of your choice, such as VB, create an application with the user interface that you want.
  2. Design and test your imaging analysis algorithms using igraphs in WiT.
  3. Generate WIC (WiT Imaging Code) files for each igraph.
  4. Interface your application with the WiT Engine.
    Private Sub Form1_Load(...)
        ...
        withandle = WiT.engine.Init4(hwnd, 0, Nothing, Nothing, 0, Nothing)
    
        Dim wicName As String = Environment.GetEnvironmentVariable("WITHOME") _
                + "\demo\Applications\Pen Cap Inspection\penCapSequence.wic"
        exehandle = WiT.engine.Load(wicName)
    End Sub
    
    Private Sub Form1_Closing(...)
        WiT.engine.Unload(exehandle)
        WiT.engine.Exit(withandle)
    End Sub
  5. Map buttons and controls for starting and stopping your WIC algorithms, change operator parameters, register callbacks for various WIC run time events, etc.
    Private Sub Run_Click(...)
    WiT.engine.ControlExec(exehandle, _
        CType(WiT.ExeCmds.WIT_EXE_FLASH, Short), 0)
    End Sub
  6. Map data inputs and outputs between your application and the WiT Engine, map WiT displays to windows in your application, etc.
    Private Sub Form1_Load(...)
        ...
    
        hwnd = Convert.ToUInt32(PassPic.Handle.ToInt32())
        WiT.engine.SetDisplayWnd("Pass", hwnd)
    
        passCountCallback = New WiT.engine.outputCB(AddressOf passCountProc)
        WiT.engine.SetOutputCallback("#Passed", passCountCallback, _
            CType(WiT.DataFormat.WIT_DATA_FORMAT_NONE, Integer))
    
        ...
    End Sub
  7. Test your whole application.
  8. Prepare distribution files.