Commit 0317066f authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Ben Boeckel
Browse files

vtkDomainsMicroscopy: update to the new module system

parent 32c8ad41
......@@ -26,7 +26,7 @@ mark_as_advanced( OPENSLIDE_LIBRARY )
# the listed variables are TRUE.
find_package( PackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( OPENSLIDE DEFAULT_MSG OPENSLIDE_LIBRARY OPENSLIDE_INCLUDE_DIR )
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSlide DEFAULT_MSG OPENSLIDE_LIBRARY OPENSLIDE_INCLUDE_DIR )
if( OPENSLIDE_FOUND )
set( OPENSLIDE_LIBRARIES ${OPENSLIDE_LIBRARY} )
......
# OpenSlide required
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
find_package(OpenSlide REQUIRED)
set(classes
vtkOpenSlideReader)
mark_as_advanced(OPENSLIDE_INCLUDE_DIR OPENSLIDE_LIBRARY)
vtk_module_add_module(VTK::DomainsMicroscopy
CLASSES ${classes})
set(OPENSLIDE_SRCS vtkOpenSlideReader.cxx)
include_directories(${OPENSLIDE_INCLUDE_DIRS})
set(${vtk-module}_SYSTEM_INCLUDE_DIRS
${OPENSLIDE_INCLUDE_DIRS})
vtk_module_library(vtkDomainsMicroscopy ${OPENSLIDE_SRCS})
vtk_module_link_libraries(vtkDomainsMicroscopy LINK_PRIVATE ${OPENSLIDE_LIBRARY})
vtk_module_find_package(PACKAGE OpenSlide)
vtk_module_link(VTK::DomainsMicroscopy
PUBLIC
OpenSlide::OpenSlide)
vtk_module_test_data(
Data/2LYZ.pdb
Data/Microscopy/small2.ndpi)
add_subdirectory(Cxx)
if (VTK_WRAP_PYTHON)
vtk_module_test_data(
Data/RectGrid2.vtk)
add_subdirectory(Python)
endif ()
......@@ -3,12 +3,12 @@
vtk_add_test_cxx(vtkDomainsMicroscopyCxxTests tests
TestOpenSlideReader.cxx
"DATA{${VTK_TEST_INPUT_DIR}/Microscopy/small2.ndpi}"
"DATA{${_vtk_build_TEST_INPUT_DATA_DIRECTORY}/Data/Microscopy/small2.ndpi}"
)
vtk_add_test_cxx(vtkDomainsMicroscopyCxxTests tests
TestOpenSlideReaderPartialTIF,TestOpenSlideReaderPartial.cxx
"DATA{${VTK_TEST_INPUT_DIR}/Microscopy/pathology.tif}"
"DATA{${_vtk_build_TEST_INPUT_DATA_DIRECTORY}/Data/Microscopy/pathology.tif}"
)
vtk_test_cxx_executable(vtkDomainsMicroscopyCxxTests tests RENDERING_FACTORY)
#!/usr/bin/env python
import vtk
import vtk.test.Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
import sys
class TestOpenSlideReader(Testing.vtkTest):
class TestOpenSlideReader(vtk.test.Testing.vtkTest):
def testCanReadFile(self):
reader = vtk.vtkOpenSlideReader()
......@@ -15,4 +16,4 @@ class TestOpenSlideReader(Testing.vtkTest):
self.assertEqual(reader.CanReadFile(VTK_DATA_ROOT + "/Data/Microscopy/small2.ndpi"), 2)
if __name__ == "__main__":
Testing.main([(TestOpenSlideReader, 'test')])
vtk.test.Testing.main([(TestOpenSlideReader, 'test')])
vtk_module(vtkDomainsMicroscopy
DESCRIPTION "Readers and writers supporting whole slide images for microscopy domain"
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
vtkInteractionImage
vtkRenderingContextOpenGL2
EXCLUDE_FROM_ALL
DEPENDS
vtkIOImage
PRIVATE_DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
)
NAME
VTK::DomainsMicroscopy
LIBRARY_NAME
vtkDomainsMicroscopy
DESCRIPTION
File readers for microscopy file formats
DEPENDS
VTK::IOImage
PRIVATE_DEPENDS
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonExecutionModel
TEST_DEPENDS
VTK::InteractionImage
VTK::RenderingContextOpenGL2
VTK::TestingCore
VTK::TestingRendering
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