Commit 650902d4 authored by jcfr's avatar jcfr

COMP: Add option Slicer_BUILD_DICOM_SUPPORT

See http://na-mic.org/Mantis/view.php?id=2271

Fixes #2271

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20505 3bd1e089-480b-0410-8dfb-8563597acbee
parent 14f13b92
......@@ -30,8 +30,7 @@
#include <QTimer>
#include <QToolButton>
#include "qSlicerApplication.h" // Indirectly includes vtkSlicerConfigure.h
#include "vtkSlicerConfigure.h" // For Slicer_USE_PYTHONQT and Slicer_USE_QtTesting
#include "vtkSlicerConfigure.h" // For Slicer_BUILD_DICOM_SUPPORT, Slicer_USE_PYTHONQT, Slicer_USE_QtTesting
// CTK includes
#include <ctkErrorLogWidget.h>
......@@ -46,6 +45,7 @@
#include <ctkVTKSliceView.h>
// SlicerApp includes
#include "qSlicerApplication.h"
#include "qSlicerAppMainWindow.h"
#include "ui_qSlicerAppMainWindow.h"
#include "qSlicerAbstractModule.h"
......@@ -471,6 +471,11 @@ qSlicerAppMainWindow::qSlicerAppMainWindow(QWidget *_parent):Superclass(_parent)
this->setupMenuActions();
d->StartupState = this->saveState();
d->readSettings();
#ifndef Slicer_BUILD_DICOM_SUPPORT
d->actionLoadDICOM->setVisible(false);
#endif
}
//-----------------------------------------------------------------------------
......
......@@ -18,6 +18,7 @@ set(Slicer_USE_PYTHONQT "@Slicer_USE_PYTHONQT@")
set(Slicer_USE_PYTHONQT_WITH_TCL "@Slicer_USE_PYTHONQT_WITH_TCL@")
set(Slicer_USE_QtTesting "@Slicer_USE_QtTesting@")
set(Slicer_BUILD_CLI_SUPPORT "@Slicer_BUILD_CLI_SUPPORT@")
set(Slicer_BUILD_DICOM_SUPPORT "@Slicer_BUILD_DICOM_SUPPORT@")
set(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT "@Slicer_BUILD_EXTENSIONMANAGER_SUPPORT@")
set(Slicer_BUILD_TESTING "@BUILD_TESTING@")
......
......@@ -51,6 +51,8 @@
# define Slicer_BUNDLE_EXTENSIONS_DIRNAME "@Slicer_BUNDLE_EXTENSIONS_DIRNAME@"
#endif
#cmakedefine Slicer_BUILD_DICOM_SUPPORT
#cmakedefine Slicer_BUILD_CLI_SUPPORT
#cmakedefine Slicer_BUILD_CLI
#define Slicer_CLIMODULES_SUBDIR "@Slicer_CLIMODULES_SUBDIR@"
......
......@@ -149,6 +149,7 @@ option(BUILD_TESTING "Test the project" ON)
option(WITH_MEMCHECK "Run tests through valgrind." OFF)
option(WITH_COVERAGE "Enable/Disable coverage" OFF)
option(Slicer_USE_VTK_DEBUG_LEAKS "Enable VTKs Debug Leaks functionality in both VTK and Slicer." ON)
option(Slicer_BUILD_DICOM_SUPPORT "Build Slicer with DICOM support" ON)
option(Slicer_BUILD_QTLOADABLEMODULES "Build Slicer QT Loadable Modules" ON)
mark_as_advanced(Slicer_BUILD_QTLOADABLEMODULES)
CMAKE_DEPENDENT_OPTION(
......
......@@ -9,7 +9,6 @@ set(cli_modules
CastScalarVolume
CheckerBoardFilter
ConnectedComponent
CreateDICOMSeries
CurvatureAnisotropicDiffusion
DiffusionTensorScalarMeasurements
DiffusionWeightedVolumeMasking
......@@ -49,6 +48,12 @@ set(cli_modules
VotingBinaryHoleFillingImageFilter
)
if(Slicer_BUILD_DICOM_SUPPORT)
list(APPEND cli_modules
CreateDICOMSeries
)
endif()
if(Slicer_BUILD_LEGACY_CLI)
set(legacy_cli_modules
AffineRegistration
......@@ -76,8 +81,10 @@ if (Slicer_BUILD_EMSegment)
endif()
if("${ITK_VERSION_MAJOR}" LESS 4)
list(APPEND cli_modules DicomToNrrdConverter)
list(APPEND cli_modules PETStandardUptakeValueComputation)
if(Slicer_BUILD_DICOM_SUPPORT)
list(APPEND cli_modules DicomToNrrdConverter)
list(APPEND cli_modules PETStandardUptakeValueComputation)
endif()
endif()
if(Slicer_USE_MIDAS)
......
......@@ -24,6 +24,9 @@
#include <QMessageBox>
#include <QSettings>
// Slicer includes
#include "vtkSlicerConfigure.h" // For Slicer_BUILD_DICOM_SUPPORT
// SlicerQt includes
#include "qSlicerWelcomeModuleWidget.h"
#include "ui_qSlicerWelcomeModule.h"
......@@ -136,6 +139,10 @@ void qSlicerWelcomeModuleWidget::setup()
connect(d->EditApplicationSettingsButton, SIGNAL(clicked()),
this, SLOT (editApplicationSettings()));
#ifndef Slicer_BUILD_DICOM_SUPPORT
d->LoadDicomDataButton->setDisabled(true);
#endif
this->Superclass::setup();
}
......
add_subdirectory(DICOMLib)
if(Slicer_BUILD_DICOM_SUPPORT)
add_subdirectory(DICOMLib)
endif()
if(Slicer_USE_PYTHONQT_WITH_TCL)
add_subdirectory(EditorLib)
endif()
......
set(KIT_PYTHON_SCRIPTS
DataProbe.py
DICOM.py
Editor.py
LabelStatistics.py
PerformanceTests.py
......@@ -9,6 +8,12 @@ set(KIT_PYTHON_SCRIPTS
VectorToScalarVolume.py
)
if(Slicer_BUILD_DICOM_SUPPORT)
list(APPEND KIT_PYTHON_SCRIPTS
DICOM.py
)
endif()
if(Slicer_USE_PYTHONQT_WITH_TCL)
list(APPEND KIT_PYTHON_SCRIPTS
Editor.py
......
......@@ -85,7 +85,7 @@ if(NOT DEFINED CTK_DIR)
-DCTK_LIB_ImageProcessing/ITK/Core:BOOL=ON
-DCTK_LIB_PluginFramework:BOOL=OFF
-DCTK_PLUGIN_org.commontk.eventbus:BOOL=OFF
-DCTK_APP_ctkDICOM:BOOL=ON
-DCTK_APP_ctkDICOM:BOOL=${Slicer_BUILD_DICOM_SUPPORT}
-DCTK_USE_QTTESTING:BOOL=${Slicer_USE_QtTesting}
-DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
${optional_ep_args}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment