Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problems #2

Open
dagonzalezfo opened this issue Mar 16, 2021 · 2 comments
Open

Installation problems #2

dagonzalezfo opened this issue Mar 16, 2021 · 2 comments

Comments

@dagonzalezfo
Copy link

Hi @etasnadi,

I am trying to compile your release 0.2-alpha on a CentOS 7 machine but I am having some problems.

For instance, to compile SelectiveSegmentation gives:

3DCellAnnotator-0.2-alpha/SelectiveSegmentation/src/imagetools.cu(152): error: identifier "CV_LOAD_IMAGE_ANYDEPTH" is undefined. Some post suggests that this error is related to the absence of TIFF support. However, our version has it.

Therefore, I want to know if it is possible to get a list of build required dependencies and their respective versions.

Best,

Danilo

@etasnadi
Copy link
Owner

etasnadi commented Mar 16, 2021

Hi,

Thanks for your feedback.

OpenCV 4.2.0 and Boost 1.71.0 should be compatible with the SelectiveSegmentation project.

However, a slight modification is needed to be able to compile with recent versions of opencv: the CV_LOAD_IMAGE_ANYDEPTH constant in the mentioned line should be replaced to cv::IMREAD_ANYDEPTH. I could built the project from scratch, but not tested if it surely works at runtime. I will update the source later.

etasnadi pushed a commit that referenced this issue Mar 23, 2021
@etasnadi
Copy link
Owner

etasnadi commented Mar 23, 2021

Hi,

I rebuilt the project from scratch on Ubuntu 20.04 with the fix above and the software seems to work properly, now you can build directly from the master branch. See commit.

I recorded every step.

  1. Install 3D Cell Annotator dependencies
  • OpenCV: sudo apt install libopencv-dev (I have 4.2.0)
  • Boost: sudo apt install libboost-all-dev (I have 1.71.0)
  1. Install the MITK depdendencies:
  1. Build 3D Cel Annotator:
  • Build the SelectiveSegmentation subproject using cmake.
  • The next step is to build the MITK. Checkout the version ac93ed9baf (2018.04 version) from the official github repo: https://github.com/MITK/MITK , create the superbuild folder and make sure it builds successfully:
    • Use GCC 7: set the environment variables CC=gcc-7 and CXX=g++-7 (gcc/g++ version: 7.5.0 worked for me, see)
    • Set cmake -D CMAKE_CXX_FLAGS="-Wno-error=deprecated-declarations" to suppress build errors caused by using deprecated functionality in the MITK source (or set the variable using cmake-gui).
    • Set CMAKE_BUILD_TYPE to Release to build a release version of MITK (more compact, does not contain debug info).
    • Go to the MITK-build directory under the superbuild and enable the following plugins (essential for the 3DCellAnnotator):
      • MITK_BUILD_org.mitk.gui.qt.multilabelsegmentation
      • MITK_BUILD_org.mitk.gui.qt.segmentation
    • Now you can execute the build
  • Build and execute the MITKIntegration subproject.
    • First set the variables:
      • The MITK_PATH should point to the MITK source directory
      • The PATCH_DIR should point to the mitk-patch subdirectory of the MITKIntegration source directory.
    • Then, build the project using make
    • Go to the build folder and then execute python3 patch.py apply (This will patch the MITK source with the integration code).
  • Go to the MITK-build directory under the superbuild again, run cmake and set the Selective_DIR in cmake to point to the previously built SelectiveSegmentation project.
  • Then, build MITK again with make. You will see the built app in the bin folder. To build the final version, run make install.
    Copy the settings_3DCA.conf configuration file into the bin directory from the SelectiveSegmentation project

Result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants