The New Filter architecture

Porting Old-style Filters

  1. Code the new filter as a class derived from ptFilterBase.
  2. Create a new FUID entry in ptFilterUids.h. Order there is only for readability.
  3. Add the new filter to CreateAllFilters() in ptMain starting around line 300. Order there is only for readability.
  4. ptSettings
    • Remove old config lines from the lists in the constructor.
    • Remove the filter’s if branch(es) from ToolInfo().
    • Check ToolAlwaysVisible() for the old name and remove.
  5. ptFilterDM: Enter the new config item IDs to FillNameMap().
  6. ptMain: Remove old callbacks (CB_old-config-name() functions) and dispatcher macros in CB_InputChanged().
  7. ptMainWindow: If the old filter has buttons look for and remove M_ConnectSomeButton macros and associated callbacks. Also check for other non-standard widgets and their backend code.
  8. ptMainWindow.ui: Find the old filter’s toolbox, delete all the widgets inside it and change its caption (currentItemText) to the FUID.
  9. ptProcessor::Run(): Change the call to the old filter to the new one, like this:
    if new filter isActive() then runFilter(m_Image_AfterSomething)
    • Keep ReportProgress() lines and similar stuff intact.
    • Beware the Camera and Output tabs! Those are special cases.
Print/export