SBU-BMI / SlicerPathology

3D Slicer extension for Pathology segmentation tools
http://bmi.stonybrookmedicine.edu
Other
5 stars 8 forks source link

Idea for clean organization of SegmentNucleus #9

Closed jcfr closed 7 years ago

jcfr commented 8 years ago

The following could be done:

In <extensionroot>/SegmentNucleus, have a CMakeLists.txt like this ...

set(SegmentNucleusUtils_SRCS
  private/BinaryMaskAnalysisFilter.cxx
  private/BinaryMaskAnalysisFilter.h
  private/itkTypedefs.h
  private/MeanshiftClusteringFilter.cpp
  private/MeanshiftClusteringFilter.h
  private/Normalization.cpp
  private/Normalization.h
  private/PixelOperations.cpp
  private/PixelOperations.h
  private/SFLSLocalChanVeseSegmentor2D.h
  private/SFLSLocalChanVeseSegmentor2D.hxx
  private/SFLSSegmentor2D.h
  private/SFLSSegmentor2D.hxx
  private/TypeUtils.h
  ProcessTileUtils.cxx
  ProcessTileUtils.h
  )
add_library(SegmentNucleusUtils STATIC ${SegmentNucleusUtils_SRCS})
target_link_libraries(SegmentNucleusUtils ${OpenCV_LIBS})
target_include_directories(SegmentNucleusUtils
  PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
  PRIVATE  ${CMAKE_CURRENT_SOURCE_DIR}/private
  )

[...]

set(MODULE_NAME SegmentNucleus)

set(MODULE_TARGET_LIBRARIES
  SegmentNucleusUtils
  )

SEMMacroBuildCLI(
  NAME ${MODULE_NAME}
  TARGET_LIBRARIES ${MODULE_TARGET_LIBRARIES}
  )

[...]

I also suggest to remove these files:

SFLS.h
mainSegmentSmallImage.cxx
fedorov commented 8 years ago

@ebremer what do you think about JC's suggestion?

ebremer commented 8 years ago

Looks good.

tdiprima commented 7 years ago

Superseded by #93