Giter Club home page Giter Club logo

slicercustomapptemplate's Introduction

SlicerCustomAppTemplate by Kitware

This project is a template to be used as a starting point for creating a custom 3D Slicer application.

3D Slicer is an open-source and extensible application for visualization and medical image analysis. 3D Slicer works with optical imaging, MRI, CT, and ultrasound data.

At Kitware, we help customers develop commercial products based on 3D Slicer and we have used the platform to rapidly prototype solutions in nearly every aspect of medical imaging.

Getting Started

The following will get a custom 3D Slicer application started in a new repository:

pip install cookiecutter jinja2-github
cookiecutter gh:KitwareMedical/SlicerCustomAppTemplate
# Fill in the information requested at the prompts

We suggest to use the following commit message for checking in the results of these commands:

ENH: Add <custom name> application sources

This commit adds source files generated using KitwareMedical/SlicerCustomAppTemplate@<SHA of main>
and referencing Slicer/Slicer@<SHA of main>.

Features and improvements specific to the custom application will be integrated
in follow-up commits.

This will mark the version of the template file used and the Slicer version in the git history

FAQ

Which version of Slicer do the generated application build against ?

Leveraging the jinja2-github plugin, the cookiecutter template generator will retrieve the latest commit associated with the Slicer repository default branch and it will set it as GIT_TAG value in the generated CMakeLists.txt.

License

This project template is distributed under the Apache 2.0 license. Please see the LICENSE file for details.

Authors

  • Julien Finet
  • Jean-Christophe Fillion-Robin
  • Dženan Zukić
  • Johan Andruejol
  • Alexis Girault
  • Cory Quammen
  • Jamie Snape

slicercustomapptemplate's People

Contributors

andinet avatar brandus1 avatar connor-bowley avatar cpinter avatar dzenanz avatar harrydc avatar jamesobutler avatar jcfr avatar lassoan avatar laurennlam avatar phcerdan avatar samuelgerber avatar sjh26 avatar vicory avatar vovythevov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slicercustomapptemplate's Issues

Slicer_VERSION versus APPLICATION_VERSION

set(APPLICATION_NAME "{{cookiecutter.project_name}}")
set(Slicer_VERSION_MAJOR "0")
set(Slicer_VERSION_MINOR "1")
set(Slicer_VERSION_PATCH "0")
project(${APPLICATION_NAME} VERSION "${Slicer_VERSION_MAJOR}.${Slicer_VERSION_MINOR}.${Slicer_VERSION_PATCH}")

Shouldn't that be?

set(APPLICATION_VERSION_MAJOR       "0") 
set(APPLICATION_VERSION_MINOR       "1") 
set(APPLICATION_VERSION_PATCH       "0") 
project(${APPLICATION_NAME} VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}") 

Thanks!

CMake Configure Fails with Git Security Warning

When running the first configure (and during the subsequent build) checkouts from git repositories fail with unsafe respository ( <repo name>) is owned by someone else

This did not occur on my first build (on the main HD) but happened when moving to a separate disk the remediation is to declare certain repositories as safe see https://stackoverflow.com/questions/71901632/fatal-error-unsafe-repository-home-repon-is-owned-by-someone-else

This might affect superbuilds in general as people upgrade git

Request access to the {{cookiecutter.github_organization}}/{{cookiecutter.github_project}} repository

How to get access to the {{cookiecutter.github_organization}}/{{cookiecutter.github_project}} repository in order to build the SlicerCustomApplication.

Tying the command

git clone https://github.com/{{cookiecutter.github_organization}}/{{cookiecutter.github_project}}.git {{cookiecutter.github_project}}

gives a

_fatal: unable to access 'https://github.com/{{cookiecutter.github_organization}}/{{cookiecutter.github_project}}.git/': The requested URL returned error: 400

Can't generate project whose project/app name starts with a lowercase letter

When trying to use a lower case starting letter, cookiecutter appears to store it internally as uppercase

$ cookiecutter gh:KitwareMedical/SlicerCustomAppTemplate
You've downloaded C:\Users\sam.horvath\.cookiecutters\SlicerCustomAppTemplate be                                                                                          fore. Is it okay to delete and re-download it? [yes]: yes
project_name [SlicerCustomAppTemplate]: aevaSlicer
github_organization [Kitware]:
github_project [AevaSlicer]: aevaSlicer
org_domain [kitware.com]:
org_name [Kitware, Inc.]:
app_name [AevaSlicer]: aevaSlicer
app_version_major [0]:
app_version_minor [1]:
app_version_patch [0]:
app_description_summary [Customized version of Slicer]:
Traceback (most recent call last):
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\runpy.py                                                                                          ", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\runpy.py                                                                                          ", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\sam.horvath\AppData\Local\Programs\Python\Python37\Scripts\cook                                                                                          iecutter.exe\__main__.py", line 9, in <module>
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\cookiecutter\cli.py", line 121, in main
    password=os.environ.get('COOKIECUTTER_REPO_PASSWORD')
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\cookiecutter\main.py", line 94, in cookiecutter
    output_dir=output_dir
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\cookiecutter\generate.py", line 364, in generate_files
    generate_file(project_dir, infile, context, env)
  File "c:\users\sam.horvath\appdata\local\programs\python\python37\lib\site-pac                                                                                          kages\cookiecutter\generate.py", line 176, in generate_file
    with io.open(outfile, 'w', encoding='utf-8') as fh:
OSError: [Errno 22] Invalid argument: 'D:\\Cookiecutter\\AevaSlicer\x1b[D\x1b[D\                                                                                          x1b[D\x1b[D\x1b[D\x1b[D\x1b[D\x1b[D\x1b[D\x1b[D\x1b[a\\CMakeLists.txt'

Note how the defaults for later prompts are uppercase

SlicerVirtualReality cannot be included

SlicerVirtualReality builds VTKRenderingOpenVR, which is fine, its build directory is [SuperBuild_DIR]\VTKRenderingOpenVR-build. However, when building it, openvr.h is not found. The problem is that the additional include directories contains [SuperBuild_DIR]\OpenVR\headers, but OpenVR is deployed in [SuperBuild_DIR]\slicersources-build\OpenVR.

Any ideas what needs to be changed so that OpenVR is not in slicersources-build but one level above? Thanks!

Fail to build SlicerCAT on Windows, Qt5.15.2

Hello,

I'm currently trying to build a custom Slicer application using SlicerCAT template, and I've successfully built it on Linux using ninja, but when it comes to building it on Windows, I'm running into the following error:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5):
error MSB8066: Custom build for  
'C:\Q2\B\CMakeFiles\7b4207946361042160f1562bac00b92a\Slicer-mkdir.rule;
 C:\Q2\B\CMakeFiles\7b4207946361042160f1562bac00b92a\Slicer-download.rule;
 C:\Q2\B\CMak eFiles\7b4207946361042160f1562bac00b92a\Slicer-update.rule;
 C:\Q2\B\CMakeFiles\7b4207946361042160f1562bac00b92a\Slicer-patch.rule;
 C:\Q2\B\CMakeFiles\7b420794 6361042160f1562bac00b92a\Slicer-configure.rule;
 C:\Q2\B\CMakeFiles\7b4207946361042160f1562bac00b92a\Slicer-build.rule;
 C:\Q2\B\CMakeFiles\7b4207946361042160f1 562bac00b92a\Slicer-forceconfigure.rule;
 C:\Q2\B\CMakeFiles\7b4207946361042160f1562bac00b92a\Slicer-install.rule;
 C:\Q2\B\CMakeFiles\02c0871b71c6c3da9888900d8 44fb2d2\Slicer-complete.rule;
 C:\Q2\B\CMakeFiles\c3ce02f298c40f59a83219b3361ab890\Slicer.rule;
 C:\Q2\B\slicersources-src\CMakeLists.txt' exited with code 1. [ C:\Q2\B\slicersources-build\Slicer.vcxproj]

When going back in the logs, I come across the following errors:

# ...
Creating library C:/Q2/B/Slicer-build/lib/Project-5.0/Release/qProjectApp.lib and object C:/Q2/B/Slicer-build/lib/Project-5.0/Release/qProjectApp.exp                 
qProjectApp.vcxproj -> C:\Q2\B\Slicer-build\bin\Release\qProjectApp.dll                                                                                            
Building Custom Rule C:/Q2/S/Applications/ProjectApp/CMakeLists.txt                                                                                             
Main.cxx                                                                                                                                                     
ProjectApp.vcxproj -> C:\Q2\B\Slicer-build\bin\Release\ProjectApp-real.exe                                                                                         
Copy 'python39.dll' along side 'ProjectApp' executable. See Slicer issue #1180                                                                                  
Configuring application launcher: Project [SplashScreen.png]
Building Custom Rule C:/Q2/S/Applications/ProjectApp/CMakeLists.txt

