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

Update to work with the API of DCMTK 3.6.3 #333

Merged
merged 10 commits into from
Feb 19, 2018

Conversation

fedorov
Copy link
Member

@fedorov fedorov commented Feb 17, 2018

No description provided.

 - dcmseg/dcmpm import() replaced by dcmiod importHierarchy()
 - FGIdentityPixelValueTransformation replaced by FGPixelValueTransformation
 - TID1600_ImageLibrary now has convenient API to factor out all of the common entries
   to the group level, so no special work is needed to handle this manually
@fedorov
Copy link
Member Author

fedorov commented Feb 17, 2018

@che85 do you have any idea how to deal with the issue below? I don't know why it started just now, can't make sense of this error.

image
image
image

@jcfr
Copy link
Contributor

jcfr commented Feb 17, 2018

@fedorov Instead of using jsonlint, a simpler way to validate the json files could be this one:

python3.5 -c "import json; json.load(open('./doc/schemas/common-schema.json'))"

jsonlint stopped working on the CI platforms due to some issue related to the deprecation
of the nomnom package. As suggested by @jcfr, switch to the use of python json package for
testing validity of JSON files using python json.load().
@fedorov
Copy link
Member Author

fedorov commented Feb 19, 2018

@jcfr python in the dockross does not have json package. How should this be fixed?

image
image

@jcfr
Copy link
Contributor

jcfr commented Feb 19, 2018

How should this be fixed?

Update this line adding -DPYTHON_EXECUTABLE:FILEPATH=/opt/python/cp36-cp36m/bin/python

Since the manylinux image bundles multiple versions of python, one has to be explicitly selected.

@fedorov
Copy link
Member Author

fedorov commented Feb 19, 2018

Doesn't seem to work. Looks like cmake picks /usr/bin/python no matter what are the path variables.

Also note right now there is also a line adding /opt/python/cp27-cp27mu/bin/ to the path -
should it be removed?

$(TMP)/dockcross bash -c "export PATH=/work/build/node-v6.9.5-linux-x64/bin:/work/build/$(dicom3tools_version)/appsrc/dcfile:/opt/python/cp27-cp27mu/bin/:$$PATH && cd /work/build/dcmqi-build && ctest -j4 -D ExperimentalTest -VV --no-compress-output"
(the behavior does not change if I remove it from the path)

@jcfr
Copy link
Contributor

jcfr commented Feb 19, 2018

I see ... this was done to support running the script comparejson.py used in some test that can only run with python 2.7.

I suggested python 3.6 earlier without recalling that specific details.

Two things:

  • find_package(PythonInterp 2.7 REQUIRED) should probably be added, and test updated to consistently use ${PYTHON_EXECUTABLE}

  • Now looking into why the option is not propagated

- remove jsonlint install
- set PYTHON_EXECUTABLE to 2.7 (doesn't propagate at the moment to cmake)
@jcfr
Copy link
Contributor

jcfr commented Feb 19, 2018

  • Consider also updating the top-level CMakeLists.txt adding the following in the Dependencies section. See here

  • The "Testing" should also be moved up so that BUILD_TESTING var is defined.

#-----------------------------------------------------------------------------
# Testing
#
include(CTest)
mark_as_superbuild(BUILD_TESTING)

set(TEMP_DIR ${CMAKE_BINARY_DIR}/Testing/Temporary)
mark_as_superbuild(TEMP_DIR:PATH)

#-----------------------------------------------------------------------------
# Dependencies
#

# Slicer
if(DCMQI_BUILD_SLICER_EXTENSION)
  find_package(Slicer REQUIRED)
  include(${Slicer_USE_FILE})
  mark_as_superbuild(Slicer_DIR)
endif()

# JsonCpp
set(_msg "Checking if using built-in JsonCpp")
message(STATUS ${_msg})
if(EXISTS "${JsonCpp_LIBRARY}" AND EXISTS "${JsonCpp_INCLUDE_DIR}")
  set(DCMQI_BUILTIN_JSONCPP 0)
  message(STATUS "${_msg} - no")
else()
  set(DCMQI_BUILTIN_JSONCPP 1)
  message(STATUS "${_msg} - yes")
endif()
mark_as_superbuild(JsonCpp_INCLUDE_DIR:PATH)
mark_as_superbuild(JsonCpp_LIBRARY:FILEPATH)
mark_as_superbuild(DCMQI_BUILTIN_JSONCPP:BOOL)

# Python 2.7
if(BUILD_TESTING)
  find_package(PythonInterp 2.7 REQUIRED)
  mark_as_superbuild(PYTHON_EXECUTABLE)
endif()

 - add dependency to python 2.7
 - move Testing up in top-level CMakeLists.txt

As suggested by @jcfr, see discussion in

QIICR#333 (comment)
@fedorov
Copy link
Member Author

fedorov commented Feb 19, 2018

@jcfr CIs are green - thanks for all the help with PR! 👍

@fedorov fedorov merged commit 262045f into QIICR:master Feb 19, 2018
@jcfr
Copy link
Contributor

jcfr commented Feb 19, 2018

🎆

@fedorov
Copy link
Member Author

fedorov commented Feb 23, 2018

@jcfr I just discovered that when configuring against Slicer, I am getting this CMake error, which I think is related. Do you know what is going on?

image

@jcfr
Copy link
Contributor

jcfr commented Feb 23, 2018

Are you doing a clean build or setting Slicer_DIR on an existing build dir ?

This is a sanity check to warn developer early.

I didn't have a problem building the extension against Slicer. This PR makes it even easier to build dcmqi against a Slicer Qt5 build. See #336

@fedorov
Copy link
Member Author

fedorov commented Feb 24, 2018

No, I started from empty directory.

Interesting - if I run cmake with all variables from command line, configure works. If I run ccmake, and set variables one by one - I get the error above. See screen capture here: https://www.screencast.com/t/JvJRswmwpDAy.

@jcfr
Copy link
Contributor

jcfr commented Feb 24, 2018 via email

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

Successfully merging this pull request may close these issues.

2 participants