Slicer merge requestshttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests2020-02-29T09:29:04-05:00https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1060COMP: Require C++11 support for building Slicer2020-02-29T09:29:04-05:00Hans JohnsonCOMP: Require C++11 support for building SlicerBy requiring compiler support for C++11 we can greatly simplify the code
updates necessary support ITKv5 updates.
As development of the next phase of Slicer is begining, changing
to require C++11 will greatly reduce the number of co...By requiring compiler support for C++11 we can greatly simplify the code
updates necessary support ITKv5 updates.
As development of the next phase of Slicer is begining, changing
to require C++11 will greatly reduce the number of compile
time conditionals in the code. In many cases supporting
ITKv5 involves using c++11 features directly without
needing conditional wrappers.Hans JohnsonHans Johnsonhttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1086ENH: Support for scripted module internationalization **WIP** DO NOT MERGE2019-03-14T14:40:36-04:00Sam HorvathENH: Support for scripted module internationalization **WIP** DO NOT MERGE*Created by: jcfr*
Co-authored-by: Carlos Luque <carlos.luque@ulpgc.es>*Created by: jcfr*
Co-authored-by: Carlos Luque <carlos.luque@ulpgc.es>https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1087BUG: DicomWidgets - Do not assume that the extensions manager exists2019-03-14T14:40:36-04:00Sam HorvathBUG: DicomWidgets - Do not assume that the extensions manager exists*Created by: vovythevov*
Since Slicer may not be built with the extension manager enabled,
qSlicerCoreApplication::extentionsManagerModel may not exists (it's
surrounded by #ifdef Slicer_BUILD_EXTENSIONMANAGER_SUPPORT).*Created by: vovythevov*
Since Slicer may not be built with the extension manager enabled,
qSlicerCoreApplication::extentionsManagerModel may not exists (it's
surrounded by #ifdef Slicer_BUILD_EXTENSIONMANAGER_SUPPORT).https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1085ENH: Friendlier segment editor widget for better intergration in layouts2019-03-14T14:40:35-04:00Sam HorvathENH: Friendlier segment editor widget for better intergration in layouts*Created by: vovythevov*
This PR aims to simplify integration of the Segment Editor widget in other widget.
Here is an illustration of what it looks like with and without this PR.
![illustration](https://user-images.githubusercontent....*Created by: vovythevov*
This PR aims to simplify integration of the Segment Editor widget in other widget.
Here is an illustration of what it looks like with and without this PR.
![illustration](https://user-images.githubusercontent.com/426898/52011108-15798500-24a5-11e9-87ba-09c5482781b6.png)
The code used to generate this is here:
[SegmentEditorUIFix.zip](https://github.com/Slicer/Slicer/files/2814355/SegmentEditorUIFix.zip)
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1052ENH: Allow for custom presets prefix and tooltips2019-03-14T14:40:23-04:00Sam HorvathENH: Allow for custom presets prefix and tooltips*Created by: vovythevov*
Although Slicer allowed to create custom presets for the Slice views, it
did not allow the user to customize the tooltip nor the prefix that would
show in the view.
It is now possible to customize each of the...*Created by: vovythevov*
Although Slicer allowed to create custom presets for the Slice views, it
did not allow the user to customize the tooltip nor the prefix that would
show in the view.
It is now possible to customize each of the slice views preset to have
a custom prefix and/or tooltip.https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1017ENH: Add generic storage node for Markups2019-03-14T14:39:53-04:00Sam HorvathENH: Add generic storage node for Markups*Created by: vovythevov*
Markups did not have a generic storage node that worked for all for types
of markups. This new storage nodes aims to fill this need. It is also meant
to be easily extensible in potential markup subclasses.
...*Created by: vovythevov*
Markups did not have a generic storage node that worked for all for types
of markups. This new storage nodes aims to fill this need. It is also meant
to be easily extensible in potential markup subclasses.
The new generic storage exports markups to JSON for ease of interface with
the web, python and other applications.
The existing Markups Fiducial reader is left as-is and is still the default
for fiducials.
CC: @jcfrhttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1022Improve macos packaging for Slicer extension2019-03-14T14:39:53-04:00Sam HorvathImprove macos packaging for Slicer extension*Created by: jcfr*
This PR is here for review. More testing will be performed after I am back of traveling two weeks.
These changes were originally motivated to support packaging of SlicerSALT (a custom Slicer application used to dis...*Created by: jcfr*
This PR is here for review. More testing will be performed after I am back of traveling two weeks.
These changes were originally motivated to support packaging of SlicerSALT (a custom Slicer application used to disseminate powerful shape analysis methodology based on 3D Slicer open-source software). See http://salt.slicer.org/https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1018BUG: Report error if --python-script associated with non-existent file2019-03-14T14:39:49-04:00Sam HorvathBUG: Report error if --python-script associated with non-existent file*Created by: jcfr*
This commit ensures an exception is raised when the python script does not
exist. When associated with the --exit-after-startup option, a non-zero status
code is now returned when Slicer exit.*Created by: jcfr*
This commit ensures an exception is raised when the python script does not
exist. When associated with the --exit-after-startup option, a non-zero status
code is now returned when Slicer exit.https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1010PREVIEW: Planes and splines2019-03-14T14:39:46-04:00Sam HorvathPREVIEW: Planes and splines*Created by: vovythevov*
### **DO NOT MERGE**
This is a preview PR intended to discuss the Splines and Planes module.
CC: @lassoan, @jcfr, @cpinter*Created by: vovythevov*
### **DO NOT MERGE**
This is a preview PR intended to discuss the Splines and Planes module.
CC: @lassoan, @jcfr, @cpinterhttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/898Plenty chinese i18n ts files and code modification2019-03-14T14:38:35-04:00Sam HorvathPlenty chinese i18n ts files and code modification*Created by: u8621011*
Below is what this PR includes
1. traditional/simplified Chinese translation files
2. i18n related cmake script for loadable module
3. i18n related code fixes.*Created by: u8621011*
Below is what this PR includes
1. traditional/simplified Chinese translation files
2. i18n related cmake script for loadable module
3. i18n related code fixes.https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/849WIP: Update build system introducing Slicer_BUILD_SEGMENTATION_SUPPORT option2019-03-14T14:37:51-04:00Sam HorvathWIP: Update build system introducing Slicer_BUILD_SEGMENTATION_SUPPORT option*Created by: jcfr*
This allows to build Slicer without segmentation support. This is
particularly useful when building custom application based on Slicer.*Created by: jcfr*
This allows to build Slicer without segmentation support. This is
particularly useful when building custom application based on Slicer.https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/507Rename teem to vtk teem2019-03-14T14:35:10-04:00Sam HorvathRename teem to vtk teem*Created by: jcfr*
*Created by: jcfr*
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/509[PREVIEW-WIP] PERF: Improve startup time by 8% with lazy loading of wrapped l...2019-03-14T14:35:08-04:00Sam Horvath[PREVIEW-WIP] PERF: Improve startup time by 8% with lazy loading of wrapped libraries*Created by: jcfr*
**\* WORK IN PROGRESS: For now, you have to make sure SlicerApp-real and
Slicer launcher are built to ensure the successful generation of the json
files ***
Startup time reduced from 3.8s to 3.5s with a "cold cache"
...*Created by: jcfr*
**\* WORK IN PROGRESS: For now, you have to make sure SlicerApp-real and
Slicer launcher are built to ensure the successful generation of the json
files ***
Startup time reduced from 3.8s to 3.5s with a "cold cache"
and from 2.7s to 2.38s with a "warm cache".
For each logic/mrml/dm/widgets python modules, a json files listing
the associated attributes is generated. Then, when the application is
initialized, the "slicer" module is created as a "lazy" module with
the attributes associated with logic/mrml/dm/widgets set as "not loaded".
Finally, as soon as an attribute not yet loaded is accessed, the specialized
`__getattribute__` loads the associated python module and update the module
dictionary.
The "lazy" module has been adapted from "itkLazy.py"
Results have been gathered on Ubuntu 15.10 on a workstation with the
following specs: 64GB / M.2 PCIe NVMe SSD / Quad Core 3.80GHz
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1112STYLE: Remove outdated Qt4 code in CMake and python code.2019-03-13T23:38:29-04:00phcerdanSTYLE: Remove outdated Qt4 code in CMake and python code.Removed code was never executed since Qt5 is now required
or contained outdated documentation.Removed code was never executed since Qt5 is now required
or contained outdated documentation.https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1111ENH: Modernize: add override in virtual functions of derived classes2019-03-13T23:08:24-04:00phcerdanENH: Modernize: add override in virtual functions of derived classesAfter ITK_OVERRIDE and VTK_OVERRIDE have been replaced for `override`
we run clang-tidy to add overrides on virtual functions of derived
classes.
Example:
```diff
-virtual void ShowProgress()
+void ShowProgress() override
```
...After ITK_OVERRIDE and VTK_OVERRIDE have been replaced for `override`
we run clang-tidy to add overrides on virtual functions of derived
classes.
Example:
```diff
-virtual void ShowProgress()
+void ShowProgress() override
```
This allows compiler warnings and errors if the method
does not override the base class after a change in the base class.
Check the Slicer Wiki for an updated version of the documentation on
how to run clang-tidy.
https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide#C.2B.2B11:_Update_source_code_to_use_override
```
run-clang-tidy.py -checks=-*,modernize-use-override -header-filter=.* -fix
```
Multiple `override` are added to the same method.
```cpp
void PrintSelf(ostream& os, vtkIndent indent) override override override;
```
Clean them with (15 here is just a high enough number):
```
for n in `seq 1 15`;
do
ack "override override" -l --print0 | xargs -0 -n 1 sed -i \
's/override override/override/g'
done
```
When all of them are fixed, you should see in the terminal:
```
sed: no input files
```
This branch includes #1109 and #1107 (VTK_OVERRIDE and ITK_OVERRIDE)
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1110BUG: Fix MRML scene undo/redo mechanism2019-03-13T17:32:30-04:00Andras LassoBUG: Fix MRML scene undo/redo mechanismMRML scene undo/redo mechanism has been disabled for a long time and this commit keeps it that way. However, this commit contain a number of fixes for problems that initial testing of the undo/redo mechanism revealed. While the undo/redo...MRML scene undo/redo mechanism has been disabled for a long time and this commit keeps it that way. However, this commit contain a number of fixes for problems that initial testing of the undo/redo mechanism revealed. While the undo/redo infrastructure is still not ready for general use, these fixes allow enabling it for selected nodes in custom applications.
- Add flag to enable/disable undo/redo tracking for nodes. This allows enabling undo/redo only for selected nodes, that are implemented carefully to work well with undo/redo.
- Enforce maximum stack size on undo and redo stacks.
- Node IDs that are referenced within the node stack and are not within the scene are considered to be in use for the purpose of generating unique node ids (this makes sure no node ID conflicts can occur between new nodes and nodes that were restored from the undo stack).
- Add missing SaveStateForUndo calls into Markups widgets.
- Always save the full scene state - saving only state of selected nodes can break node references and make the state of the scene inconsistent. Even if a Slice core module would think that as a result of a user action only specific nodes are updated, due to behavior of custom modules, it is possible that a simple node change triggers events that change state of other nodes, which would not be possible to revert without saving the state of all nodes.
- Add flag to be able to disable automatic display node creation for Markups.
- Removed SaveStateForUndo calls from logic and MRML classes. Undo/Redo should be handled at the application/GUI level and not at MRML library level (at the library level it is not known when is a good time to save a new state).
Co-authored-by: Kyle Sunderland <sunderlandkyl@gmail.com>https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1105BUG: Fix errors for model slice display manager when not in slice plane2019-03-13T16:01:37-04:00SunderlandkylBUG: Fix errors for model slice display manager when not in slice plane- If there is no input or if the input has no points, the vtkTransformPolyDataFilter will display an error message on every update: "No input data".
- To prevent the error, if the input is empty then the actor should not be visible sinc...- If there is no input or if the input has no points, the vtkTransformPolyDataFilter will display an error message on every update: "No input data".
- To prevent the error, if the input is empty then the actor should not be visible since there is nothing to display.https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1109STYLE: Replace VTK_OVERRIDE with override2019-03-13T12:04:55-04:00phcerdanSTYLE: Replace VTK_OVERRIDE with overrideThis commit replaces occurences of the VTK_OVERRIDE macro with override. This one-liner
was used to perform the update:
git grep -l "VTK_OVERRIDE" | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/VTK_OVERRIDE/overri...This commit replaces occurences of the VTK_OVERRIDE macro with override. This one-liner
was used to perform the update:
git grep -l "VTK_OVERRIDE" | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/VTK_OVERRIDE/override/g"https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1107STYLE: Replace ITK_OVERRIDE with override2019-03-13T11:49:53-04:00phcerdanSTYLE: Replace ITK_OVERRIDE with overrideThis commit replaces occurences of the ITK_OVERRIDE macro with override. This one-liner
was used to perform the update:
```
git grep -l "ITK_OVERRIDE" | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/ITK_OVERRIDE/...This commit replaces occurences of the ITK_OVERRIDE macro with override. This one-liner
was used to perform the update:
```
git grep -l "ITK_OVERRIDE" | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/ITK_OVERRIDE/override/g"
```
It was adapted from https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/ITKv5Preparation/ReplaceITK_OVERRIDEMacroNames.shhttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1108STYLE: Replace ITK_NULLPTR with nullptr2019-03-13T11:39:14-04:00phcerdanSTYLE: Replace ITK_NULLPTR with nullptrThis commit replaces occurences of the ITK_NULLPTR macro with nullptr. This one-liner
was used to perform the update:
```
git grep -l "ITK_NULLPTR" | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/ITK_NULLPTR/null...This commit replaces occurences of the ITK_NULLPTR macro with nullptr. This one-liner
was used to perform the update:
```
git grep -l "ITK_NULLPTR" | fgrep -v CMakeLists.txt |fgrep -v .cmake | xargs sed -i '' -e "s/ITK_NULLPTR/nullptr/g"
```
It was adapted from https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/ITKv5Preparation/ReplaceITK_NULLPTRMacroNames.sh
Updated information can be found in the wiki:
https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ObsoleteCodeRemoval#C.2B.2B11:_Update_source_code_to_use_nullptr