Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 957d1f7b authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

Merge branch 'release/1.0.0'

parents 654ffd76 2ec5b64e
No related branches found
No related tags found
No related merge requests found
Showing
with 484 additions and 278 deletions
......@@ -6,11 +6,15 @@
## Generated files
## ###################################################################
wrp
qml/*/qmldir
doc/html
doc/html*
src/core/dtkImagingCore.i
## ###################################################################
## Insource build trees
## ###################################################################
......
# ChangLog
## version 1.0.0 - 2018-03-08
- add filters abstractions (ErosionFilter, WatershedFilter, HTransform)
- add python wrapping
- layer rearchitecturing: split into Filter, Core, Composer and Widgets components
......@@ -14,7 +14,7 @@
cmake_minimum_required(VERSION 3.2.0)
##################################################################
######################################################################
project(dtkImaging)
......@@ -22,9 +22,9 @@ project(dtkImaging)
## Version setup
## ###################################################################
set(${PROJECT_NAME}_VERSION_MAJOR 0)
set(${PROJECT_NAME}_VERSION_MINOR 1)
set(${PROJECT_NAME}_VERSION_PATCH 2)
set(${PROJECT_NAME}_VERSION_MAJOR 1)
set(${PROJECT_NAME}_VERSION_MINOR 0)
set(${PROJECT_NAME}_VERSION_PATCH 0)
set(${PROJECT_NAME}_VERSION
${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH})
......@@ -92,19 +92,33 @@ enable_testing()
## Dependencies - external
## #################################################################
find_package(Qt5 REQUIRED COMPONENTS Core)
find_package(dtk 1.4.0 REQUIRED)
# variables used by doc and tst
get_target_property(QT5_QMAKE_EXECUTABLE Qt5::qmake LOCATION)
get_filename_component(QT5_BINARY_DIR ${QT5_QMAKE_EXECUTABLE} PATH)
include_directories(${dtk_INCLUDE_DIRS})
## #################################################################
## Options
## #################################################################
option(DTK_IMAGING_BUILD_COMPOSER "Builds the composer nodes" ${DTK_BUILD_COMPOSER})
option(DTK_IMAGING_BUILD_WIDGETS "Builds the widgets" ${DTK_BUILD_WIDGETS})
## #################################################################
## Dependencies - external
## #################################################################
find_package(dtk 1.2.0 REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core)
if(DTK_IMAGING_BUILD_WIDGETS)
find_package(Qt5 REQUIRED COMPONENTS Widgets Gui Network Xml)
endif(DTK_IMAGING_BUILD_WIDGETS)
include_directories(${dtk_INCLUDE_DIRS})
if(DTK_IMAGING_BUILD_COMPOSER)
find_package(Qt5 REQUIRED COMPONENTS Widgets Gui Network Xml Concurrent Svg)
endif(DTK_IMAGING_BUILD_COMPOSER)
get_target_property(QT5_QMAKE_EXECUTABLE Qt5::qmake LOCATION)
get_filename_component(QT5_BINARY_DIR ${QT5_QMAKE_EXECUTABLE} PATH)
## #################################################################
## Dependencies - internal
......@@ -112,14 +126,16 @@ include_directories(${dtk_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_SOURCE_DIR}/src/core)
include_directories(${CMAKE_SOURCE_DIR}/src/composer)
include_directories(${CMAKE_SOURCE_DIR}/src/filters)
include_directories(${CMAKE_SOURCE_DIR}/src/widgets)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkImagingCore)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkImagingFilters)
## #################################################################
## Path relocationt
## #################################################################
if(DTK_IMAGING_BUILD_COMPOSER)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkImagingComposer)
endif(DTK_IMAGING_BUILD_COMPOSER)
if(DTK_IMAGING_BUILD_WIDGETS)
include_directories(${CMAKE_SOURCE_DIR}/src/dtkImagingWidgets)
endif(DTK_IMAGING_BUILD_WIDGETS)
## ###################################################################
## Input
......@@ -130,18 +146,6 @@ add_subdirectory(tst)
add_subdirectory(app)
add_subdirectory(doc)
## #################################################################
## Applicative target
## #################################################################
set(DTKIMAGING_TARGETS ${DTKIMAGING_TARGETS} ${PROJECT_NAME})
## #################################################################
## Target export
## #################################################################
export(TARGETS ${DTKIMAGING_TARGETS} FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Depends.cmake")
## ###################################################################
## Exporting
## ###################################################################
......
......@@ -12,8 +12,10 @@
##
### Code:
add_subdirectory(dtkImageStatistics)
add_subdirectory(dtkImageViewer)
if(DTK_IMAGING_BUILD_WIDGETS)
add_subdirectory(dtkImageStatistics)
add_subdirectory(dtkImageViewer)
endif(DTK_IMAGING_BUILD_WIDGETS)
######################################################################
### CMakeLists.txt ends here
......@@ -19,9 +19,7 @@ project(dtkImageStatistics)
## #################################################################
set(${PROJECT_NAME}_HEADERS)
set(${PROJECT_NAME}_SOURCES
main.cpp)
set(${PROJECT_NAME}_SOURCES main.cpp)
## #################################################################
## Build rules
......@@ -39,12 +37,15 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
## Link rules
## ###################################################################
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME}
dtkImaging
dtkLog
dtkCore)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
dtkCore
dtkImagingCore
dtkImagingFilters
dtkImagingWidgets)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -15,16 +15,16 @@
#include <QtCore>
#include <dtkCore>
#include <dtkImaging>
#include <dtkImagingCore>
int main(int argc, char **argv)
{
dtkCoreApplication app(argc,argv);
app.setApplicationName("dtkImageStatistics");
app.setOrganizationName("inria");
app.setOrganizationDomain("fr");
app.setApplicationVersion("0.9.9");
app.setApplicationVersion("1.0.0");
QCommandLineParser& parser = *(app.parser());
parser.setApplicationDescription("DTK imaging statistics.");
......@@ -44,41 +44,37 @@ int main(int argc, char **argv)
return -2;
}
//finding and initialize plugins
dtkImagingSettings settings;
settings.beginGroup("imaging");
dtkImaging::reader::pluginManager().initialize(settings.value("plugins").toString());
dtkImaging::statistics::pluginManager().initialize(settings.value("plugins").toString());
settings.endGroup();
//process it
dtkImage* img=dtkImaging::read(positionalArguments.at(0));
dtkImage *img = dtkImaging::read(positionalArguments.at(0));
QStringList statsKeys = dtkImaging::statistics::pluginFactory().keys();
QStringList statsKeys=dtkImaging::statistics::pluginFactory().keys();
if(statsKeys.isEmpty())
return -1;
dtkAbstractImageStatistics *statsPlugin=dtkImaging::statistics::pluginFactory().create(statsKeys.at(0));
dtkAbstractImageStatistics *statsPlugin = dtkImaging::statistics::pluginFactory().create(statsKeys.at(0));
statsPlugin->setImage(img);
statsPlugin->run();
//display results
double mean,sigma,var,sum,min,max;
mean=statsPlugin->mean();
sigma=statsPlugin->sigma();
var=statsPlugin->variance();
sum=statsPlugin->sum();
double mean, sigma, var, sum, min, max;
min=statsPlugin->min();
max=statsPlugin->max();
mean = statsPlugin->mean();
sigma = statsPlugin->sigma();
var = statsPlugin->variance();
sum = statsPlugin->sum();
min = statsPlugin->min();
max = statsPlugin->max();
//image details
qDebug()<<"dimensions: "<<img->extent();
qDebug()<<"origin (physical): "<<img->origin();
qDebug()<<"spacing (physical): "<<img->spacing();
//computed values
qDebug()<<"mean: "<<mean;
qDebug()<<"sigma: "<<sigma;
qDebug()<<"var: "<<var;
......@@ -87,7 +83,6 @@ int main(int argc, char **argv)
qDebug()<<"min: "<<min;
qDebug()<<"max: "<<max;
return 0;
}
......
......@@ -19,9 +19,7 @@ project(dtkImageViewer)
## #################################################################
set(${PROJECT_NAME}_HEADERS)
set(${PROJECT_NAME}_SOURCES
main.cpp)
set(${PROJECT_NAME}_SOURCES main.cpp)
## #################################################################
## Build rules
......@@ -40,11 +38,13 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
## ###################################################################
target_link_libraries(${PROJECT_NAME}
dtkImaging
dtkLog
dtkCore)
dtkCore
dtkImagingCore
dtkImagingWidgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -16,7 +16,9 @@
#include <dtkLog>
#include <dtkCore>
#include <dtkImaging>
#include <dtkImagingCore>
#include <dtkImagingWidgets>
int main(int argc, char* argv[])
{
......@@ -24,7 +26,7 @@ int main(int argc, char* argv[])
application.setApplicationName("dtkImageViewer");
application.setOrganizationName("inria");
application.setOrganizationDomain("fr");
application.setApplicationVersion("0.9.9");
application.setApplicationVersion("1.0.0");
QCommandLineParser& parser = *(application.parser());
parser.setApplicationDescription("DTK Image Viewer, Args: <image>");
......
......@@ -19,13 +19,15 @@
set(dtkImaging_INCLUDE_DIRS
"@CMAKE_CURRENT_SOURCE_DIR@/src"
"@CMAKE_CURRENT_SOURCE_DIR@/src/core"
"@CMAKE_CURRENT_SOURCE_DIR@/src/composer"
"@CMAKE_CURRENT_SOURCE_DIR@/src/filters"
"@CMAKE_CURRENT_SOURCE_DIR@/src/widgets"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkImagingCore"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkImagingComposer"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkImagingFilters"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkImagingWidgets"
"@CMAKE_CURRENT_BINARY_DIR@")
include("@CMAKE_BINARY_DIR@/dtkImagingDepends.cmake")
set(dtkImaging_WRAP_PREFIX "@CMAKE_SOURCE_DIR@/wrp")
######################################################################
### dtkImagingConfig.cmake.in ends here
......@@ -18,9 +18,15 @@
## ###################################################################
set(dtkImaging_INCLUDE_DIRS
"@CMAKE_INSTALL_PREFIX@/include/dtkImaging")
"@CMAKE_INSTALL_PREFIX@/include"
"@CMAKE_INSTALL_PREFIX@/include/dtkImagingCore"
"@CMAKE_INSTALL_PREFIX@/include/dtkImagingComposer"
"@CMAKE_INSTALL_PREFIX@/include/dtkImagingFilters"
"@CMAKE_INSTALL_PREFIX@/include/dtkImagingWidgets")
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtkImaging/dtkImagingDepends.cmake")
set(dtkImaging_WRAP_PREFIX "@CMAKE_INSTALL_PREFIX@/wrp")
######################################################################
### dtkImagingConfig.install.cmake.in ends here
class dtkImage : public QObject
{
%TypeHeaderCode
#include <dtkImage.h>
#include <dtkImageData.h>
#include <dtkCore/dtkArray.h>
#include <QtCore>
%End
public:
dtkImage(QObject *parent /TransfertThis/ = NULL);
dtkImage(qlonglong x, qlonglong y, QObject *parent = NULL);
dtkImage(qlonglong x, qlonglong y, qlonglong z, QObject *parent = NULL);
dtkImage(const dtkImage& other);
public:
virtual ~dtkImage();
public:
int dim() const;
int storageType() const;
public:
// dtkImageData *data() const;
void *rawData() const;
public:
// void setData(dtkImageData*);
public:
QString identifier() const;
QString pixelId() const;
public:
const int pixelDim() const;
public:
const dtkArray<double> & origin() const;
const dtkArray<double>& spacing() const;
const dtkArray<qlonglong>& extent() const;
const dtkArray<double>& transformMatrix() const;
public:
qlonglong xDim() const;
qlonglong yDim() const;
qlonglong zDim() const;
public:
qlonglong bufferSize() const;
public:
void setOrigin(const dtkArray<double>& origin);
void setSpacing(const dtkArray<double>& spacing);
void setTransformMatrix(const dtkArray<double>& transformMatrix);
};
class dtkImageData : public QObject
{
%TypeHeaderCode
#include <dtkImagingCore/dtkImageData.h>
%End
public:
dtkImageData(QObject *parent /TranfertThis/ = NULL );
dtkImageData(const dtkImageData& other);
public:
virtual ~dtkImageData();
public:
virtual int dim() const = 0;
virtual int storageType() const = 0;
virtual QString pixelId() const = 0;
public:
virtual const int pixelDim() const = 0;
public:
virtual void *rawData() const = 0;
public:
virtual dtkImageData *clone() const = 0;
public:
virtual QString identifier() const = 0;
public:
virtual const dtkArray<double>& origin() const = 0;
virtual const dtkArray<double>& spacing() const = 0;
virtual const dtkArray<qlonglong>& extent() const = 0;
virtual const dtkArray<double>& transformMatrix() const = 0;
virtual qlonglong bufferSize(void) const = 0;
public:
virtual void setOrigin(const dtkArray<double>& origin) = 0;
virtual void setSpacing(const dtkArray<double>& spacing) = 0;
virtual void setTransformMatrix(const dtkArray<double>& spacing) = 0;
};
class dtkImageReader
{
%TypeHeaderCode
#include <dtkImageReader.h>
#include <dtkImage.h>
#include <QtCore>
%End
public:
virtual ~dtkImageReader();
public:
virtual dtkImage *read(const QString& path) = 0;
public:
virtual QStringList types() = 0;
};
class dtkImageReaderPlugin : public dtkCorePluginBase {
%TypeHeaderCode
#include <dtkImageReader.h>
#include <dtkCore/dtkCorePluginBase.h>
%End
};
// typedef dtkCorePluginManager<dtkImageReaderPlugin> dtkImageReaderPluginManagerTemplate;
// class dtkImageReaderPluginManager : public dtkImageReaderPluginManagerTemplate {
// %TypeHeaderCode
// #include <core/dtkImageReader.h>
// #include <dtkCore/dtkCorePlugin.h>
// #include <dtkCore/dtkCorePluginManager.h>
// #include <dtkCore/dtkCorePluginFactory.h>
// %End
// };
// namespace dtkImaging {
// namespace dtkImaging_dtkImageReader {
// %TypeHeaderCode
// #include <dtkCore/dtkCorePlugin.h>
// #include <core/dtkImageReader.h>
// #include <core/dtkImaging.h>
// %End
// dtkImageReaderPluginFactory& pluginFactory();
// };
// };
typedef dtkCorePluginFactory<dtkImageReader> dtkImageReaderPluginFactoryTemplate;
class dtkImageReaderPluginFactory : public dtkImageReaderPluginFactoryTemplate {
%TypeHeaderCode
#include <dtkImageReader.h>
#include <dtkCore/dtkCorePlugin.h>
#include <dtkCore/dtkCorePluginFactory.h>
%End
};
namespace dtkImaging {
%TypeHeaderCode
#include <dtkCore>
#include <dtkImaging.h>
#include <dtkImage.h>
#include <dtkImageReader.h>
%End
dtkCoreLayerManager& manager();
void initialize(const QString& path = QString());
void setVerboseLoading(bool b);
void uninitialize();
dtkImage *read (const QString& path);
bool write(const QString& path, dtkImage *image);
namespace reader {
dtkImageReaderPluginFactory& pluginFactory();
};
};
%Module dtkImagingCore
%Import QtCore/QtCoremod.sip
%Import dtkCore/dtkCoremod.sip
%Include dtkImage.sip
%Include dtkImaging.sip
%Include dtkImageReader.sip
### CMakeLists.txt ---
## Version: $Id$
##
######################################################################
......@@ -13,105 +12,39 @@
##
### Code:
## #################################################################
## Input sources
## #################################################################
add_subdirectory(core)
add_subdirectory(composer)
add_subdirectory(filters)
add_subdirectory(widgets)
add_subdirectory(dtkImagingCore)
add_subdirectory(dtkImagingFilters)
## #################################################################
## Sources
## #################################################################
if(DTK_IMAGING_BUILD_WIDGETS)
add_subdirectory(dtkImagingWidgets)
endif(DTK_IMAGING_BUILD_WIDGETS)
set(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_CORE_HEADERS}
${${PROJECT_NAME}_COMPOSER_HEADERS}
${${PROJECT_NAME}_FILTERS_HEADERS}
${${PROJECT_NAME}_WIDGETS_HEADERS}
)
set(${PROJECT_NAME}_SOURCES
${${PROJECT_NAME}_CORE_SOURCES}
${${PROJECT_NAME}_COMPOSER_SOURCES}
${${PROJECT_NAME}_FILTERS_SOURCES}
${${PROJECT_NAME}_WIDGETS_SOURCES}
)
set(${PROJECT_NAME}_RESOURCES
${${PROJECT_NAME}_COMPOSER_RESOURCES}
)
if(DTK_IMAGING_BUILD_COMPOSER)
add_subdirectory(dtkImagingComposer)
endif(DTK_IMAGING_BUILD_COMPOSER)
## #################################################################
## Build rules
## Targets
## #################################################################
qt5_add_RESOURCES(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RESOURCES})
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${dtkImaging_VERSION}
SOVERSION ${dtkImaging_VERSION_MAJOR})
set(DTKIMAGING_TARGETS)
## ###################################################################
## Link rules
## ###################################################################
set(DTKIMAGING_TARGETS ${DTKIMAGING_TARGETS} dtkImagingCore)
set(DTKIMAGING_TARGETS ${DTKIMAGING_TARGETS} dtkImagingFilters)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
if(DTK_IMAGING_BUILD_WIDGETS)
set(DTKIMAGING_TARGETS ${DTKIMAGING_TARGETS} dtkImagingWidgets)
endif(DTK_IMAGING_BUILD_WIDGETS)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkLog)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
#if(DTK_BUILD_COMPOSER)
target_link_libraries(${PROJECT_NAME} dtkComposer)
#endif(DTK_BUILD_COMPOSER)
if(DTK_IMAGING_BUILD_COMPOSER)
set(DTKIMAGING_TARGETS ${DTKIMAGING_TARGETS} dtkImagingComposer)
endif(DTK_IMAGING_BUILD_COMPOSER)
## #################################################################
## Export header file
## Target export
## #################################################################
add_compiler_export_flags()
message (${PROJECT_NAME})
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/src/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/src/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export")
set(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_HEADERS}
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export"
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export.h")
## ###################################################################
## Install rules - files
## ###################################################################
install(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME}
COMPONENT imaging)
## ###################################################################
## Install rules - targets
## ###################################################################
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT imaging
EXPORT dtkImagingDepends)
export(TARGETS ${DTKIMAGING_TARGETS} FILE "${CMAKE_BINARY_DIR}/dtkImagingDepends.cmake")
######################################################################
### CMakeLists.txt ends here
<RCC>
<qresource prefix="/dtkComposer">
<file>dtkAddFilterNode.json</file>
<file>dtkCloseFilterNode.json</file>
<file>dtkConnectedComponentsFilterNode.json</file>
<file>dtkDilateFilterNode.json</file>
<file>dtkDistanceMapFilterNode.json</file>
<file>dtkDivideFilterNode.json</file>
<file>dtkErodeFilterNode.json</file>
<file>dtkGaussianFilterNode.json</file>
<file>dtkImageReaderNode.json</file>
<file>dtkImageWriterNode.json</file>
<file>dtkInvertFilterNode.json</file>
<file>dtkMaskApplicationFilterNode.json</file>
<file>dtkMedianFilterNode.json</file>
<file>dtkMeshingFilterNode.json</file>
<file>dtkMultiplyFilterNode.json</file>
<file>dtkNormalizeFilterNode.json</file>
<file>dtkOpenFilterNode.json</file>
<file>dtkShrinkFilterNode.json</file>
<file>dtkSubtractFilterNode.json</file>
<file>dtkWindowingFilterNode.json</file>
<file>dtkImageViewerNode.json</file>
<file>dtkImageStatisticsNode.json</file>
<file>dtkRobexNode.json</file>
<file>dtkFSLInitNode.json</file>
<file>dtkGetEnvVariableNode.json</file>
<file>dtkSubtractionImageNode.json</file>
<file>dtkXorFilterNode.json</file>
<file>dtkSegmentationNode.json</file>
<file>dtkThresholdFilterNode.json</file>
<file>dtkConnectivityThresholdNode.json</file>
<file>dtkImageMeshMappingNode.json</file>
<file>dtkImageMeshReaderNode.json</file>
<file>dtkImageMeshWriterNode.json</file>
<file>dtkMeshICPNode.json</file>
</qresource>
</RCC>
## Version: $Id$
##
######################################################################
##
### Commentary:
##
######################################################################
##
### Change Log:
##
######################################################################
##
### Code:
set(${PROJECT_NAME}_CORE_HEADERS
core/dtkAbstractImageViewer.h
core/dtkAbstractImageStatistics.h
core/dtkFilterExecutor
core/dtkFilterExecutor.h
core/dtkImaging
core/dtkImaging.h
core/dtkImagingSettings
core/dtkImagingSettings.h
core/dtkImage
core/dtkImage.h
core/dtkImageData
core/dtkImageData.h
core/dtkImageDefaultStorage
core/dtkImageDefaultStorage.h
core/dtkImageDefaultStorage.tpp
core/dtkImageReader
core/dtkImageReader.h
core/dtkImageMesh
core/dtkImageMesh.h
core/dtkImageMeshEngine
core/dtkImageMeshEngine.h
core/dtkImageWriter
core/dtkImageWriter.h
core/dtkImageMeshReader
core/dtkImageMeshReader.h
core/dtkImageMeshWriter
core/dtkImageMeshWriter.h
core/dtkPixel
core/dtkPixel.h
core/dtkPixelImpl
core/dtkPixelImpl.h
core/dtkTemplatedPixel
core/dtkTemplatedPixel.h
core/dtkTemplatedImageData
core/dtkTemplatedImageData.h
PARENT_SCOPE)
set(${PROJECT_NAME}_CORE_SOURCES
core/dtkAbstractImageViewer.cpp
core/dtkAbstractImageStatistics.cpp
core/dtkImaging.cpp
core/dtkImagingSettings.cpp
core/dtkImage.cpp
core/dtkImageData.cpp
core/dtkImageReader.cpp
core/dtkImageWriter.cpp
core/dtkImageMesh.cpp
core/dtkImageMeshEngine.cpp
core/dtkImageMeshReader.cpp
core/dtkImageMeshWriter.cpp
PARENT_SCOPE)
######################################################################
### CMakeLists.txt ends here
#pragma once
#include "dtkImagingExport.h"
class dtkPixelPrivate;
class DTKIMAGING_EXPORT dtkPixel
{
public:
virtual int pixelDim() const =0;
virtual int pixelType() const =0;
virtual QString identifier() const=0;
};
......@@ -12,20 +12,20 @@
##
### Code:
if(DTK_BUILD_COMPOSER)
add_subdirectory(extension)
if(USE_FSL)
set(${PROJECT_NAME}_FSL_NODE_HEADER
dtkFSLInitNode.h)
project(dtkImagingComposer)
set(${PROJECT_NAME}_FSL_NODE_SOURCE
dtkFSLInitNode.cpp)
## ###################################################################
## Input
## ###################################################################
if(USE_FSL)
set(${PROJECT_NAME}_FSL_NODE_HEADER dtkFSLInitNode.h)
set(${PROJECT_NAME}_FSL_NODE_SOURCE dtkFSLInitNode.cpp)
endif(USE_FSL)
set(${PROJECT_NAME}_COMPOSER_HEADERS_TMP
set(${PROJECT_NAME}_HEADERS
dtkAddFilterNode.h
dtkCloseFilterNode.h
dtkConnectedComponentsFilterNode.h
......@@ -33,9 +33,11 @@ set(${PROJECT_NAME}_COMPOSER_HEADERS_TMP
dtkDistanceMapFilterNode.h
dtkDivideFilterNode.h
dtkErodeFilterNode.h
dtkErosionFilterNode.h
dtkFSLInitNode.h
dtkGaussianFilterNode.h
dtkGetEnvVariableNode.h
dtkHTransformFilterNode.h
dtkImageWriterNode.h
dtkImageReaderNode.h
dtkImageStatisticsNode.h
......@@ -49,6 +51,7 @@ set(${PROJECT_NAME}_COMPOSER_HEADERS_TMP
dtkShrinkFilterNode.h
dtkSubtractFilterNode.h
dtkImageViewerNode.h
dtkWatershedFilterNode.h
dtkWindowingFilterNode.h
dtkRobexNode.h
dtkSubtractionImageNode.h
......@@ -60,10 +63,9 @@ set(${PROJECT_NAME}_COMPOSER_HEADERS_TMP
dtkImageMeshReaderNode.h
dtkImageMeshWriterNode.h
dtkMeshICPNode.h
${${PROJECT_NAME}_FSL_NODE_HEADER}
)
${${PROJECT_NAME}_FSL_NODE_HEADER})
set(${PROJECT_NAME}_COMPOSER_SOURCES_TMP
set(${PROJECT_NAME}_SOURCES
dtkAddFilterNode.cpp
dtkCloseFilterNode.cpp
dtkConnectedComponentsFilterNode.cpp
......@@ -71,9 +73,11 @@ set(${PROJECT_NAME}_COMPOSER_SOURCES_TMP
dtkDistanceMapFilterNode.cpp
dtkDivideFilterNode.cpp
dtkErodeFilterNode.cpp
dtkErosionFilterNode.cpp
dtkFSLInitNode.cpp
dtkGaussianFilterNode.cpp
dtkGetEnvVariableNode.cpp
dtkHTransformFilterNode.cpp
dtkImageWriterNode.cpp
dtkImageReaderNode.cpp
dtkImageStatisticsNode.cpp
......@@ -87,6 +91,7 @@ set(${PROJECT_NAME}_COMPOSER_SOURCES_TMP
dtkShrinkFilterNode.cpp
dtkSubtractFilterNode.cpp
dtkImageViewerNode.cpp
dtkWatershedFilterNode.cpp
dtkWindowingFilterNode.cpp
dtkRobexNode.cpp
dtkSubtractionImageNode.cpp
......@@ -98,34 +103,78 @@ set(${PROJECT_NAME}_COMPOSER_SOURCES_TMP
dtkImageMeshReaderNode.cpp
dtkImageMeshWriterNode.cpp
dtkMeshICPNode.cpp
${${PROJECT_NAME}_FSL_NODE_SOURCE}
)
set(${PROJECT_NAME}_COMPOSER_RESOURCES_TMP
dtkComposer.qrc
)
PREPEND(${PROJECT_NAME}_COMPOSER_HEADERS_TMP "composer" ${${PROJECT_NAME}_COMPOSER_HEADERS_TMP} )
PREPEND(${PROJECT_NAME}_COMPOSER_SOURCES_TMP "composer" ${${PROJECT_NAME}_COMPOSER_SOURCES_TMP} )
PREPEND(${PROJECT_NAME}_COMPOSER_RESOURCES_TMP "composer" ${${PROJECT_NAME}_COMPOSER_RESOURCES_TMP} )
set(${PROJECT_NAME}_COMPOSER_HEADERS
${${PROJECT_NAME}_COMPOSER_HEADERS_TMP}
PARENT_SCOPE)
set(${PROJECT_NAME}_COMPOSER_SOURCES
${${PROJECT_NAME}_COMPOSER_SOURCES_TMP}
PARENT_SCOPE)
set(${PROJECT_NAME}_COMPOSER_RESOURCES
${${PROJECT_NAME}_COMPOSER_RESOURCES_TMP}
PARENT_SCOPE)
else()
set(${PROJECT_NAME}_COMPOSER_HEADERS "" PARENT_SCOPE)
set(${PROJECT_NAME}_COMPOSER_SOURCES "" PARENT_SCOPE)
set(${PROJECT_NAME}_COMPOSER_RESOURCES "" PARENT_SCOPE)
endif(DTK_BUILD_COMPOSER)
${${PROJECT_NAME}_FSL_NODE_SOURCE})
set(${PROJECT_NAME}_RESOURCES dtkComposer.qrc)
set_property(SOURCE qrc_dtkComposer.cpp PROPERTY SKIP_AUTOMOC ON)
## ###################################################################
## Build rules
## ###################################################################
qt5_add_RESOURCES(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RESOURCES})
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES_WRAP}
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
## ###################################################################
## Link rules
## ###################################################################
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkLog)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
target_link_libraries(${PROJECT_NAME} dtkComposer)
target_link_libraries(${PROJECT_NAME} dtkImagingCore)
target_link_libraries(${PROJECT_NAME} dtkImagingFilters)
target_link_libraries(${PROJECT_NAME} dtkImagingWidgets)
## #################################################################
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${dtkImaging_VERSION}
SOVERSION ${dtkImaging_VERSION_MAJOR})
## ###################################################################
## Export header file
## ###################################################################
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export.h")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export")
set(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_HEADERS}
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export"
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export.h")
## ###################################################################
## Install rules - files
## ###################################################################
install(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME}
COMPONENT imaging-composer)
## ###################################################################
## Install rules - targets
## ###################################################################
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT imaging-composer
EXPORT dtkImagingDepends)
######################################################################
### CMakeLists.txt ends here
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment