Skip to content

Commit 4c7f14e

Browse files
author
Adam Rankin
committed
re #1106 Adding DVP 1.7.0 library
Adding basic skeleton for DVP device Adding ImageOrientation to tracked frame message
1 parent ec250ae commit 4c7f14e

30 files changed

Lines changed: 3575 additions & 289 deletions

PlusLib/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,23 @@ MARK_AS_ADVANCED(USDIGITAL_SEI_BASE_DIR
125125
USDIGITAL_SEI_LIB_DIR
126126
)
127127

128+
IF( WIN32 )
129+
SET( NVIDIA_DVP_BASE_DIR ${PLUSLIB_TOOLS_DIR}/NVidia/dvp170 )
130+
SET( NVIDIA_DVP_INCLUDE_DIR ${NVIDIA_DVP_BASE_DIR}/include CACHE PATH "Path to the NVidia DVP include directory." FORCE )
131+
IF( MSVC AND ${CMAKE_GENERATOR} MATCHES "Win64" )
132+
SET (NVIDIA_DVP_BINARY_DIR ${NVIDIA_DVP_BASE_DIR}/bin/x64 CACHE PATH "Directory containing NVidia DVP shared library file." FORCE)
133+
SET (NVIDIA_DVP_LIB_DIR ${NVIDIA_DVP_BASE_DIR}/lib/x64 CACHE PATH "Directory containing NVidia DVP static library file." FORCE)
134+
ELSE()
135+
SET (NVIDIA_DVP_BINARY_DIR ${NVIDIA_DVP_BASE_DIR}/bin/win32 CACHE PATH "Directory containing NVidia DVP shared library file." FORCE)
136+
SET (NVIDIA_DVP_LIB_DIR ${NVIDIA_DVP_BASE_DIR}/lib/win32 CACHE PATH "Directory containing NVidia DVP static library file." FORCE)
137+
ENDIF()
138+
MARK_AS_ADVANCED(NVIDIA_DVP_BASE_DIR
139+
NVIDIA_DVP_INCLUDE_DIR
140+
NVIDIA_DVP_BINARY_DIR
141+
NVIDIA_DVP_LIB_DIR
142+
)
143+
ENDIF()
144+
128145
# --------------------------------------------------------------------------
129146
# Subdirs
130147
#

PlusLib/src/CMakeLists.txt

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
# --------------------------------------------------------------------------
42
# Try to find VTK and include its settings (otherwise complain)
53
FIND_PACKAGE(VTK NO_MODULE REQUIRED PATHS ${VTK_DIR} NO_DEFAULT_PATH)
@@ -16,13 +14,11 @@ FIND_PACKAGE (ITK REQUIRED PATHS ${ITK_DIR} NO_DEFAULT_PATH)
1614
IF ( ITK_FOUND )
1715
INCLUDE( ${ITK_USE_FILE} )
1816
ELSE ( ITK_FOUND )
19-
MESSAGE( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration")
17+
MESSAGE( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration")
2018
ENDIF( ITK_FOUND )
2119

22-
2320
# --------------------------------------------------------------------------
2421
# Use OpenIGTLink protocol
25-
#
2622
OPTION(PLUS_USE_OpenIGTLink "Use the OpenIGTLink protocol" OFF)
2723
SET(PLUS_OPENIGTLINK_VERSION)
2824
IF(PLUS_USE_OpenIGTLink)
@@ -41,13 +37,12 @@ ENDIF(PLUS_USE_OpenIGTLink)
4137
# --------------------------------------------------------------------------
4238
# Options
4339
OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS} ${ITK_BUILD_SHARED_LIBS} )
44-
# OPTION (BUILD_SLICER_MODULE "Build project as Slicer module" OFF)
4540

4641
# --------------------------------------------------------------------------
4742
# Use accurate or simple timer protocol
4843
#
4944
# DevPartnerStudio performance profiler hangs if the accurate timer
50-
# is used.If USE_SIMPLE_TIMER is defined then the accurate timer is
45+
# is used. If USE_SIMPLE_TIMER is defined then the accurate timer is
5146
# bypassed. It should only be enabled for performance profiling.
5247

