SBU-BMI / SlicerPathology

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

Avoid duplication of code in ShortCutCoreSegmenter and QuickTCGASegmenter #6

Open jcfr opened 8 years ago

jcfr commented 8 years ago

Code in both implementation is roughly the same. It seems ShortCutCoreSegmenter is a little cleaner.

I the suggest to:

To go further:

naucoin commented 8 years ago

Loading the extension I get these warnings on Mac:

objc[73173]: Class CVWindow is implemented in both /Users/nicole/Slicer4-svn/Slicer-build-release/Slicer-build/bin/Slicer.app/Contents/Extensions-24954/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerQuickTCGAModuleLogic.dylib and /Users/nicole/Slicer4-svn/Slicer-build-release/Slicer-build/bin/Slicer.app/Contents/Extensions-24954/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerShortCutCoreModuleLogic.dylib. One of the two will be used. Which one is undefined.
objc[73173]: Class CVView is implemented in both /Users/nicole/Slicer4-svn/Slicer-build-release/Slicer-build/bin/Slicer.app/Contents/Extensions-24954/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerQuickTCGAModuleLogic.dylib and /Users/nicole/Slicer4-svn/Slicer-build-release/Slicer-build/bin/Slicer.app/Contents/Extensions-24954/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerShortCutCoreModuleLogic.dylib. One of the two will be used. Which one is undefined.
objc[73173]: Class CVSlider is implemented in both /Users/nicole/Slicer4-svn/Slicer-build-release/Slicer-build/bin/Slicer.app/Contents/Extensions-24954/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerQuickTCGAModuleLogic.dylib and /Users/nicole/Slicer4-svn/Slicer-build-release/Slicer-build/bin/Slicer.app/Contents/Extensions-24954/SlicerPathology/lib/Slicer-4.5/qt-loadable-modules/libvtkSlicerShortCutCoreModuleLogic.dylib. One of the two will be used. Which one is undefined.
ebremer commented 8 years ago

Shortcut was created initially as a copy of QuickTCGA since they were two effect wrapped into one. It made more sense to me to split them. Not all of the code is pertinent to both modules and only exists due to my method of splitting the one effects module. I will spend some time and just delete the duplicate code. My thought behind this was to become more familiar with the code since I inherited it from someone else.