Qt: Untested Windows version 6.2 detected!                                                
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5):
error MSB8066: Custom build for  
'C:\Q2\B\Slicer-build\CMakeFiles\55b89583821e3b8bbd118cc09ed193b4\ProjectUpdateLauncherIcon.rule;
 C:\Q2\S\Applications\ProjectApp\CMakeLists.txt' exited with code  -1073741819.
[C:\Q2\B\Slicer-build\Applications\ProjectApp\ProjectUpdateLauncherIcon.vcxproj]
[C:\Q2\B\slicersources-build\Slicer.vcxproj]                             

Qt: Untested Windows version 6.2 detected!                                                                                                               
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5):
error MSB8066: Custom build for  
'C:\Q2\B\Slicer-build\CMakeFiles\740b7a104d68be69a02df780eec2153d\ProjectW.exe.rule;
 C:\Q2\B\Slicer-build\CMakeFiles\55b89583821e3b8bbd118cc09ed193b4\ProjectUpdate LauncherWIcon.rule;
 C:\Q2\S\Applications\ProjectApp\CMakeLists.txt' exited with code -1073741819.
[C:\Q2\B\Slicer-build\Applications\ProjectApp\ProjectUpdateLauncherW Icon.vcxproj]
[C:\Q2\B\slicersources-build\Slicer.vcxproj]  

Python Wrapping - generating SlicerBaseLogicPythonInit.cxx                                                                                                   
Python Wrapping - generating vtkSlicerApplicationLogicPython.cxx                                                                                             
Python Wrapping - generating vtkSlicerModuleLogicPython.cxx                                                                                                  
Python Wrapping - generating vtkSlicerTaskPython.cxx                                                                                                         
Python Wrapping - generating vtkDataIOManagerLogicPython.cxx
# ...

However, I can still launch my custom app but the following logs show up in console and no plugins are loaded in Slicer (except my custom scripted module)

When loading module  "DICOM" , the dependency "SubjectHierarchy" failed to be loaded.                                  
When loading module  "DICOM" , the dependency "SubjectHierarchy" failed to be loaded.                                  
When loading module  "DICOMPatcher" , the dependency "DICOM" failed to be loaded.                                      
When loading module  "SegmentEditor" , the dependency "Segmentations" failed to be loaded.                             
When loading module  "SegmentStatistics" , the dependency "SubjectHierarchy" failed to be loaded.

I did not modify the initial CMakeFile.txt and I've launched the build following the instructions in BUILD.md:

cd C:\Q
mkdir B
cd B
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DQt5_DIR:PATH=C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5 ..\S
cmake --build . --config Release -- /maxcpucount:4

Environment:

Thanks in advance

Python automated tests crash

The scripted module tests crash for custom app, also confirmed to be the case with the template without anything additional. This happens using the latest master, on Windows 10 with Qt 5.10.1.

I cannot debug it with setting the launcher as executable, as it runs the test on a different thread. I'd appreciate any ideas. Thank you!

e:\e\tD\Slicer-build>ctest -C Debug -V -R py_nomainwindow_
UpdateCTestConfiguration  from :E:/e/tD/Slicer-build/DartConfiguration.tcl
Parse Config file:E:/e/tD/Slicer-build/DartConfiguration.tcl
 Add coverage exclude regular expressions.
 Add coverage exclude: /CMakeFiles/CMakeTmp/
 Add coverage exclude: .*/moc_.*
 Add coverage exclude: .*/ui_.*
 Add coverage exclude: .*/qrc_.*
 Add coverage exclude: .*/Testing/.*
 Add coverage exclude: .*Python.cxx
 Add coverage exclude: .*PythonInit.cxx
 Add coverage exclude: .*/DesignerPlugins/.*
 Add coverage exclude: .*/generated_cpp/.*
SetCTestConfiguration:CMakeCommand:C:/Program Files/CMake/bin/cmake.exe
UpdateCTestConfiguration  from :E:/e/tD/Slicer-build/DartConfiguration.tcl
Parse Config file:E:/e/tD/Slicer-build/DartConfiguration.tcl
Test project E:/e/tD/Slicer-build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 292
      Start 292: py_nomainwindow_SubjectHierarchyFoldersTest1