5348
OPTION(PLUS_USE_SIMPLE_TIMER "Use simple timer (not very accurate but more compatible with performance profilers)" OFF)
@@ -60,7 +55,6 @@ OPTION(PLUS_USE_INTEL_MKL "Use the Intel MKL library (only for image processing)
6055

6156
# --------------------------------------------------------------------------
6257
# Configure output paths for libraries and executables.
63-
#
6458
IF(NOT DEFINED PLUS_EXECUTABLE_OUTPUT_PATH)
6559
SET(PLUS_EXECUTABLE_OUTPUT_PATH "${PlusLib_BINARY_DIR}/bin")
6660
ENDIF()
@@ -77,7 +71,6 @@ ENDIF()
7771

7872
# --------------------------------------------------------------------------
7973
# Sikuli binary directory path.
80-
#
8174
SET(SIKULI_BIN_DIR ${PLUSLIB_TOOLS_DIR}/Sikuli/ CACHE PATH "Path to the Sikuli binary directory." FORCE)
8275

8376
# --------------------------------------------------------------------------
@@ -91,7 +84,6 @@ LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
9184

9285
# --------------------------------------------------------------------------
9386
# Command-line application documentation
94-
#
9587

9688
# Create directory for the command-line application help files (they are generated by after build by running
9789
# each command-line tool with the --help parameter)
@@ -113,7 +105,6 @@ ENDMACRO(GENERATE_HELP_DOC)
113105

114106
# --------------------------------------------------------------------------
115107
# Library export directive file generation
116-
#
117108

118109
# This macro generates a ...Export.h file that specifies platform-specific DLL export directives,
119110
# for example on Windows: __declspec( dllexport )
@@ -129,7 +120,6 @@ ENDMACRO(GENERATE_EXPORT_DIRECTIVE_FILE)
129120

130121
# --------------------------------------------------------------------------
131122
# Initialize variables that will be filled by makefiles in subdirectories
132-
#
133123

134124
# PLUSLIB_DEPENDENCIES contain all the exported targets that will be
135125
# available to applications that use PlusLib
@@ -183,7 +173,6 @@ ADD_SUBDIRECTORY(PlusVolumeReconstruction)
183173
INCLUDE_DIRECTORIES( ${PlusVolumeReconstruction_INCLUDE_DIRS} )
184174
SET(PLUSLIB_INCLUDE_DIRS ${PLUSLIB_INCLUDE_DIRS} ${PlusVolumeReconstruction_INCLUDE_DIRS} CACHE INTERNAL "" )
185175

186-
# PlusDataCollection
187176
ADD_SUBDIRECTORY(PlusDataCollection)
188177
INCLUDE_DIRECTORIES( ${PlusDataCollection_INCLUDE_DIRS} )
189178
SET(PLUSLIB_INCLUDE_DIRS ${PLUSLIB_INCLUDE_DIRS} ${PlusDataCollection_INCLUDE_DIRS} CACHE INTERNAL "" )
@@ -206,7 +195,6 @@ FILE(GLOB headers
206195

207196
# --------------------------------------------------------------------------
208197
# Configure include file
209-
#
210198
CONFIGURE_FILE(
211199
${CMAKE_CURRENT_SOURCE_DIR}/PlusConfigure.h.in
212200
${CMAKE_CURRENT_BINARY_DIR}/PlusConfigure.h
@@ -236,6 +224,27 @@ export(TARGETS
236224
# (this registers the build-tree with a global CMake-registry)
237225
export(PACKAGE PlusLib)
238226

227+
#----------------------------------------------------------------------------
228+
# Append entries for export
229+
IF( ${PLUS_USE_EPIPHAN} )
230+
LIST(APPEND PLUSLIB_DEPENDENCIES Epiphan)
231+
ENDIF()
232+
IF( ${PLUS_USE_Ascension3DG} )
233+
LIST(APPEND PLUSLIB_DEPENDENCIES Ascension3DG)
234+
ENDIF()
235+
IF( ${PLUS_USE_Ascension3DGm} )
236+
LIST(APPEND PLUSLIB_DEPENDENCIES Ascension3DGm)
237+
ENDIF()
238+
IF( ${PLUS_USE_PHIDGET_SPATIAL_TRACKER} )
239+
LIST(APPEND PLUSLIB_DEPENDENCIES phidget)
240+
ENDIF()
241+
IF( ${PLUS_USE_BRACHY_TRACKER} )
242+
LIST(APPEND PLUSLIB_DEPENDENCIES USDigitalEncoders)
243+
ENDIF()
244+
IF( ${PLUS_USE_NVIDIA_DVP} )
245+
LIST(APPEND PLUSLIB_DEPENDENCIES NVidiaDVP)
246+
ENDIF()
247+
239248
#-----------------------------------------------------------------------------
240249
# Re: #1075 eventually remove this section after people are used to the new location
241250
# Create a PlusConfig.cmake file for the use from the build tree
@@ -253,7 +262,6 @@ CONFIGURE_FILE(PlusLibConfigVersion.cmake.in
253262

254263
#-----------------------------------------------------------------------------
255264
# Generate default application configuration files in the non-installed executable directories (Release and Debug too)
256-
#
257265
SET( PLUSCONFIG_DEVICESET_CONFIG_DIR "${PLUSLIB_DATA_DIR}/ConfigFiles" )
258266
SET( PLUSCONFIG_IMAGE_DIR "${PLUSLIB_DATA_DIR}/TestImages" )
259267
SET( PLUSCONFIG_MODEL_DIR "${PLUSLIB_DATA_DIR}/CADModels" )
@@ -279,7 +287,6 @@ ENDIF()
279287

280288
#-----------------------------------------------------------------------------
281289
# Documentation
282-
#
283290
OPTION(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF)
284291
MARK_AS_ADVANCED(BUILD_DOCUMENTATION)
285292

@@ -308,32 +315,13 @@ ENDIF(BUILD_DOCUMENTATION)
308315

309316
ADD_SUBDIRECTORY(Documentation)
310317

311-
#----------------------------------------------------------------------------
312-
# Append entries for export to UsePlusLib.cmake
313-
IF( ${PLUS_USE_EPIPHAN} )
314-
LIST(APPEND PLUSLIB_DEPENDENCIES Epiphan)
315-
ENDIF()
316-
IF( ${PLUS_USE_Ascension3DG} )
317-
LIST(APPEND PLUSLIB_DEPENDENCIES Ascension3DG)
318-
ENDIF()
319-
IF( ${PLUS_USE_Ascension3DGm} )
320-
LIST(APPEND PLUSLIB_DEPENDENCIES Ascension3DGm)
321-
ENDIF()
322-
IF( ${PLUS_USE_PHIDGET_SPATIAL_TRACKER} )
323-
LIST(APPEND PLUSLIB_DEPENDENCIES phidget)
324-
ENDIF()
325-
IF( ${PLUS_USE_BRACHY_TRACKER} )
326-
LIST(APPEND PLUSLIB_DEPENDENCIES USDigitalEncoders)
327-
ENDIF()
328-
329318
#-----------------------------------------------------------------------------
330319
# Generate include file for projects that use this library
331-
#
332320
CONFIGURE_FILE(
333321
${CMAKE_CURRENT_SOURCE_DIR}/UsePlusLib.cmake.in
334322
${CMAKE_CURRENT_BINARY_DIR}/UsePlusLib.cmake @ONLY)
335323

336-
#-----------------------------------------------------------------------------
324+
#-----------------------------------------------------------------------------
337325
# With regards to ticket #1075, also generate in top-level directory
338326
CONFIGURE_FILE(
339327
${CMAKE_CURRENT_SOURCE_DIR}/UsePlusLib.cmake.in

PlusLib/src/PlusConfigure.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
#cmakedefine PLUS_USE_tesseract
100100
#cmakedefine PLUS_TEST_tesseract
101101
#cmakedefine PLUS_USE_USDIGITALENCODERS_TRACKER
102+
#cmakedefine PLUS_USE_NVIDIA_DVP
102103

103104
#cmakedefine PLUS_USE_SIMPLE_TIMER
104105
#cmakedefine PLUS_TEST_HIGH_ACCURACY_TIMING

0 commit comments

Comments
 (0)