Skip to content

Commit 01f8a30

Browse files
committed
REVERT_TO_MITKv18
1 parent 7a0240c commit 01f8a30

95 files changed

Lines changed: 12084 additions & 316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ jobs:
6060

6161

6262
Build-Linux:
63-
runs-on: ubuntu-20.04
63+
runs-on: ubuntu-18.04
6464
needs: [Variables]
6565
steps:
6666
- name: Download precompiled Build folder
6767
run: |
68-
wget -q -O Build.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/ETN8L5OcVupGiMInP8o9MtUBNflJb57nK1Dg-jnikW0iwg?download=1
68+
wget -q -O Build.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/EU8n4C0PlPxDgLk6PFrprY8B4KwiDaYotmur5m0q3px81w?download=1
6969
7z x Build.zip
7070
rm Build.zip
7171
sudo mv Build /
@@ -80,7 +80,7 @@ jobs:
8080
- name: Install missing packages
8181
run: |
8282
sudo apt update
83-
sudo DEBIAN_FRONTEND=noninteractive apt install doxygen graphviz libfreetype6-dev libglu1-mesa-dev libssl-dev libtiff5-dev libwrap0-dev libxcomposite1 libxcursor1 libxi-dev libxkbcommon-x11-0 libxt-dev mesa-common-dev -y
83+
sudo DEBIAN_FRONTEND=noninteractive apt install libxt-dev libtiff5-dev libfontconfig1 mesa-common-dev libglu1-mesa-dev libxcomposite1 libxcursor1 libxrender1 libxi6 libxtst6 libasound2 libnspr4 libnss3 libxkbcommon-dev libxkbcommon-x11-dev doxygen git cmake python3-pip gcc-6 g++-6 -y
8484
sudo apt remove --auto-remove icu-devtools libicu-dev -y
8585
8686
- name: Install Qt
@@ -90,9 +90,9 @@ jobs:
9090
sudo aqt install --outputdir /Qt 5.12.10 linux desktop -m qtcharts qtnetworkauth qtpurchasing qtdatavis3d qtscript qtvirtualkeyboard qtwebengine qtwebglplugin
9191
9292
- name: Clone MITK
93-
run: sudo git clone --branch v2021.02 https://phabricator.mitk.org/source/mitk.git /MITK
93+
run: sudo git clone --branch v2018.04.2 https://phabricator.mitk.org/source/mitk.git /MITK
9494

95-
- name: Change timestamps of the MITK directory
95+
- name: Change timestamps of MITK directory
9696
run: sudo find /MITK/ -exec touch -a -m -d 20210401 {} \;
9797

