Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copilot instructions — itom plugins

The tool-independent instructions for this repository live in
[`AGENTS.md`](../AGENTS.md). **Read and follow that file.**

Quick reminders:

- A plugin = interface class (`ito::AddInInterfaceBase`) + implementation
(`ito::AddInDataIO`, `ito::AddInActuator` or `ito::AddInAlgo`) + own `CMakeLists.txt`.
- Use `DummyGrabber`, `DummyMotor` and `BasicFilters` as reference implementations.
- Return `ito::RetVal`; never let an exception escape a plugin method.
- Always release the `ItomSharedSemaphore*` (`ItomSharedSemaphoreLocker`) on every path.
- Declare parameters in `m_params` with meta info + doc string, validate in `setParam`
and emit `parametersChanged(m_params)`.
- Do not modify the core API from here; do not include headers of other plugins.
- Formatting via `.clang-format`; format only the lines you touch.
64 changes: 64 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# AGENTS.md — itom plugins

Guidance for AI coding agents working in the **itom plugins** repository (hardware and
algorithm plugins). Normally used as a submodule of `itomProject`.

## Plugin anatomy

Each plugin lives in its own folder and consists of:

- `CMakeLists.txt` — target definition, Qt moc/uic, install rules
- an **interface** class derived from `ito::AddInInterfaceBase`:
metadata (`m_type`, `m_description`, `m_detaildescription`, `m_author`, `m_license`),
mandatory/optional init parameters, `getAddInInst` / `closeThisInst`
- an **implementation** class derived from one of
- `ito::AddInDataIO` — cameras, grabbers, serial/IO devices
- `ito::AddInActuator` — motors, stages
- `ito::AddInAlgo` — filters and algorithm widgets
- optionally `dialog*` / `dockWidget*` UI classes and a `docs/` folder

Reference implementations: `DummyGrabber`, `DummyMotor`, `BasicFilters`.
Skeletons: `itom/pluginTemplates` in the core repository.

## Hard rules

1. **Never change the core API from here** — only consume it. If something is missing in
the core, say so instead of working around it.
2. **`ito::RetVal` for all error handling**; no exception may leave a plugin method.
3. **Semaphores:** every method that receives an `ItomSharedSemaphore* waitCond` must
release it on *every* code path — use `ItomSharedSemaphoreLocker locker(waitCond);`
and follow the pattern of the neighbouring plugins.
4. **Threading:** plugin instances run in their own thread; do not touch GUI objects
directly, use signals (`parametersChanged`, `actuatorStatusChanged`,
`targetChanged`, `newDataAvailable`).
5. **Parameters:** declare all parameters in the constructor in `m_params` with
meta information and documentation strings; keys are lowerCamelCase and stable.
`setParam` must validate via `apiValidateParam` and emit `parametersChanged`.
6. **DataObject outputs:** allocate/resize via `checkData()`, keep axis and tag meta
data (`setAxisUnit`, `setAxisScale`, `setValueUnit`, `setTag`) up to date.
7. **Third party SDKs** are found via the CMake modules in `cmake/`; do not vendor
binaries and do not hard-code SDK paths.

## Style

- `.clang-format` (`BasedOnStyle: Microsoft`, 4 spaces, `ColumnLimit: 100`,
`PointerAlignment: Left`). Format only the lines you change.
- English identifiers and comments; user visible strings via `tr(...)`.
- Keep each plugin self-contained — no cross-plugin includes.

## Build

Plugins are built as part of `itomProject` with `BUILD_ITOM_PLUGINS=ON`.
Build only the plugin target you changed:

```powershell
cmake --build <build>/itomProject --config Debug --target <PluginName>
```

Never edit files inside the CMake binary directory.

## Quality gates

