Commit f41116e1 authored by Jean-Loup Haberbusch's avatar Jean-Loup Haberbusch

Merge branch 'hotfix-4.0.2'

parents a7a2b881 94cb834d
......@@ -16,7 +16,7 @@ set(CAMITK_PROJECT_NAME "CamiTK")
set(CAMITK_VERSION_MAJOR "4")
set(CAMITK_VERSION_MINOR "0")
set(CAMITK_VER_NICKNAME "red") # Red Amaranth American rose Auburn Burgundy Cardinal Carmine Carnelian Cerise Coquelicot
set(CAMITK_VERSION_PATCH "1") # patch version for packaging, change when appropriate
set(CAMITK_VERSION_PATCH "2") # patch version for packaging, change when appropriate
string(TOLOWER "${CAMITK_PROJECT_NAME}-${CAMITK_VERSION_MAJOR}.${CAMITK_VERSION_MINOR}" CAMITK_SHORT_VERSION_STRING)
# Specific to SDK: this is the SDK build
......
......@@ -349,9 +349,13 @@ macro(camitk_application)
#########################################################################
# 1st CAMITKCORE LIBRARY DEPENDENCY
add_dependencies(${APPLICATION_TARGET_NAME} ${CAMITK_CORE_TARGET_LIB_NAME})
# add the dependency to the core automoc target
set_property(TARGET ${APPLICATION_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${CAMITK_CORE_TARGET_LIB_NAME})
# add the target dependency (i.e., enable proper parallelization of the build process
# only if inside the sdk build
if(CAMITK_SDK_BUILD)
add_dependencies(${APPLICATION_TARGET_NAME} ${CAMITK_CORE_TARGET_LIB_NAME})
# add the dependency to the core automoc target
set_property(TARGET ${APPLICATION_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${CAMITK_CORE_TARGET_LIB_NAME})
endif()
# 2nd COMPONENTS DEPENDENCIES
if(${APPLICATION_NAME_CMAKE}_NEEDS_COMPONENT_EXTENSION)
......
......@@ -425,8 +425,6 @@ macro(camitk_extension)
# 1st CAMITKCORE LIBRARY DEPENDENCY
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} ${CAMITK_CORE_TARGET_LIB_NAME})
# add the dependency to the core automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${CAMITK_CORE_TARGET_LIB_NAME})
# 2nd COMPONENTS DEPENDENCIES
if(${EXTENSION_NAME_CMAKE}_NEEDS_COMPONENT_EXTENSION)
......@@ -447,13 +445,9 @@ macro(camitk_extension)
# CMake / CDash dependencies
if(PACKAGING_NSIS)
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} component_${COMPONENT_NEEDED})
# add the dependency to the component automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS component_${COMPONENT_NEEDED})
else()
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} component-${COMPONENT_NEEDED})
set(COMPONENTS_DEPENDENCY_LIST ${COMPONENTS_DEPENDENCY_LIST} component-${COMPONENT_NEEDED})
# add the dependency to the component automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS component-${COMPONENT_NEEDED})
endif()
endforeach()
endif()
......@@ -477,13 +471,9 @@ macro(camitk_extension)
# CMake / CDash dependencies
if (PACKAGING_NSIS)
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} action_${ACTION_NEEDED})
# add the dependency to the action automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS action_${ACTION_NEEDED})
else()
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} action-${ACTION_NEEDED})
set(ACTIONS_DEPENDENCY_LIST ${ACTIONS_DEPENDENCY_LIST} action-${ACTION_NEEDED})
# add the dependency to the action automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS action-${ACTION_NEEDED})
endif()
endforeach()
endif()
......@@ -510,13 +500,11 @@ macro(camitk_extension)
# CMake / CDash dependencies
if (PACKAGING_NSIS)
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} library_${CEP_LIBRARY_NEEDED})
# add the dependency to the library automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS library_${CEP_LIBRARY_NEEDED})
else()
add_dependencies(${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} library-${CEP_LIBRARY_NEEDED})
set(CEP_LIBRARIES_DEPENDENCY_LIST ${CEP_LIBRARIES_DEPENDENCY_LIST} library-${CEP_LIBRARY_NEEDED})
# add the dependency to the library automoc target
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS library-${CEP_LIBRARY_NEEDED})
set_property(TARGET ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS library-${CEP_LIBRARY_NEEDED})
endif()
endforeach()
endif()
......
......@@ -361,7 +361,7 @@ macro(camitk_library)
set(LIBRARIES_DEPENDENCY_LIST "") #use for generating the project.xml file
if(${DEFAULT_LIBRARY_NAME_CMAKE}_NEEDS_CEP_LIBRARIES)
foreach(CEP_LIBRARY_NEEDED ${${DEFAULT_LIBRARY_NAME_CMAKE}_NEEDS_CEP_LIBRARIES})
# include directories from build, camitk (local or global install).
# include directories from build, camitk (local or global install).
include_directories(${CAMITK_BUILD_INCLUDE_DIR}/libraries/${CEP_LIBRARY_NEEDED})
include_directories(${CAMITK_INCLUDE_DIR}/libraries/${CEP_LIBRARY_NEEDED})
# file dependency
......
......@@ -141,8 +141,7 @@ void @ACTIONCLASSNAME@::process(@COMPONENTNAME@ * comp) {
// Creating the output image
vtkSmartPointer<vtkImageData> outputImage = vtkSmartPointer<vtkImageData>::New();
outputImage->SetDimensions(dims);
outputImage->SetScalarType(inputImage->GetScalarType());
outputImage->SetNumberOfScalarComponents(numberOfScalarComponents);
outputImage->AllocateScalars(inputImage->GetScalarType(), numberOfScalarComponents);
// Here, we arbitrarily fill the output image with the exact same data as the input image.
// Thus this action just copy the input image (an example of stupid action...).
......@@ -240,7 +239,6 @@ vtkSmartPointer<vtkImageData> @ACTIONCLASSNAME@::itkProcess(vtkSmartPointer<vtkI
resultImage->GetExtent(extent);
result->SetExtent(extent);
result->DeepCopy(resultImage);
result->Update();
// Set CamiTK progress bar back to zero (the processing filter is over)
observer->Reset();
......
......@@ -5,9 +5,6 @@
// include generated actions headers
@INCLUDEACTIONHEADERS@
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(@EXTENSIONCLASSNAMELOW@, @EXTENSIONCLASSNAME@);
// --------------- getActions -------------------
void @EXTENSIONCLASSNAME@::init() {
@BEGIN_REGISTERACTIONS@
......
......@@ -8,6 +8,7 @@
class @EXTENSIONCLASSNAME@ : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_PLUGIN_METADATA(IID "fr.imag.camitk.wizardgenerated.action.@EXTENSIONCLASSNAME@")
public:
/// Constructor
......
......@@ -69,8 +69,7 @@ using namespace camitk;
vtkSmartPointer<vtkImageData> image = NULL;
image = vtkSmartPointer<vtkImageData>::New();
image->SetDimensions(3,3,3);
image->SetScalarType(VTK_UNSIGNED_CHAR);
image->SetNumberOfScalarComponents(1);
image->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
// Here, we arbitrarily fill the image data
int* dims = image->GetDimensions();
......
......@@ -13,8 +13,6 @@
using namespace camitk;
// --------------- Extension Declaration -------------------
Q_EXPORT_PLUGIN2(@EXTENSIONCLASSNAMELOW@, @EXTENSIONCLASSNAME@);
// --------------- GetFileExtensions -------------------
QStringList @EXTENSIONCLASSNAME@::getFileExtensions() const {
......
......@@ -10,6 +10,7 @@
class @EXTENSIONCLASSNAME@ : public camitk::ComponentExtension {
Q_OBJECT
Q_INTERFACES(camitk::ComponentExtension);
Q_PLUGIN_METADATA(IID "fr.imag.camitk.wizardgenerated.component.@EXTENSIONCLASSNAME@")
public:
/// Constructor
......
#--------------------------------------------
# CamiTK Extension Project
#--------------------------------------------
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.0)
# Find CamiTK SDK
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
......
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