## Include some macros INCLUDE(${CMAKE_SOURCE_DIR}/IJMacros.txt) ## Declare the project name PROJECT(SegmentVentricle) ## The following lines enable testing and include Dart ENABLE_TESTING() INCLUDE(Dart) ## The only required package is ITK SET(Required_Packages ITK) #this foreach loads all of the packages that you specified as required. #It shouldn't need to be modified. FOREACH(Package ${Required_Packages}) LOADPACKAGE(${Package}) ENDFOREACH(Package) ## This project will link with ITKCommon and ITKIO libraries SET(Libraries ITKCommon ITKIO) ## Build the SegmentVentricle executable SET(CurrentExe "SegmentVentricle") ADD_EXECUTABLE(${CurrentExe} SegmentVentricle.cxx) TARGET_LINK_LIBRARIES(${CurrentExe} ${Libraries}) ## Build the ImageCompare executable SET(CurrentExe "ImageCompare") ADD_EXECUTABLE(${CurrentExe} ImageCompare.cxx) TARGET_LINK_LIBRARIES(${CurrentExe} ${Libraries}) ## The filename of the data set used SET(DataFileName "Normal012-T2.mha") OPTION(SegmentVentricle_Test "Would you like to run the Segment Ventricle test?" 0) IF(SegmentVentricle_Test) ## Add the ventricle segmentation test ## This test can only run if you have downloaded a dataset from MIDAS. ## It is up to you to download the data. ADD_TEST(VentricleSegment SegmentVentricle ${CMAKE_SOURCE_DIR}/${DataFileName} ${CMAKE_SOURCE_DIR}/Segmented_${DataFileName} 86.5 136.5 71 1200 2100) ENDIF(SegmentVentricle_Test) ## Add the image compare test ADD_TEST(CompareImage ImageCompare ${CMAKE_SOURCE_DIR}/baseline.png ${CMAKE_SOURCE_DIR}/Segmented_${DataFileName}.png)