292: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--disable-cli-modules" "--no-main-window" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Debug" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Release" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/MinSizeRel" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/RelWithDebInfo" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Loadable/SubjectHierarchy/Testing/Python', 'E:/e/tD/slicersources-src/Modules/Loadable/SubjectHierarchy/Testing/Python'], 'SubjectHierarchyFoldersTest1')"
292: Test timeout computed to be: 1500
292: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 1/11 Test #292: py_nomainwindow_SubjectHierarchyFoldersTest1 .................***Failed    2.76 sec
test 372
      Start 372: py_nomainwindow_SegmentationsModuleTest1

372: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--disable-cli-modules" "--no-main-window" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Debug" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Release" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/MinSizeRel" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/RelWithDebInfo" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Loadable/Segmentations/Testing/Python', 'E:/e/tD/slicersources-src/Modules/Loadable/Segmentations/Testing/Python'], 'SegmentationsModuleTest1')"
372: Test timeout computed to be: 1500
372: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 2/11 Test #372: py_nomainwindow_SegmentationsModuleTest1 .....................***Failed    2.76 sec
test 373
      Start 373: py_nomainwindow_SegmentationsModuleTest2

373: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--disable-cli-modules" "--no-main-window" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Debug" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Release" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/MinSizeRel" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/RelWithDebInfo" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Loadable/Segmentations/Testing/Python', 'E:/e/tD/slicersources-src/Modules/Loadable/Segmentations/Testing/Python'], 'SegmentationsModuleTest2')"
373: Test timeout computed to be: 1500
373: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 3/11 Test #373: py_nomainwindow_SegmentationsModuleTest2 .....................***Failed    2.82 sec
test 374
      Start 374: py_nomainwindow_SegmentationWidgetsTest1

374: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--disable-cli-modules" "--no-main-window" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Debug" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/Release" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/MinSizeRel" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules/RelWithDebInfo" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Loadable/Segmentations/Testing/Python', 'E:/e/tD/slicersources-src/Modules/Loadable/Segmentations/Testing/Python'], 'SegmentationWidgetsTest1')"
374: Test timeout computed to be: 1500
374: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 4/11 Test #374: py_nomainwindow_SegmentationWidgetsTest1 .....................***Failed    2.77 sec
test 417
      Start 417: py_nomainwindow_qSlicerCropVolumeSequenceModuleGenericTest

417: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/CropVolumeSequence', 'E:/e/tD/slicersources-src/Modules/Scripted/CropVolumeSequence'], 'qSlicerCropVolumeSequenceModuleGenericTest')"
417: Test timeout computed to be: 1500
417: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 5/11 Test #417: py_nomainwindow_qSlicerCropVolumeSequenceModuleGenericTest ...***Failed    2.76 sec
test 419
      Start 419: py_nomainwindow_qSlicerEditorModuleGenericTest

419: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/Editor', 'E:/e/tD/slicersources-src/Modules/Scripted/Editor'], 'qSlicerEditorModuleGenericTest')"
419: Test timeout computed to be: 1500
419: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 6/11 Test #419: py_nomainwindow_qSlicerEditorModuleGenericTest ...............***Failed    2.77 sec
test 422
      Start 422: py_nomainwindow_qSlicerScreenCaptureModuleGenericTest

422: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/ScreenCapture', 'E:/e/tD/slicersources-src/Modules/Scripted/ScreenCapture'], 'qSlicerScreenCaptureModuleGenericTest')"
422: Test timeout computed to be: 1500
422: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 7/11 Test #422: py_nomainwindow_qSlicerScreenCaptureModuleGenericTest ........***Failed    2.77 sec
test 425
      Start 425: py_nomainwindow_qSlicerSegmentStatisticsModuleGenericTest

425: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/SegmentStatistics', 'E:/e/tD/slicersources-src/Modules/Scripted/SegmentStatistics'], 'qSlicerSegmentStatisticsModuleGenericTest')"
425: Test timeout computed to be: 1500
425: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 8/11 Test #425: py_nomainwindow_qSlicerSegmentStatisticsModuleGenericTest ....***Failed    2.81 sec
test 427
      Start 427: py_nomainwindow_qSlicerSelfTestsModuleGenericTest

427: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/SelfTests', 'E:/e/tD/slicersources-src/Modules/Scripted/SelfTests'], 'qSlicerSelfTestsModuleGenericTest')"
427: Test timeout computed to be: 1500
427: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
 9/11 Test #427: py_nomainwindow_qSlicerSelfTestsModuleGenericTest ............***Failed    2.85 sec
test 428
      Start 428: py_nomainwindow_qSlicerDICOMModuleGenericTest

428: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/DICOM', 'E:/e/tD/slicersources-src/Modules/Scripted/DICOM'], 'qSlicerDICOMModuleGenericTest')"
428: Test timeout computed to be: 1500
428: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
10/11 Test #428: py_nomainwindow_qSlicerDICOMModuleGenericTest ................***Failed    2.85 sec
test 429
      Start 429: py_nomainwindow_qSlicerDICOMPatcherModuleGenericTest

429: Test command: E:\e\tD\Slicer-build\testingTest.exe "--no-splash" "--testing" "--no-main-window" "--disable-cli-modules" "--additional-module-path" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "--additional-module-paths" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-scripted-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/cli-modules" "E:/e/tD/Slicer-build/lib/testingTest-4.11/qt-loadable-modules" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['E:/e/tD/Slicer-build/Modules/Scripted/DICOMPatcher', 'E:/e/tD/slicersources-src/Modules/Scripted/DICOMPatcher'], 'qSlicerDICOMPatcherModuleGenericTest')"
429: Test timeout computed to be: 1500
429: error: [E:/e/tD/Slicer-build/bin/Debug/testingTestApp-real.exe] exit abnormally - Report the problem.
11/11 Test #429: py_nomainwindow_qSlicerDICOMPatcherModuleGenericTest .........***Failed    2.83 sec

0% tests passed, 11 tests failed out of 11

Total Test time (real) =  30.94 sec

The following tests FAILED:
        292 - py_nomainwindow_SubjectHierarchyFoldersTest1 (Failed)
        372 - py_nomainwindow_SegmentationsModuleTest1 (Failed)
        373 - py_nomainwindow_SegmentationsModuleTest2 (Failed)
        374 - py_nomainwindow_SegmentationWidgetsTest1 (Failed)
        417 - py_nomainwindow_qSlicerCropVolumeSequenceModuleGenericTest (Failed)
        419 - py_nomainwindow_qSlicerEditorModuleGenericTest (Failed)
        422 - py_nomainwindow_qSlicerScreenCaptureModuleGenericTest (Failed)
        425 - py_nomainwindow_qSlicerSegmentStatisticsModuleGenericTest (Failed)
        427 - py_nomainwindow_qSlicerSelfTestsModuleGenericTest (Failed)
        428 - py_nomainwindow_qSlicerDICOMModuleGenericTest (Failed)
        429 - py_nomainwindow_qSlicerDICOMPatcherModuleGenericTest (Failed)
Errors while running CTest

Use Qt::AA_UseHighDpiPixmaps

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
qreal dpr = sqrt(qApp->desktop()->logicalDpiX()*qreal(qApp->desktop()->logicalDpiY()) / (qApp->desktop()->physicalDpiX()*qApp->desktop()->physicalDpiY()));
logo.setDevicePixelRatio(dpr);
#endif

@dzenanz Instead of this approach (which lead to huge logo in the case of non-dpi), I suggest we use Qt::AA_UseHighDpiPixmaps.

Error running with default options, MacOS 10.12

I just tried running cookiecutter with the default options. My system is MacOS 10.12. The command line and output are as follows:

$ cookiecutter gh:KitwareMedical/SlicerCustomAppTemplate

