SBU-BMI / SlicerPathology

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

utilityTileAnalysis & itkOpenCVImageBridge #92

Closed tdiprima closed 7 years ago

tdiprima commented 7 years ago

Related: #91

We want to put all the cpp source in the header file, and delete the source file. Reason: have it be exactly like pathomics analysis.

Problem: The #include itkOpenCVImageBridge.h compiles as long as it's in the source file. If I put in in the header file, I get:

fatal error: itkOpenCVImageBridge.h: No such file or directory

It's a common error. I Googled it. But the advice is to set Module_ITKVideoBridgeOpenCV on when compiling ITK (which is already being pulled in by Slicer).

tdiprima commented 7 years ago

Well, that explains it...

@lassoan's answer:

Adding any OpenCV include files into a header file would make other modules directly depend on OpenCV, which would cause build failure. You did right at the beginning: have a clean public interface in the header file and have all private implementation details (with special dependencies) in the cxx file.