Difference between revisions of "Documentation/Nightly/Developers/Tutorials/MigrationGuide/ITK4-to-ITK5"
From Slicer Wiki
(Created page with "==Transition from ITK4 to ITK5== This section lists categories of code changes necessary to build Slicer with ITK 5. Each category has a short description, an example error me...") |
(Dead code after update to Qt > 5.6.0) |
||
Line 32: | Line 32: | ||
#include <mutex> | #include <mutex> | ||
std::mutex | std::mutex | ||
+ | |||
+ | ===Dead code after update to Qt >= 5.6.0=== | ||
+ | |||
+ | Remove any branch checking of QT_VERSION lesser than 5.6.0 | ||
+ | #if(QT_VERSION < QT_VERSION_CHECKS(5, 6, 0)) | ||
+ | // Modern Qt code | ||
+ | #include <QDesignerCustomWidgetInterface> | ||
+ | #else | ||
+ | // Dead code | ||
+ | #include <QtUiPlugin/QDesignerCustomWidgetInterface> | ||
+ | #endif | ||
+ | After cleaning: | ||
+ | #include <QDesignerCustomWidgetInterface> |
Revision as of 23:53, 7 March 2019
Home < Documentation < Nightly < Developers < Tutorials < MigrationGuide < ITK4-to-ITK5Contents
Transition from ITK4 to ITK5
This section lists categories of code changes necessary to build Slicer with ITK 5. Each category has a short description, an example error message, a suggested upgrade path, and references to relevant commits.
Referencing this list might be helpful if Slicer extensions require updates to be compatible with ITK 5.
Also check the ITK migration guide if more info is needed:
* https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/ITK5MigrationGuide.md (ITKv5 Migration Guide)
itkMultiThreader refactor
Replace lines like:
#include <itkMultiThreader.h> itk::MultiThreader::Pointer ProcessingThreader;
with:
#include <itkPlatformMultiThreader.h> itk::PlatformMultiThreader::Pointer ProcessingThreader;
SimpleFastMutexLock, FastMutexLock and MutexLock are deprecated
Instead use std::mutex available in C++11
Replace:
#include "itkSimpleFastMutexLock.h" #include "itkFastMutexLock.h" #include "itkMutexLock.h" SimpleFastMutexLock FastMutexLock MutexLock
with:
#include <mutex> std::mutex
Dead code after update to Qt >= 5.6.0
Remove any branch checking of QT_VERSION lesser than 5.6.0
#if(QT_VERSION < QT_VERSION_CHECKS(5, 6, 0)) // Modern Qt code #include <QDesignerCustomWidgetInterface> #else // Dead code #include <QtUiPlugin/QDesignerCustomWidgetInterface> #endif
After cleaning:
#include <QDesignerCustomWidgetInterface>