You've downloaded /Users/michaelschumaker/.cookiecutters/SlicerCustomAppTemplate before. Is it okay to delete and re-download it? [yes]: 
project_name [SlicerCustomAppTemplate]: 
github_organization [Kitware]: 
github_project [SlicerCustomAppTemplate]: 
org_domain [kitware.com]: 
org_name [Kitware, Inc.]: 
app_name [SlicerCustomAppTemplate]: 
app_version_major [0]: 
app_version_minor [1]: 
app_version_patch [0]: 
app_description_summary [Customized version of Slicer]: 
Traceback (most recent call last):
  File "/usr/local/bin/cookiecutter", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/cookiecutter/cli.py", line 120, in main
    password=os.environ.get('COOKIECUTTER_REPO_PASSWORD')
  File "/Library/Python/2.7/site-packages/cookiecutter/main.py", line 94, in cookiecutter
    output_dir=output_dir
  File "/Library/Python/2.7/site-packages/cookiecutter/generate.py", line 364, in generate_files
    generate_file(project_dir, infile, context, env)
  File "/Library/Python/2.7/site-packages/cookiecutter/generate.py", line 172, in generate_file
    rendered_file = tmpl.render(**context)
  File "/Library/Python/2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/Library/Python/2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "./CMakeLists.txt", line 22, in top-level template code
  File "/Library/Python/2.7/site-packages/jinja2_github.py", line 26, in _head
    return Github().get_repo(repo).get_branch(repo_branch).commit.sha
  File "/Library/Python/2.7/site-packages/github/Repository.py", line 1242, in get_branch
    self.url + "/branches/" + branch
  File "/Library/Python/2.7/site-packages/github/Requester.py", line 260, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
  File "/Library/Python/2.7/site-packages/github/Requester.py", line 317, in requestJson
    return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
  File "/Library/Python/2.7/site-packages/github/Requester.py", line 370, in __requestEncode
    status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
  File "/Library/Python/2.7/site-packages/github/Requester.py", line 394, in __requestRaw
    response = cnx.getresponse()
  File "/Library/Python/2.7/site-packages/github/Requester.py", line 107, in getresponse
    r = verb(url, headers=self.headers, data=self.input, timeout=self.timeout, verify=self.verify)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 525, in get
    return self.request('GET', url, **kwargs)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Python/2.7/site-packages/requests/adapters.py", line 511, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/Slicer/Slicer/branches/master (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),))

Bad build target ordering when module depends on ITK module

Summary

Observed an instance where initial build of a new custom app fails due to an ITK external module attempting to build before ITK.

Steps to Reproduce

  1. Use cookiecutter to create a new custom app
  2. Add an external module that depends on some ITK external modules
  3. Configure the project in CMake CLI
  4. Build the project in Visual Studio 2022

Expected Behavior

Project builds successfully. ITK external module targets depend on ITK target.

Observed behavior

Build fails. ITK external modules are among the first build targets run, but since ITK has not been built yet they fail to find a suitable ITK.

Long custom app name fails to package on Windows

  • Long names generate too long paths in packaging directory on windows.
  • The default name is long enough to trigger this with a non release (dated) package name.
  • Perhaps we should put in a cmake warning/error if the name is too long?
  • See: http://slicer.cdash.org/viewBuildError.php?buildid=1821163

Error example:

File: Descending to: "D:/D/P/SC-0-build/Slicer-build/_CPack_Packages/win-amd64/NSIS/SlicerCustomAppTemplate-0.1.0-0000-00-00-win-amd64\lib\SlicerCustomAppTemplate-4.11\qt-scripted-modules\SegmentEditorEffects\SegmentEditorEffects\__pycache__\"

File: failed opening file "D:/D/P/SC-0-build/Slicer-build/_CPack_Packages/win-amd64/NSIS/SlicerCustomAppTemplate-0.1.0-0000-00-00-win-amd64\lib\SlicerCustomAppTemplate-4.11\qt-scripted-modules\SegmentEditorEffects\SegmentEditorEffects\__pycache__\AbstractScriptedSegmentEditorAutoCompleteEffect.cpython-36.pyc"

Error in script "D:/D/P/SC-0-build/Slicer-build/_CPack_Packages/win-amd64/NSIS/project.nsi" on line 639 -- aborting creation process

unable to access 'https://github.com/{{cookiecutter.github_organization}}

When I downloaded it, I encountered the following problems
$ git clone https://github.com/{{cookiecutter.github_organization}}/{{cookiecutter.github_project}}.git {{cookiecutter.github_project}}
Cloning into '{{cookiecutter.github_project}}'...
fatal: unable to access 'https://github.com/{{cookiecutter.github_organization}}/{{cookiecutter.github_project}}.git/': The requested URL returned error: 400
Is there anyone who can give me some advice? Thank you.

Fix build error due to overriding of Slicer_VERSION_* variables

The current implementation of the template overrides the Slicer_VERSION_* variables which cause build error because test like this one are failing:

#include "vtkSlicerVersionConfigure.h"
#if Slicer_VERSION_MAJOR > 4 || (Slicer_VERSION_MAJOR == 4 && Slicer_VERSION_MINOR >= 9)
  #include "vtkTeemNRRDReader.h"
  #include "vtkTeemNRRDWriter.h"
#else
  #include "vtkNRRDReader.h"
  #include "vtkNRRDWriter.h"
#endif

Source: https://github.com/SlicerRt/Sequences/blob/a4b32e822505373d34f250123421ac9485f3947c/Sequences/MRML/vtkMRMLVolumeSequenceStorageNode.cxx#L18-L25

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.