From 957bd506f2f479f1aab9581ff36de2924d0c5eab Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Fri, 13 Jul 2012 16:19:03 +0200 Subject: [PATCH] Add a close source feature to read usf files. --- common/CMakeLists.txt | 6 ++++++ common/clitkConfiguration.h.in | 1 + common/clitkIO.cxx | 7 +++++++ vv/vvMainWindow.cxx | 6 +++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 336e225..4dcf325 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -33,6 +33,12 @@ SET(clitkCommon_SRC vvImageReader.cxx vvImageWriter.cxx ) +IF(CLITK_PRIVATE_FEATURES) + SET(clitkCommon_SRC ${clitkCommon_SRC} + ${PROJECT_SOURCE_DIR}/private_features/clitkUsfImageIO.cxx + ${PROJECT_SOURCE_DIR}/private_features/clitkUsfImageIOFactory.cxx + ) +ENDIF(CLITK_PRIVATE_FEATURES) ### Declare clitkCommon library ADD_LIBRARY(clitkCommon STATIC ${clitkCommon_SRC}) diff --git a/common/clitkConfiguration.h.in b/common/clitkConfiguration.h.in index 5f99d7a..8d1e1db 100644 --- a/common/clitkConfiguration.h.in +++ b/common/clitkConfiguration.h.in @@ -23,6 +23,7 @@ #cmakedefine01 CLITK_EXPERIMENTAL #cmakedefine01 CLITK_MEMORY_INFO +#cmakedefine01 CLITK_PRIVATE_FEATURES // Global environment variables #define OS_NAME "@CMAKE_SYSTEM@" diff --git a/common/clitkIO.cxx b/common/clitkIO.cxx index 1acd352..011147d 100644 --- a/common/clitkIO.cxx +++ b/common/clitkIO.cxx @@ -33,11 +33,18 @@ #include "clitkXdrImageIOFactory.h" #include "clitkHndImageIOFactory.h" #include "clitkGateAsciiImageIOFactory.h" +#include "clitkConfiguration.h" +#if CLITK_PRIVATE_FEATURES + #include "clitkUsfImageIOFactory.h" +#endif //-------------------------------------------------------------------- // Register factories void clitk::RegisterClitkFactories() { +#if CLITK_PRIVATE_FEATURES + clitk::UsfImageIOFactory::RegisterOneFactory(); +#endif clitk::GateAsciiImageIOFactory::RegisterOneFactory(); clitk::DicomRTDoseIOFactory::RegisterOneFactory(); #if ITK_VERSION_MAJOR <= 3 diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 46b0ecb..9fc078c 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -100,7 +100,11 @@ #define COLUMN_RELOAD_IMAGE 6 #define COLUMN_IMAGE_NAME 7 -#define EXTENSIONS "Images ( *.bmp *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr)" +#if CLITK_PRIVATE_FEATURES + #define EXTENSIONS "Images ( *.bmp *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.usf)" +#else + #define EXTENSIONS "Images ( *.bmp *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr)" +#endif /*Data Tree values 0,Qt::UserRole full filename -- 2.47.1