Commit aa12fce5 authored by Sujin Philip's avatar Sujin Philip
Browse files

Update to latest VTK modules infrastructure

parent 9cf903bf
message(STATUS "vtkFiltersMomentInvariants: Building as a Remote VTK module")
INCLUDE(vtkDependentOption)
set(NOT_WIN32 ON)
if(WIN32)
set(NOT_WIN32 OFF)
endif()
vtk_dependent_option(VTK_BUILD_PARALLEL_MOMENT_INVARIANTS "Build vtkFiltersParallelMomentInvariants"
OFF "NOT_WIN32" OFF)
mark_as_advanced(VTK_BUILD_PARALLEL_MOMENT_INVARIANTS)
set(Module_SRCS
vtkMomentsTensor.h
vtkComputeMoments.cxx
vtkMomentInvariants.cxx
vtkMomentsHelper.cxx
vtkSimilarityBalls.cxx
vtkReconstructFromMoments.cxx
)
if(VTK_BUILD_PARALLEL_MOMENT_INVARIANTS)
list(APPEND Module_SRCS
bare_fft.c
bare_fft_interface.c
dfft_common.c
dfft_host.c
vtkPMomentsHelper.cxx
vtkPComputeMoments.cxx
vtkPSimilarityBalls.cxx
)
endif()
SET_SOURCE_FILES_PROPERTIES(
bare_fft.c
bare_fft_interface.c
dfft_common.c
dfft_host.c
PROPERTIES LANGUAGE CXX )
vtk_module_library(vtkFiltersMomentInvariants ${Module_SRCS})
if(VTK_BUILD_PARALLEL_MOMENT_INVARIANTS)
find_package(MPI REQUIRED)
target_include_directories(vtkFiltersMomentInvariants PUBLIC ${MPI_INCLUDE_DIR})
vtk_module_link_libraries(vtkFiltersMomentInvariants LINK_PUBLIC ${MPI_LIBRARIES})
option(ENABLE_HOST "CPU FFT support" ON)
set(LOCAL_FFT_LIB LOCAL_LIB_BARE)
endif()
\ No newline at end of file
cmake_minimum_required(VERSION 3.8)
project (MomentInvariants)
# This lists file is ignored when built as part of VTK remote modules.
# Code can be added here to support standalone builds.
#
# find_package(VTK 8.9 REQUIRED)
#
# add_subdirectory(MomentInvariants)
# add_subdirectory(ParallelMomentInvariants)
set(MI_SOURCES
vtkComputeMoments.cxx
vtkMomentInvariants.cxx
vtkMomentsHelper.cxx
vtkReconstructFromMoments.cxx
vtkSimilarityBalls.cxx
)
set(MI_HEADERS
vtkComputeMoments.h
vtkMomentInvariants.h
vtkMomentsHelper.h
vtkReconstructFromMoments.h
vtkSimilarityBalls.h
)
vtk_module_add_module(VTK::MomentInvariants
SOURCES ${MI_SOURCES}
HEADERS ${MI_HEADERS})
set(DATA_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../Testing/Data/Input")
vtk_module_test_data("DATA{${DATA_PATH}/,RECURSE:,REGEX:.*}")
add_subdirectory(Python)
vtk_add_test_python(
NO_VALID
patternDetectionTestSimple,patternDetectionTestSimple.py)
vtk_add_test_python(
NO_VALID
patternDetectionFFTTestSimple,patternDetectionTestSimple.py
"fft")
vtk_add_test_python(
NO_VALID
serialCheckComputeShort2D,TestConvFFTComputeShort.py
"DATA{${DATA_PATH}/2DScalar.vti}"
"DATA{${DATA_PATH}/2DScalar.vtm}")
vtk_add_test_python(
NO_VALID
serialCheckComputeShort3D,TestConvFFTComputeShort.py
"DATA{${DATA_PATH}/3DScalar.vti}"
"DATA{${DATA_PATH}/3DScalar.vtm}")
NAME
VTK::MomentInvariants
LIBRARY_NAME
MomentInvariants
GROUPS
StandAlone
DEPENDS
VTK::FiltersCore
VTK::ImagingCore
VTK::eigen
PRIVATE_DEPENDS
VTK::kissfft
TEST_DEPENDS
VTK::IOXML
......@@ -75,14 +75,14 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef vtkComputeMoments_h
#define vtkComputeMoments_h
#include "vtkFiltersMomentInvariantsModule.h" // For export macro
#include "MomentInvariantsModule.h" // For export macro
#include "vtkDataSetAlgorithm.h"
#include <string> // for std::string
#include <vector> // for std::vector
class VTKFILTERSMOMENTINVARIANTS_EXPORT vtkComputeMoments : public vtkDataSetAlgorithm
class MOMENTINVARIANTS_EXPORT vtkComputeMoments : public vtkDataSetAlgorithm
{
public:
static vtkComputeMoments* New();
......
......@@ -81,14 +81,14 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkDataSetAlgorithm.h"
#include "vtkDataSetAttributes.h" // needed for vtkDataSetAttributes::FieldList
#include "vtkFiltersMomentInvariantsModule.h" // For export macro
#include "MomentInvariantsModule.h" // For export macro
#include "vtkTuple.h" // For internal API
#include <vector> // For internal API
class vtkImageData;
class vtkMomentsTensor;
class VTKFILTERSMOMENTINVARIANTS_EXPORT vtkMomentInvariants : public vtkDataSetAlgorithm
class MOMENTINVARIANTS_EXPORT vtkMomentInvariants : public vtkDataSetAlgorithm
{
public:
static vtkMomentInvariants* New();
......@@ -281,7 +281,7 @@ protected:
~vtkMomentInvariants() override;
int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
/**
......@@ -335,7 +335,7 @@ private:
* Flag for using the original resolution of the input dataset
*/
bool UseOriginalResolution;
/**
* If the pattern has multiple fields in its point data, you can choose the one that the moments
* shall be calculated of
......
......@@ -72,7 +72,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define vtkMomentsHelper_h
#ifndef __VTK_WRAP__
#include "vtkFiltersMomentInvariantsModule.h" // For export macro
#include "MomentInvariantsModule.h" // For export macro
#include "vtkSmartPointer.h" // for vtkSmartPointer.
#include "vtkType.h" // for vtkIdType
......@@ -84,7 +84,7 @@ class vtkDataSet;
class vtkImageData;
class vtkMomentsTensor;
struct VTKFILTERSMOMENTINVARIANTS_EXPORT vtkMomentsHelper
struct MOMENTINVARIANTS_EXPORT vtkMomentsHelper
{
/**
* The monomial basis is not orthonormal. We need this function for the reconstruction of the
......
......@@ -81,13 +81,13 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define vtkReconstructFromMoments_h
#include "vtkDataSetAlgorithm.h"
#include "vtkFiltersMomentInvariantsModule.h" // For export macro
#include "MomentInvariantsModule.h" // For export macro
#include <vector> // For internal vector methods
class vtkImageData;
class VTKFILTERSMOMENTINVARIANTS_EXPORT vtkReconstructFromMoments : public vtkDataSetAlgorithm
class MOMENTINVARIANTS_EXPORT vtkReconstructFromMoments : public vtkDataSetAlgorithm
{
public:
static vtkReconstructFromMoments* New();
......
Supports Markdown
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