9898
- name: Clone CemrgApp
@@ -119,7 +119,7 @@ jobs:
119119
run: |
120120
make package -j4
121121
cd _CPack_Packages/Linux/TGZ
122-
mv MITK-v2021.02-linux-x86_64 CemrgApp-Linux
122+
mv MITK-v2018.04.2-linux-x86_64 CemrgApp-Linux
123123
rm CemrgApp-Linux/Mitk*
124124
rm CemrgApp-Linux/bin/MitkWorkbench*
125125
mv /Externals/* CemrgApp-Linux/bin/
@@ -222,7 +222,7 @@ jobs:
222222
- name: Download precompiled Build folder
223223
working-directory: /Users/Shared
224224
run: |
225-
wget -q -O Build.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/EX4dERE2ilFNmuv2Od0GaOoBuUSgzBS_TzwEqf9KVtmsXQ?download=1
225+
wget -q -O Build.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/EVzkObB3qiZLpEQsCLB3pdcBjaGDuzLapXFvujnDP_xr1A?download=1
226226
7z x Build.zip
227227
rm Build.zip
228228
@@ -233,8 +233,15 @@ jobs:
233233
7z x Externals.zip
234234
rm Externals.zip
235235
236+
- name: Download patch for MITK
237+
working-directory: /Users/Shared
238+
run: |
239+
wget -q -O Patch.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/EQ5LKrqH_fZNt9eGA7RBcC4B9YyyF0SwFeo9hIm9zkqLTQ?download=1
240+
7z x Patch.zip
241+
rm Patch.zip
242+
236243
- name: Install missing packages
237-
run: brew install doxygen libomp
244+
run: brew install gmp doxygen llvm@9
238245

239246
- name: Install Qt
240247
working-directory: /Users/Shared
@@ -244,9 +251,15 @@ jobs:
244251
python3 -m aqt install --outputdir Qt 5.12.10 mac desktop -m qtcharts qtnetworkauth qtpurchasing qtdatavis3d qtscript qtvirtualkeyboard qtwebengine qtwebglplugin
245252
246253
- name: Clone MITK
247-
run: git clone --branch v2021.02 https://phabricator.mitk.org/source/mitk.git /Users/Shared/MITK
254+
run: git clone --branch v2018.04.2 https://phabricator.mitk.org/source/mitk.git /Users/Shared/MITK
255+
256+
- name: Patch MITK
257+
working-directory: /Users/Shared
258+
run: |
259+
cp Patch/usServiceListeners.cpp MITK/Modules/CppMicroServices/core/src/service/usServiceListeners.cpp
260+
cp Patch/usListenerFunctors_p.h MITK/Modules/CppMicroServices/core/src/util/usListenerFunctors_p.h
248261
249-
- name: Change timestamps of the MITK directory
262+
- name: Change timestamps of MITK directory
250263
run: find /Users/Shared/MITK/ -exec touch -a -m -t 202104010000 {} \;
251264

252265
- name: Clone CemrgApp
@@ -264,6 +277,17 @@ jobs:
264277
sudo echo ${{ needs.Variables.outputs.tag }} >> CemrgApp/Applications/MainApp/version.txt
265278
sudo echo ${{ needs.Variables.outputs.sha }} >> CemrgApp/Applications/MainApp/version.txt
266279
280+
- name: Set environment variables
281+
run: |
282+
echo "/usr/local/opt/llvm@9/bin:$PATH" >> $GITHUB_PATH
283+
echo "LDFLAGS=-L/usr/local/opt/llvm@9/lib" >> $GITHUB_ENV
284+
echo "CPPFLAGS=-I/usr/local/opt/llvm@9/include" >> $GITHUB_ENV
285+
echo "LLVM_VERSION=9.0" >> $GITHUB_ENV
286+
echo "LLVM_DIRECTORY=/usr/local/opt/llvm@9" >> $GITHUB_ENV
287+
echo "CC=/usr/local/opt/llvm@9/bin/clang" >> $GITHUB_ENV
288+
echo "CXX=/usr/local/opt/llvm@9/bin/clang++" >> $GITHUB_ENV
289+
echo "CPLUS_INCLUDE_PATH=/usr/local/opt/llvm@9/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include" >> $GITHUB_ENV
290+
267291
- name: Build
268292
working-directory: /Users/Shared/Build
269293
run: |
@@ -276,7 +300,7 @@ jobs:
276300
run: make package -j6
277301

278302
- name: Create DMG
279-
working-directory: /Users/Shared/Build/MITK-build/_CPack_Packages/Darwin/DragNDrop/MITK-v2021.02-macos-x86_64
303+
working-directory: /Users/Shared/Build/MITK-build/_CPack_Packages/Darwin/DragNDrop/MITK-v2018.04.2-local_changes-macos-x86_64
280304
run: |
281305
rsync -au MitkWorkbench.app/Contents/Frameworks/ CemrgApp.app/Contents/Frameworks
282306
rsync -au MitkWorkbench.app/Contents/MacOS/ CemrgApp.app/Contents/MacOS

.github/workflows/test.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on: [push, pull_request]
44

55
jobs:
66
Test-n-Coverage:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-18.04
88
steps:
99
- name: Download precompiled Build folder
1010
run: |
11-
wget -q -O Build.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/ES5xxspvCyRGoHISDFTLifkBrcTmxNWCX4bzyUT_AkEnAg?download=1
11+
wget -q -O Build.zip https://emckclac-my.sharepoint.com/:u:/g/personal/k2143219_kcl_ac_uk/Ef5Vu6za325GoIIStbIcmg4BgWlVBGtUx6jp1GrxNLYrFw?download=1
1212
7z x Build.zip
1313
rm Build.zip
1414
sudo mv Build /
@@ -19,27 +19,21 @@ jobs:
1919
7z x Externals.zip
2020
rm Externals.zip
2121
sudo mv Externals /
22-
22+
2323
- name: Install missing packages
2424
run: |
2525
sudo apt update
26-
sudo DEBIAN_FRONTEND=noninteractive apt install doxygen graphviz libfreetype6-dev libglu1-mesa-dev libssl-dev libtiff5-dev libwrap0-dev libxcomposite1 libxcursor1 libxi-dev libxkbcommon-x11-0 libxt-dev mesa-common-dev libtbb2 -y
26+
sudo DEBIAN_FRONTEND=noninteractive apt install libxt-dev libtiff5-dev libfontconfig1 mesa-common-dev libglu1-mesa-dev libxcomposite1 libxcursor1 libxrender1 libxi6 libxtst6 libasound2 libnspr4 libnss3 libxkbcommon-dev libxkbcommon-x11-dev libtbb2 doxygen git cmake python3-pip gcc-6 g++-6 -y
2727
sudo apt remove --auto-remove icu-devtools libicu-dev -y
28-
28+
2929
- name: Install Qt
3030
run: |
3131
sudo pip3 install --upgrade setuptools
3232
sudo pip3 install aqtinstall
3333
sudo aqt install --outputdir /Qt 5.12.10 linux desktop -m qtcharts qtnetworkauth qtpurchasing qtdatavis3d qtscript qtvirtualkeyboard qtwebengine qtwebglplugin
34-
34+
3535
- name: Clone MITK
36-
run: sudo git clone --branch v2021.02 https://phabricator.mitk.org/source/mitk.git /MITK
37-
38-
- name: Disable tests for CppMicroServices
39-
run: sudo sed -i 's/set(US_BUILD_TESTING ON)/set(US_BUILD_TESTING OFF)/' /MITK/Modules/CMakeLists.txt
40-
41-
- name: Change timestamps of the MITK directory
42-
run: sudo find /MITK/ -exec touch -a -m -d 20210401 {} \;
36+
run: sudo git clone --branch v2018.04.2 https://phabricator.mitk.org/source/mitk.git /MITK
4337

4438
- name: Disable tests for CppMicroServices
4539
run: sudo sed -i 's/set(US_BUILD_TESTING ON)/set(US_BUILD_TESTING OFF)/' /MITK/Modules/CMakeLists.txt
@@ -54,7 +48,7 @@ jobs:
5448

5549
- name: Move CemrgApp to root
5650
run: sudo mv CemrgApp /
57-
51+
5852
- name: Build
5953
working-directory: /Build
6054
env:
@@ -67,7 +61,7 @@ jobs:
6761
env:
6862
QT_PLUGIN_PATH: /Qt/5.12.10/gcc_64/plugins
6963
QT_QPA_PLATFORM: minimal
70-
run: ctest -R Cemrg -C Debug -V
64+
run: ctest -R Cemrg -V
7165

7266
- name: Code Coverage
7367
uses: codecov/codecov-action@v1

CemrgApp/Applications/MainApp/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ if(MITK_BUILD_APP_CemrgApp)
33
project(MainApp)
44

55
set(MY_APP_NAME CemrgApp)
6+
set(_app_options)
7+
8+
if(MITK_SHOW_CONSOLE_WINDOW)
9+
list(APPEND _app_options SHOW_CONSOLE)
10+
endif()
611

712
# Create a cache entry for the provisioning file which is used to export
813
# the file name in the MITKConfig.cmake file. This will keep external projects
@@ -20,7 +25,7 @@ if(MITK_BUILD_APP_CemrgApp)
2025

2126
org.mitk.gui.qt.datamanager
2227
org.mitk.gui.qt.basicimageprocessing
23-
org.mitk.gui.qt.dicombrowser
28+
org.mitk.gui.qt.dicom
2429
#org.mitk.gui.qt.diffusionimaging
2530
#org.mitk.gui.qt.diffusionimaging.registration
2631
org.mitk.gui.qt.pointsetinteraction
@@ -31,6 +36,7 @@ if(MITK_BUILD_APP_CemrgApp)
3136
kcl.cemrgapp.mainapp
3237
kcl.cemrgapp.easi
3338
kcl.cemrgapp.powertrans
39+
kcl.cemrgapp.atrialfibres
3440
kcl.cemrgapp.mmcwplugin
3541
kcl.cemrgapp.mmeasurement
3642
kcl.cemrgapp.scar
@@ -69,6 +75,7 @@ if(MITK_BUILD_APP_CemrgApp)
6975
#PLUGINS ${_plugins}
7076
EXCLUDE_PLUGINS ${_exclude_plugins}
7177
SOURCES ${_src_files}
78+
${_app_options}
7279
)
7380

7481
mitk_use_modules(TARGET ${MY_APP_NAME}
@@ -94,4 +101,5 @@ if(MITK_BUILD_APP_CemrgApp)
94101
add_dependencies(${MY_APP_NAME} ${MITK_MODULES_ENABLED_PLUGINS})
95102
endif()
96103

104+
97105
endif()

CemrgApp/Applications/MainApp/CemrgApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int main(int argc, char** argv) {
4848
splash.setWindowFlags(Qt::SplashScreen | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
4949
splash.show();
5050
if (!version.isEmpty())
51-
splash.showMessage("CemrgApp " + version + " (" + sha + ")\nPowered by: MITK v2021.10", Qt::AlignLeft, Qt::white);
51+
splash.showMessage("CemrgApp " + version + " (" + sha + ")\nPowered by: MITK v2018.04.2", Qt::AlignLeft, Qt::white);
5252
QTimer::singleShot(4000, &splash, SLOT(close()));
5353

5454
// -------------------------------------------------------------------
@@ -61,4 +61,4 @@ int main(int argc, char** argv) {
6161
//myApp.setProperty(mitk::BaseApplication::PROP_APPLICATION, "org.mitk.qt.extapplication");
6262
myApp.setProperty(mitk::BaseApplication::PROP_APPLICATION, "kcl.cemrgapp.mainapp");
6363
return myApp.run();
64-
}
64+
}

CemrgApp/Applications/MainApp/target_libraries.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(target_libraries
77

88
org_mitk_gui_qt_datamanager
99
org_mitk_gui_qt_basicimageprocessing
10-
org_mitk_gui_qt_dicombrowser
10+
org_mitk_gui_qt_dicom
1111
#org_mitk_gui_qt_diffusionimaging
1212
#org_mitk_gui_qt_diffusionimaging_registration
1313
org_mitk_gui_qt_pointsetinteraction
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
3.0-alpha
2-
d9581d2
1+
2.2
2+
69e5e1e

CemrgApp/CMakeExternals/VMTK.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ if(MITK_USE_VMTK)
3434
)
3535
endif()
3636

37-
set(VMTK_GIT_REPOSITORY "https://github.com/CemrgDevelopers/vmtk.git" CACHE STRING "The git repository for cloning VMTK")
38-
set(VMTK_GIT_TAG "f9ed6280b40fbfabd11f2b54c4a432a0a9b382f9" CACHE STRING "The git tag/hash to be used when cloning from VMTK_GIT_REPOSITORY")
37+
set(VMTK_GIT_REPOSITORY "https://github.com/vmtk/vmtk.git" CACHE STRING "The git repository for cloning VMTK")
38+
set(VMTK_GIT_TAG "v1.4.0" CACHE STRING "The git tag/hash to be used when cloning from VMTK_GIT_REPOSITORY")
3939
mark_as_advanced(VMTK_GIT_REPOSITORY VMTK_GIT_TAG)
4040

4141
if (UNIX)

CemrgApp/Modules/CemrgAppModule/cmdapps/CMakeLists.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ option(BUILD_CEMRG_PROJECTION_OPTS "Build Scar Map Projection Options command li
44
option(BUILD_CEMRG_CLIPPINGTOOL "Build clipping valve command line app. " ON)
55
option(BUILD_CEMRG_PROJECTLGE "Build lge projection command line app. " ON)
66
option(BUILD_CEMRG_IM2INR "Build image to inr command line app. " ON)
7+
option(BUILD_CEMRG_COLOURSURF "Build colour surface command line app. " ON)
78
option(BUILD_CEMRG_VENTRICLE_SEGMENTATION_RELABEL "Build ventricle segmentation relabelling command line app" ON)
89
option(BUILD_CEMRG_MORPH_ANALYSIS "Build atrial morph analysis" ON)
10+
option(BUILD_CEMRG_IMAGE_CONVERT "Build image convert format" ON)
11+
option(BUILD_CEMRG_SURFACE_AREA "Build surface area calculator" ON)
912

1013
if(BUILD_CemrgCMDApps)
1114
mitkFunctionCreateCommandLineApp(
@@ -55,6 +58,14 @@ if(BUILD_CEMRG_IM2INR)
5558
)
5659
endif()
5760

61+
if(BUILD_CEMRG_COLOURSURF)
62+
mitkFunctionCreateCommandLineApp(
63+
NAME CemrgColourSurface
64+
DEPENDS MitkCemrgAppModule
65+
CPP_FILES CemrgColourSurface.cpp
66+
)
67+
endif()
68+
5869
if(BUILD_CEMRG_VENTRICLE_SEGMENTATION_RELABEL)
5970
mitkFunctionCreateCommandLineApp(
6071
NAME CemrgVentricleSegmRelabel
@@ -70,3 +81,19 @@ if(BUILD_CEMRG_MORPH_ANALYSIS)
7081
CPP_FILES CemrgMorphAnalysis.cpp
7182
)
7283
endif()
84+
85+
if(BUILD_CEMRG_IMAGE_CONVERT)
86+
mitkFunctionCreateCommandLineApp(
87+
NAME CemrgImageConvertFormat
88+
DEPENDS MitkSegmentation MitkCemrgAppModule
89+
CPP_FILES CemrgImageConvertFormat.cpp
90+
)
91+
endif()
92+
93+
IF(BUILD_CEMRG_SURFACE_AREA)
94+
mitkFunctionCreateCommandLineApp(
95+
NAME CemrgAreaFromThreshold
96+
DEPENDS MitkSegmentation MitkCemrgAppModule
97+
CPP_FILES CemrgAreaFromThreshold.cpp
98+
)
99+
ENDIF()

CemrgApp/Modules/CemrgAppModule/cmdapps/CemrgAppCmdTemplate.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ int main(int argc, char* argv[]) {
4949
// How should arguments be prefixed
5050
parser.setArgumentPrefix("--", "-");
5151

52-
// Add arguments. Unless specified otherwise, each argument is optional.
53-
// See mitkCommandLineParser::addArgument() for more information.
54-
parser.addArgument(
55-
"input", "i", mitkCommandLineParser::File,
56-
"Input Image", "Any image format known to MITK.",
57-
us::Any(), false);
58-
parser.addArgument(
59-
"output", "o", mitkCommandLineParser::File,
60-
"Output file", "Where to save the output.",
61-
us::Any(), false);
62-
parser.addArgument(
63-
"offset", "f", mitkCommandLineParser::Int,
64-
"Offset", "the offset integer to add to each voxel.",
65-
us::Any(), false);
66-
parser.addArgument( // optional
67-
"verbose", "v", mitkCommandLineParser::Bool,
68-
"Verbose Output", "Whether to produce verbose output");
52+
// Add arguments. Unless specified otherwise, each argument is optional.
53+
// See mitkCommandLineParser::addArgument() for more information.
54+
parser.addArgument(
55+
"input", "i", mitkCommandLineParser::InputFile,
56+
"Input Image", "Any image format known to MITK.",
57+
us::Any(), false);
58+
parser.addArgument(
59+
"output", "o", mitkCommandLineParser::OutputFile,
60+
"Output file", "Where to save the output.",
61+
us::Any(), false);
62+
parser.addArgument(
63+
"offset", "f", mitkCommandLineParser::Int,
64+
"Offset", "the offset integer to add to each voxel.",
65+
us::Any(), false);
66+
parser.addArgument( // optional
67+
"verbose", "v", mitkCommandLineParser::Bool,
68+
"Verbose Output", "Whether to produce verbose output");
6969

7070
// Parse arguments.
7171
// This method returns a mapping of long argument names to their values.

0 commit comments

Comments
 (0)