Slicer merge requestshttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests2019-03-13T11:49:53-04:00https://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/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/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/1103Update ITK from v4.13 to v5.0rc1, BRAINSTools and SimpleITK [ci skip]2019-03-12T19:50:50-04:00Sam HorvathUpdate ITK from v4.13 to v5.0rc1, BRAINSTools and SimpleITK [ci skip]*Created by: jcfr*
To help extension developers transition their code base, a migration guide is also
available on the wiki.
See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ITK4-to-ITK5
Thi...*Created by: jcfr*
To help extension developers transition their code base, a migration guide is also
available on the wiki.
See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ITK4-to-ITK5
This commit implements the following changes
- Compatibility with refactor of threading models in ITK: Fix compilation
using ProcessingThreader class instead of PlatformMultiThreader.
ITKv5 reorganized the multi-threading capabilities of ITK into a more modular organization
and naming to support several modern parallelism paradigms.
Note that these changes allow Slicer to compile with ITKv5, but does not take advantage
of any enhancement supporting new threading models. ProcessingThreader
is still the old-renamed PlatformMultiThreader.
These changes were originally associated with PR https://github.com/Slicer/Slicer/pull/1057
- Fix compilation issue related to ComputeJacobianWithRespectToPosition parameter mismatch.
ITKv5 change the argument of some transform functions from JacobianType to JacobianPositionType.
This fixes the new signatures.
These changes were originally associated with PR https://github.com/Slicer/Slicer/pull/1055
List of BRAINSTools changes:
```
$ git shortlog --no-merges b045970..ac4dafaa
[...]
```
List of SimpleITK changes:
```
$ git shortlog --no-merges v1.1.0..dc5c1a1d
[...]
```
List of ITK changes:
```
```
Co-authored-by: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>
Co-authored-by: Hans Johnson <hans.j.johnson@gmail.com>
Co-authored-by: Sam Horvath <sam.horvath@kitware.com>
Co-authored-by: Jean-Christophe Fillion-Robin <jcfr@kitware.com>https://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_nullptrhttps://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/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/1106ENH: Update CTK2019-03-12T15:02:11-04:00phcerdanENH: Update CTKEnabling python wrapping of Qt classes using nullptr in the interface.
```
git shortlog --no-merges ab58201f..d11e259
```
```
Jean-Christophe Fillion-Robin (1):
STYLE: ctkWrapPythonQt: Add docstring
Pablo Hernandez-Cerdan (1):
...Enabling python wrapping of Qt classes using nullptr in the interface.
```
git shortlog --no-merges ab58201f..d11e259
```
```
Jean-Christophe Fillion-Robin (1):
STYLE: ctkWrapPythonQt: Add docstring
Pablo Hernandez-Cerdan (1):
COMP: ctkWrapPythonQt: Fix wrapping of classes using nullptr
```https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1104BUG: replace mailing list with the forum link2019-03-12T20:09:46-04:00Sam HorvathBUG: replace mailing list with the forum link*Created by: fedorov*
*Created by: fedorov*
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1102ENH: Modernize: use nullptr instead of NULL or 02019-03-12T20:17:40-04:00phcerdanENH: Modernize: use nullptr instead of NULL or 0Update associated with this PR are documented on the wiki. See [C++11: Update source code to use nullptr](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ObsoleteCodeRemoval#C.2B.2B11:_Update_source_...Update associated with this PR are documented on the wiki. See [C++11: Update source code to use nullptr](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ObsoleteCodeRemoval#C.2B.2B11:_Update_source_code_to_use_nullptr)
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1101Remove support for building Slicer with C++98, Qt4 and VTK72019-03-08T18:56:25-05:00Sam HorvathRemove support for building Slicer with C++98, Qt4 and VTK7*Created by: jcfr*
*Created by: jcfr*
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1091ENH: Added new node types to support custom volume rendering shader code2019-03-05T00:10:51-05:00Simon DrouinENH: Added new node types to support custom volume rendering shader codeWith this PR, we introduce a mechanism to manage and store custom modifications and variables of volume rendering shaders. This pull request requires changes to VTK contained in this other pull request:
https://github.com/Slicer/VTK/p...With this PR, we introduce a mechanism to manage and store custom modifications and variables of volume rendering shaders. This pull request requires changes to VTK contained in this other pull request:
https://github.com/Slicer/VTK/pull/21
This change in VTK separates the management of vtkUniforms and shader replacements from the volume mapper and stores all these properties in a new class (vtkShaderProperty), which is stored in vtkVolume. On the Slicer side, I have created wrappers classes to manage vtkShaderProperty:
* vtkMRMLShaderPropertyNode
* vtkMRMLShaderPropertyStorageNode
* qSlicerShaderPropertyReader
The advantages of the new system are twofold:
* Custom shader modifications are contained in a class that is shared by all displayable managers, i.e. your custom shader effect is visible in both the 3D view and the VR view.
* Custom modifications to the shaders are now saved with the mrml scene (in a json file with extension .sp), which means that GLSL experts can modify the shader code and variables, send the scene to non-programmers (e.g. clinicians) who will be able to load and visualize the new rendering effect by simply loading the scene.
@lassoan @pieper @cpinter @jcfr please let me know what you think. https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1098COMP: Fix minor warnings2019-03-06T13:08:58-05:00phcerdanCOMP: Fix minor warnings- Catch by value exception in `Testing/VTKITKVectorReader.cxx`
```cpp
warning: catching polymorphic type ‘class itk::ExceptionObject’ by value [-Wcatch-value=]
```
- unused variable in vtkAddon/vtkOpenGLShaderComputation.cxx
```cpp
/L...- Catch by value exception in `Testing/VTKITKVectorReader.cxx`
```cpp
warning: catching polymorphic type ‘class itk::ExceptionObject’ by value [-Wcatch-value=]
```
- unused variable in vtkAddon/vtkOpenGLShaderComputation.cxx
```cpp
/Libs/vtkAddon/vtkOpenGLShaderComputation.cxx:423:10: warning: unused variable ‘status’ [-Wunused-variable]
GLenum status;
^~~~~~
```https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1099WIP: Remove c++98 support, Qt4 and VTK7. Last commit also removes Qt5.5 support.2019-03-08T18:59:32-05:00phcerdanWIP: Remove c++98 support, Qt4 and VTK7. Last commit also removes Qt5.5 support.COMP: Remove C++98 support
Remove logic involving checks for `CMAKE_CXX_STANDARD=98`
COMP: Remove support for Qt4 and VTK7
Slicer_REQUIRED_QT_VERSION is at least 5.0.0
This allows to remove a lot of logic in form of `#ifdef` ...COMP: Remove C++98 support
Remove logic involving checks for `CMAKE_CXX_STANDARD=98`
COMP: Remove support for Qt4 and VTK7
Slicer_REQUIRED_QT_VERSION is at least 5.0.0
This allows to remove a lot of logic in form of `#ifdef` involving checking
for QT_VERSION lesser than 5.0.0
COMP: Remove C++98 support
Remove logic involving checks for `CMAKE_CXX_STANDARD=98`
This branch integrates work done in #1060 but with new CMake
Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu>
Co-authored-by: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1100COMP: Fix unused warning related to vtkMRMLWriteXML and vtkMRMLPrint2019-03-08T16:33:20-05:00phcerdanCOMP: Fix unused warning related to vtkMRMLWriteXML and vtkMRMLPrintin `vtkMRMLGPURayCastVolumeRenderingDisplayNode` and
`vtkMRMLMultiVolumeRenderingDisplayNode`.
These classes where starting and end the macros, but without any content
printed or written between those calls.
Warning:
```cpp
[335/2622]...in `vtkMRMLGPURayCastVolumeRenderingDisplayNode` and
`vtkMRMLMultiVolumeRenderingDisplayNode`.
These classes where starting and end the macros, but without any content
printed or written between those calls.
Warning:
```cpp
[335/2622] Building CXX object Libs/vtkITK/CMakeFiles/vtkITK.dir/vtkITKGrowCutSegmentationImageFilter.cxx.o
In file included from Libs/MRML/Core/vtkMRMLNode.h:37,
from Libs/MRML/Core/vtkMRMLDisplayNode.h:19,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLVolumeRenderingDisplayNode.h:22,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.h:25,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:22:
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx: In member function ‘virtual void vtkMRMLGPURayCastVolumeRenderingDisplayNode::ReadXMLAttributes(const char**)’:
Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:148:15: warning: variable ‘xmlReadAttName’ set but not used [-Wunused-but-set-variable]
const char* xmlReadAttName; \
^~~~~~~~~~~~~~
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:48:3: note: in expansion of macro ‘vtkMRMLReadXMLBeginMacro’
vtkMRMLReadXMLBeginMacro(atts);
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from Libs/MRML/Core/vtkMRMLNode.h:37,
from Libs/MRML/Core/vtkMRMLDisplayNode.h:19,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLVolumeRenderingDisplayNode.h:22,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.h:25,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:22:
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx: In member function ‘virtual void vtkMRMLGPURayCastVolumeRenderingDisplayNode::WriteXML(std::ostream&, int)’:
Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:30:12: warning: unused variable ‘xmlWriteOutputStream’ [-Wunused-variable]
ostream& xmlWriteOutputStream = of;
^~~~~~~~~~~~~~~~~~~~
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:57:3: note: in expansion of macro ‘vtkMRMLWriteXMLBeginMacro’
vtkMRMLWriteXMLBeginMacro(of);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Libs/MRML/Core/vtkMRMLNode.h:37,
from Libs/MRML/Core/vtkMRMLDisplayNode.h:19,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLVolumeRenderingDisplayNode.h:22,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.h:25,
from Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:22:
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx: In member function ‘virtual void vtkMRMLGPURayCastVolumeRenderingDisplayNode::PrintSelf(std::ostream&, vtkIndent)’:
Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:417:12: warning: unused variable ‘printOutputStream’ [-Wunused-variable]
ostream& printOutputStream = os; \
^~~~~~~~~~~~~~~~~
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:78:3: note: in expansion of macro ‘vtkMRMLPrintBeginMacro’
vtkMRMLPrintBeginMacro(os, indent);
^~~~~~~~~~~~~~~~~~~~~~
Libs/MRML/Core/vtkMRMLNodePropertyMacros.h:418:13: warning: variable ‘printOutputIndent’ set but not used [-Wunused-but-set-variable]
vtkIndent printOutputIndent = indent;
^~~~~~~~~~~~~~~~~
Modules/Loadable/VolumeRendering/MRML/vtkMRMLGPURayCastVolumeRenderingDisplayNode.cxx:78:3: note: in expansion of macro ‘vtkMRMLPrintBeginMacro’
vtkMRMLPrintBeginMacro(os, indent);
```https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1096ENH: Update ITK from v4.13 to v5.0rc1, Update BRAINSTools and SimpleITK2019-03-08T19:57:28-05:00phcerdanENH: Update ITK from v4.13 to v5.0rc1, Update BRAINSTools and SimpleITKTo help extension developers transition their code base, a migration guide is also
available on the wiki.
See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ITK4-to-ITK5
This commit implements ...To help extension developers transition their code base, a migration guide is also
available on the wiki.
See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/MigrationGuide/ITK4-to-ITK5
This commit implements the following changes
- Compatibility with refactor of threading models in ITK: Fix compilation
using ProcessingThreader class instead of PlatformMultiThreader.
ITKv5 reorganized the multi-threading capabilities of ITK into a more modular organization
and naming to support several modern parallelism paradigms.
Note that these changes allow Slicer to compile with ITKv5, but does not take advantage
of any enhancement supporting new threading models. ProcessingThreader
is still the old-renamed PlatformMultiThreader.
These changes were originally associated with PR https://github.com/Slicer/Slicer/pull/1057
- Fix compilation issue related to ComputeJacobianWithRespectToPosition parameter mismatch.
ITKv5 change the argument of some transform functions from JacobianType to JacobianPositionType.
This fixes the new signatures.
These changes were originally associated with PR https://github.com/Slicer/Slicer/pull/1055
List of BRAINSTools changes:
```
$ git shortlog --no-merges b045970..ac4dafaa
[...]
```
List of SimpleITK changes:
```
$ git shortlog --no-merges v1.1.0..dc5c1a1d
[...]
```
Co-authored-by: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>
Co-authored-by: Hans Johnson <hans.j.johnson@gmail.com>
Co-authored-by: Sam Horvath <sam.horvath@kitware.com>
Co-authored-by: Jean-Christophe Fillion-Robin <jcfr@kitware.com>
https://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1083Update getting_started.rst2019-01-29T14:54:19-05:00Sam HorvathUpdate getting_started.rst*Created by: spujol*
Test*Created by: spujol*
Testhttps://gitlab.kitware.com/sjh26/Slicer/-/merge_requests/1082Update getting_started.rst2019-01-29T05:39:37-05:00Sam HorvathUpdate getting_started.rst*Created by: spujol*
Test*Created by: spujol*
Testhttps://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).