Skip to content

Commit 4f66bba

Browse files
committed
Init
0 parents  commit 4f66bba

67 files changed

Lines changed: 19881 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
!/src/
3+
!/ScopeOneCore/
4+
!/CMakeLists.txt
5+
!/README.md
6+
!/resources/
7+
8+
!/.gitignore
9+
10+
ScopeOneCore/external/
11+
ScopeOneCore/build/
12+
ScopeOneCore/install/
13+
ScopeOneCore/cmake/
14+
ScopeOneCore/python/

CMakeLists.txt

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
project(ScopeOne VERSION 1.3.30 LANGUAGES CXX)
3+
4+
set(CMAKE_CXX_STANDARD 20)
5+
set(CMAKE_AUTOMOC ON)
6+
set(CMAKE_AUTORCC ON)
7+
set(CMAKE_AUTOUIC ON)
8+
9+
include(GNUInstallDirs)
10+
11+
set(ScopeOneCore_DIR "${CMAKE_SOURCE_DIR}/ScopeOneCore/install/lib/cmake/ScopeOneCore")
12+
13+
set(CMAKE_PREFIX_PATH "C:/Qt/6.9.1/msvc2022_64")
14+
15+
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
16+
configure_file(
17+
"${CMAKE_SOURCE_DIR}/src/AppVersion.h.in"
18+
"${CMAKE_BINARY_DIR}/include/AppVersion.h"
19+
@ONLY
20+
)
21+
22+
file(GLOB_RECURSE _ui_layer_files LIST_DIRECTORIES false
23+
"${CMAKE_SOURCE_DIR}/src/*.h"
24+
"${CMAKE_SOURCE_DIR}/src/*.cpp"
25+
)
26+
foreach (_file IN LISTS _ui_layer_files)
27+
file(STRINGS "${_file}" _internal_core_include_hits REGEX
28+
"^[ \t]*#[ \t]*include[ \t]*[\"<]core/internal/")
29+
if (_internal_core_include_hits)
30+
message(FATAL_ERROR "Layering violation: UI file '${_file}' includes internal core headers.")
31+
endif ()
32+
endforeach ()
33+
34+
find_package(Qt6 COMPONENTS
35+
Core
36+
Gui
37+
Widgets
38+
OpenGL
39+
OpenGLWidgets
40+
Network
41+
Concurrent
42+
REQUIRED
43+
)
44+
45+
find_package(ScopeOneCore CONFIG REQUIRED)
46+
47+
if (WIN32 AND TARGET Qt6::qmake)
48+
get_target_property(qmake_executable Qt6::qmake IMPORTED_LOCATION)
49+
if (qmake_executable)
50+
get_filename_component(qt_bin_dir "${qmake_executable}" DIRECTORY)
51+
set(SCOPEONE_QT_BIN_DIR "${qt_bin_dir}")
52+
find_program(WINDEPLOYQT_EXECUTABLE
53+
NAMES windeployqt
54+
HINTS "${qt_bin_dir}"
55+
)
56+
endif ()
57+
endif ()
58+
59+
set(SCOPEONE_UI_SOURCES
60+
src/main.cpp
61+
src/InspectWidget.cpp
62+
src/MainWindow.cpp
63+
src/ImageProcessingWidget.cpp
64+
src/PreviewWidget.cpp
65+
src/ConsoleWidget.cpp
66+
src/AboutDialog.cpp
67+
src/SettingsDialog.cpp
68+
src/DeviceControlWidget.cpp
69+
src/RecordingWidget.cpp
70+
src/ImageSessionDialog.cpp
71+
src/DevicePropertyWidget.cpp
72+
${CMAKE_SOURCE_DIR}/resources/resources.qrc
73+
)
74+
75+
set(SCOPEONE_UI_HEADERS
76+
src/InspectWidget.h
77+
src/MainWindow.h
78+
src/ImageProcessingWidget.h
79+
src/PreviewWidget.h
80+
src/ConsoleWidget.h
81+
src/AboutDialog.h
82+
src/SettingsDialog.h
83+
src/DeviceControlWidget.h
84+
src/RecordingWidget.h
85+
src/ImageSessionDialog.h
86+
src/DevicePropertyWidget.h
87+
)
88+
89+
if (WIN32)
90+
list(APPEND SCOPEONE_UI_SOURCES ${CMAKE_SOURCE_DIR}/resources/app_icon.rc)
91+
endif ()
92+
93+
add_executable(ScopeOne ${SCOPEONE_UI_SOURCES} ${SCOPEONE_UI_HEADERS})
94+
target_link_libraries(ScopeOne PRIVATE
95+
scopeone::ScopeOneCore
96+
Qt::Widgets
97+
Qt::OpenGL
98+
Qt::OpenGLWidgets
99+
Qt::Concurrent
100+
)
101+
target_include_directories(ScopeOne PRIVATE
102+
${CMAKE_SOURCE_DIR}/src
103+
${CMAKE_BINARY_DIR}/include
104+
)
105+
106+
install(TARGETS ScopeOne
107+
RUNTIME DESTINATION .
108+
)
109+
110+
add_custom_command(TARGET ScopeOne POST_BUILD
111+
COMMAND ${CMAKE_COMMAND} -E copy_directory
112+
"$<TARGET_FILE_DIR:scopeone::ScopeOneCore>"
113+
"$<TARGET_FILE_DIR:ScopeOne>"
114+
)
115+
116+
if (WIN32)
117+
if (WINDEPLOYQT_EXECUTABLE)
118+
add_custom_command(TARGET ScopeOne POST_BUILD
119+
COMMAND "${WINDEPLOYQT_EXECUTABLE}"
120+
--no-translations
121+
--no-compiler-runtime
122+
--release
123+
"$<TARGET_FILE:ScopeOne>"
124+
WORKING_DIRECTORY "${SCOPEONE_QT_BIN_DIR}"
125+
VERBATIM
126+
)
127+
else ()
128+
message(WARNING "windeployqt was not found; ScopeOne may not start outside Qt Creator.")
129+
endif ()
130+
endif ()
131+
132+
if (MSVC)
133+
target_compile_options(ScopeOne PRIVATE
134+
$<$<CONFIG:Release>:/O2 /GL /fp:fast /arch:AVX2>
135+
)
136+
target_compile_definitions(ScopeOne PRIVATE
137+
$<$<CONFIG:Release>:NDEBUG>
138+
)
139+
target_link_options(ScopeOne PRIVATE
140+
$<$<CONFIG:Release>:/LTCG>
141+
)
142+
endif ()
143+
144+
install(FILES
145+
"${CMAKE_SOURCE_DIR}/LICENSE.txt"
146+
"${CMAKE_SOURCE_DIR}/README.md"
147+
DESTINATION .
148+
)
149+
150+
if (WIN32)
151+
install(CODE "
152+
file(GLOB _core_runtime_files
153+
\"$<TARGET_FILE_DIR:scopeone::ScopeOneCore>/*.dll\"
154+
\"$<TARGET_FILE_DIR:scopeone::ScopeOneCore>/ScopeOne_Agent.exe\"
155+
)
156+
if (_core_runtime_files)
157+
file(INSTALL
158+
DESTINATION \"\${CMAKE_INSTALL_PREFIX}\"
159+
TYPE FILE
160+
FILES \${_core_runtime_files}
161+
)
162+
endif()
163+
")
164+
165+
install(CODE "
166+
set(_runtime_dir \"${CMAKE_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}\")
167+
if (NOT EXISTS \"\${_runtime_dir}/$<TARGET_FILE_NAME:ScopeOne>\")
168+
return()
169+
endif()
170+
171+
foreach(_pattern IN ITEMS
172+
Qt6*.dll
173+
opengl32sw.dll
174+
D3Dcompiler_47.dll
175+
dxcompiler.dll
176+
dxil.dll
177+
)
178+
file(GLOB _qt_files \"\${_runtime_dir}/\${_pattern}\")
179+
if (_qt_files)
180+
file(INSTALL
181+
DESTINATION \"\${CMAKE_INSTALL_PREFIX}\"
182+
TYPE FILE
183+
FILES \${_qt_files}
184+
)
185+
endif()
186+
endforeach()
187+
188+
foreach(_subdir IN ITEMS
189+
platforms
190+
imageformats
191+
iconengines
192+
networkinformation
193+
styles
194+
tls
195+
generic
196+
)
197+
if (EXISTS \"\${_runtime_dir}/\${_subdir}\")
198+
file(INSTALL
199+
DESTINATION \"\${CMAKE_INSTALL_PREFIX}\"
200+
TYPE DIRECTORY
201+
FILES \"\${_runtime_dir}/\${_subdir}\"
202+
)
203+
endif()
204+
endforeach()
205+
")
206+
endif ()
207+
208+
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
209+
include(InstallRequiredSystemLibraries)
210+
211+
set(CPACK_GENERATOR "ZIP")
212+
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
213+
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}")
214+
set(CPACK_PACKAGE_FILE_NAME "ScopeOne-${PROJECT_VERSION}-win-x64")
215+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
216+
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
217+
218+
include(CPack)

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# ScopeOne
2+
3+
## Overview
4+
5+
ScopeOne is a high-performance microscopy control software built with C++ and Qt6, leveraging Micro-Manager Core (MMCore) for hardware abstraction. It addresses specific needs in multi-camera imaging while maintaining compatibility with the extensive Micro-Manager device ecosystem. It originated as our lab software and tranition to an open-source project.
6+
7+
The software implements a multi-process architecture that enables true simultaneous preview and acquisition from multiple cameras. Each camera runs in its own MMCore instance, real-time image processing is built into the core with a modular pipeline supporting background calibration, temporal filtering, FFT analysis, and other operations.
8+
9+
## Quick Start
10+
11+
### For Users
12+
13+
Download the latest release package from the [Releases](https://github.com/yourusername/ScopeOne/releases) page and extract it. Run `ScopeOne.exe` to start the application.
14+
15+
**System Requirements:**
16+
- Windows 10/11 (64-bit)
17+
- Micro-Manager device adapters for your hardware
18+
19+
**Device Adapter Setup:**
20+
21+
ScopeOne loads Micro-Manager configuration files (.cfg) directly. We recommend installing Micro-Manager 2.0 to access the full device adapter library. The release package includes only a minimal set of device adapter DLLs. To add support for additional devices, simply copy the required DLL files from your Micro-Manager installation directory (typically `C:\Program Files\Micro-Manager-2.0`) to the folder containing `ScopeOne.exe`.
22+
23+
### For Developers
24+
25+
**Prerequisites:**
26+
- CMake 3.16+
27+
- Visual Studio 2022 (MSVC v143 toolset)
28+
- Qt 6.9.1 (msvc2022_64)
29+
- OpenCV 4.10.0
30+
- libtiff 4.7.1,
31+
- zlib 1.3.1
32+
- mmCoreAndDevices
33+
34+
**Quick Setup:**
35+
36+
Setting up a C++ development environment can be time-consuming. To simplify this, we provide a pre-packaged development source archive that includes all third-party libraries (OpenCV, MMCore, libtiff, zlib, pybind11) except Qt, VS and CMake. Download the development package from [Releases](https://github.com/yourusername/ScopeOne/releases).
37+
38+
**Build Steps:**
39+
40+
1. Build and install `ScopeOneCore`:
41+
```powershell
42+
cmake -S ScopeOneCore -B ScopeOneCore/build
43+
cmake --build ScopeOneCore/build --config Release --parallel
44+
cmake --install ScopeOneCore/build --config Release
45+
```
46+
47+
2. Build the GUI application:
48+
```powershell
49+
cmake -S . -B build
50+
cmake --build build --config Release --parallel
51+
```
52+
53+
3. Run:
54+
```powershell
55+
.\build\Release\ScopeOne.exe
56+
```
57+
58+
4. Create distribution package:
59+
```powershell
60+
cmake --build build --config Release --target package
61+
```
62+
63+
64+
65+
## Tested Devices
66+
- Yokogawa CSU X1
67+
- Hamamatsu C13440
68+
- Andor 897D
69+
70+
The current validation list is still short, but the codebase has been cleaned to remove early hard-coded device assumptions. In principle, ScopeOne should follow Micro-Manager device compatibility.
71+
72+
## Tested System Configurations
73+
- Windows 10, Dual Intel(R) Xeon(R) E5-2637 v3, 64 GB RAM, NVIDIA Quadro K620
74+
- Windows 11, Intel(R) Core(TM) Ultra 5 125U, 64 GB RAM
75+
76+
Although these machines are older and weaker than many typical lab computers, ScopeOne still provides smooth real-time preview and processing on them.
77+

0 commit comments

Comments
 (0)