`pre-commit`: `check-yaml`, `end-of-file-fixer`, `trailing-whitespace`,
`fix-byte-order-marker`, `codespell`, `pyupgrade --py36-plus`, `sphinx-lint`.
Files end with a single newline, no trailing whitespace, no BOM.
7 changes: 6 additions & 1 deletion AerotechA3200/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ endif(NOT EXISTS ${ITOM_SDK_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
7 changes: 6 additions & 1 deletion AndorSDK3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ endif(NOT EXISTS ${ITOM_SDK_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
7 changes: 6 additions & 1 deletion BasicFilters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib REQUIRED)
find_package(OpenCV COMPONENTS core imgproc REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core imgproc REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
7 changes: 6 additions & 1 deletion BasicGPLFilters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CLAUDE.md

**Follow the rules in @AGENTS.md.**
7 changes: 6 additions & 1 deletion CommonVisionBlox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ if(CVB_HEADER_FILE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
7 changes: 6 additions & 1 deletion CyUSB/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()
find_package(CyAPI QUIET)

include(ItomBuildMacros)
Expand Down
7 changes: 6 additions & 1 deletion DIC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(OpenCV COMPONENTS core imgproc REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...),
find_package(OpenCV REQUIRED COMPONENTS core imgproc REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...),

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()
find_package(VisualLeakDetector QUIET) #silently detects the VisualLeakDetector for Windows (memory leak detector, optional)
find_package(Eigen REQUIRED)

Expand Down
7 changes: 6 additions & 1 deletion DIC/matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ SET (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Adds a postfix for debug-built librar
set(CMAKE_INCLUDE_CURRENT_DIR ON)
SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${ITOM_SDK_DIR})

find_package(OpenCV COMPONENTS core imgproc REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...),
find_package(OpenCV REQUIRED COMPONENTS core imgproc REQUIRED) #if you require openCV indicate all components that are required (e.g. core, imgproc...),

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

#try to enable OpenMP (e.g. not available with VS Express)
find_package(OpenMP QUIET)
Expand Down
7 changes: 6 additions & 1 deletion DataObjectIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib REQUIRED)
find_package(OpenCV COMPONENTS core highgui REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core highgui REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()
if(OpenCV_VERSION_MAJOR GREATER 2)
# for opencv >= 3 we need the imgcodecs module which is not present in opencv < 3 so run again
find_package(OpenCV COMPONENTS core highgui imgcodecs REQUIRED)
Expand Down
34 changes: 23 additions & 11 deletions DataObjectIO/DataObjectIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,22 @@

#include "opencv2/highgui/highgui.hpp"

#if CV_MAJOR_VERSION >= 4
#include "opencv2//imgcodecs/legacy/constants_c.h"
#if defined(CV_MAJOR_VERSION) && (CV_MAJOR_VERSION == 4)
#include "opencv2/imgcodecs/legacy/constants_c.h"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc/types_c.h"
#elif defined(CV_MAJOR_VERSION) && (CV_MAJOR_VERSION >= 5)
// OpenCV 5 removed many legacy C headers — include modern C++ headers instead
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#elif !defined(CV_MAJOR_VERSION)
// Build without OpenCV version macro defined; assume modern C++ headers are available.
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#else
// Fallback for older OpenCV versions
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#endif

#include "common/sharedFunctionsQt.h"
Expand Down Expand Up @@ -3898,7 +3910,7 @@ ito::RetVal DataObjectIO::saveDataObjectOpenCV(
break;

case DataObjectIO::ppmFormat:
save_params.push_back(CV_IMWRITE_PXM_BINARY);
save_params.push_back(cv::IMWRITE_PXM_BINARY);
save_params.push_back((*paramsOpt)[0].getVal<int>());
checkAndModifyFilenameSuffix(fileName, "ppm");
gray16Supported = false;
Expand All @@ -3907,7 +3919,7 @@ ito::RetVal DataObjectIO::saveDataObjectOpenCV(

case DataObjectIO::pgmFormat:

save_params.push_back(CV_IMWRITE_PXM_BINARY);
save_params.push_back(cv::IMWRITE_PXM_BINARY);
save_params.push_back((*paramsOpt)[0].getVal<int>());
gray16Supported = true;
colorSupported = false;
Expand All @@ -3920,7 +3932,7 @@ ito::RetVal DataObjectIO::saveDataObjectOpenCV(

case DataObjectIO::jpgFormat:
case DataObjectIO::jp2000Format:
save_params.push_back(CV_IMWRITE_JPEG_QUALITY);
save_params.push_back(cv::IMWRITE_JPEG_QUALITY);
save_params.push_back((*paramsOpt)[0].getVal<int>());
checkAndModifyFilenameSuffix(fileName, "jpg", "jpeg", "jp2");

Expand All @@ -3942,7 +3954,7 @@ ito::RetVal DataObjectIO::saveDataObjectOpenCV(
break;

case DataObjectIO::pngFormat:
save_params.push_back(CV_IMWRITE_PNG_COMPRESSION);
save_params.push_back(cv::IMWRITE_PNG_COMPRESSION);
save_params.push_back((*paramsOpt)[0].getVal<int>());
checkAndModifyFilenameSuffix(fileName, "png");
addAlpha = (*paramsOpt)[1].getVal<int>() != 0 ? true : false;
Expand Down Expand Up @@ -4848,13 +4860,13 @@ ito::RetVal DataObjectIO::loadImage(

if (colorFormat.isEmpty() || colorFormat.compare("asIs", Qt::CaseInsensitive) == 0)
{
flags = CV_LOAD_IMAGE_ANYDEPTH;
flags = cv::IMREAD_ANYDEPTH;
flags *= -1;
reduceChannel = false;
}
else if (colorFormat.compare("alpha", Qt::CaseInsensitive) == 0)
{
flags = CV_LOAD_IMAGE_COLOR | CV_LOAD_IMAGE_ANYDEPTH;
flags = cv::IMREAD_COLOR | cv::IMREAD_ANYDEPTH;
flags *= -1;
reduceChannel = true;
}
Expand All @@ -4863,22 +4875,22 @@ ito::RetVal DataObjectIO::loadImage(
colorFormat.compare("G", Qt::CaseInsensitive) == 0 ||
colorFormat.compare("B", Qt::CaseInsensitive) == 0)
{
flags = CV_LOAD_IMAGE_COLOR | CV_LOAD_IMAGE_ANYDEPTH;
flags = cv::IMREAD_COLOR | cv::IMREAD_ANYDEPTH;
flags *= -1;
reduceChannel = true;
}
else if (
colorFormat.compare("gray", Qt::CaseInsensitive) == 0 ||
colorFormat.compare("grey", Qt::CaseInsensitive) == 0)
{
flags = CV_LOAD_IMAGE_GRAYSCALE | CV_LOAD_IMAGE_ANYDEPTH;
flags = cv::IMREAD_GRAYSCALE | cv::IMREAD_ANYDEPTH;

reduceChannel = false;
}
else
{
reduceChannel = false;
flags = CV_LOAD_IMAGE_COLOR;
flags = cv::IMREAD_COLOR;
flags *= -1;
}

Expand Down
7 changes: 6 additions & 1 deletion DummyGrabber/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
7 changes: 6 additions & 1 deletion DummyMotor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
7 changes: 6 additions & 1 deletion FFTWfilters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib REQUIRED)
find_package(OpenCV COMPONENTS core REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()
find_package(FFTW 3)

include(ItomBuildMacros)
Expand Down
7 changes: 6 additions & 1 deletion FileGrabber/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ itom_init_plugin_library(${target_name}) #Start the project, init compiler setti
itom_find_package_qt(ON Core Widgets Xml LinguistTools)

#run once so we get the installed opencv version
find_package(OpenCV COMPONENTS core highgui REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core highgui REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()
if(OpenCV_VERSION_MAJOR GREATER 2)
# for opencv >= 3 we need the imgcodecs module which is not present in opencv < 3 so run again
find_package(OpenCV COMPONENTS core highgui imgcodecs REQUIRED)
Expand Down
7 changes: 6 additions & 1 deletion FittingFilters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ITOM_SDK_DIR}/cmake)

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib REQUIRED)
find_package(OpenCV COMPONENTS core imgproc REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS core imgproc REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()
find_package(LAPACKE)
find_package(OpenMP QUIET)

Expand Down
7 changes: 6 additions & 1 deletion GenICam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT

find_package(ITOM_SDK COMPONENTS dataobject itomCommonLib itomCommonQtLib itomWidgets REQUIRED)
find_package(GenICam QUIET) #located in CMAKE_CURRENT_SOURCE_DIR
find_package(OpenCV COMPONENTS imgproc REQUIRED)
find_package(OpenCV REQUIRED COMPONENTS imgproc REQUIRED)

# Verify OpenCV version is 3.0 or higher
if(OpenCV_VERSION VERSION_LESS "3.0")
message(FATAL_ERROR "OpenCV version ${OpenCV_VERSION} found, but version 3.0 or higher is required (supports 3.x, 4.x, and 5.0+)")
endif()

include(ItomBuildMacros)
itom_init_cmake_policy(3.12)
Expand Down
Loading