diff --git a/CMakeLists.txt b/CMakeLists.txt index 13e8c4c..229e9b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,6 @@ if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4") set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt5Widgets REQUIRED QUIET) - find_package(Qt5Svg REQUIRED) else() find_package(Qt4 REQUIRED) include(${QT_USE_FILE}) @@ -60,7 +59,7 @@ if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4") qt5_wrap_ui(UISrcs ${UI_FILES} ) # CMAKE_AUTOMOC in ON so the MOC headers will be automatically wrapped. add_executable(Segmentor MACOSX_BUNDLE ${CXX_FILES} ${UISrcs} ${QT_WRAP} ${UI_RESOURCES}) - qt5_use_modules(Segmentor Core Gui Svg) + qt5_use_modules(Segmentor Core Gui) target_link_libraries(Segmentor ${VTK_LIBRARIES}) else() QT4_WRAP_UI(UISrcs ${UI_FILES}) diff --git a/Segmentor.qrc b/Segmentor.qrc index 11fa0fc..02e16f6 100644 --- a/Segmentor.qrc +++ b/Segmentor.qrc @@ -1,15 +1,15 @@ - icons/icon_overlay.svg - icons/icon_voxels.svg - icons/icon_outline.svg - icons/icon_smooth_surface.svg - icons/icon_smooth_normals.svg - icons/icon_plane.svg - icons/icon_filter_plane.svg - icons/icon_filter_neighbors.svg - icons/icon_filter_region.svg - icons/icon_dilate.svg - icons/icon_erode.svg + icons/icon_overlay.png + icons/icon_voxels.png + icons/icon_outline.png + icons/icon_smooth_surface.png + icons/icon_smooth_normals.png + icons/icon_plane.png + icons/icon_filter_plane.png + icons/icon_filter_neighbors.png + icons/icon_filter_region.png + icons/icon_dilate.png + icons/icon_erode.png \ No newline at end of file diff --git a/icons/icon_dilate.png b/icons/icon_dilate.png new file mode 100644 index 0000000..a7504b0 Binary files /dev/null and b/icons/icon_dilate.png differ diff --git a/icons/icon_erode.png b/icons/icon_erode.png new file mode 100644 index 0000000..358dac3 Binary files /dev/null and b/icons/icon_erode.png differ diff --git a/icons/icon_filter_neighbors.png b/icons/icon_filter_neighbors.png new file mode 100644 index 0000000..bf15c23 Binary files /dev/null and b/icons/icon_filter_neighbors.png differ diff --git a/icons/icon_filter_plane.png b/icons/icon_filter_plane.png new file mode 100644 index 0000000..ccb025f Binary files /dev/null and b/icons/icon_filter_plane.png differ diff --git a/icons/icon_filter_region.png b/icons/icon_filter_region.png new file mode 100644 index 0000000..c27259f Binary files /dev/null and b/icons/icon_filter_region.png differ diff --git a/icons/icon_outline.png b/icons/icon_outline.png new file mode 100644 index 0000000..2e72b46 Binary files /dev/null and b/icons/icon_outline.png differ diff --git a/icons/icon_overlay.png b/icons/icon_overlay.png new file mode 100644 index 0000000..a0c0adf Binary files /dev/null and b/icons/icon_overlay.png differ diff --git a/icons/icon_plane.png b/icons/icon_plane.png new file mode 100644 index 0000000..ade7798 Binary files /dev/null and b/icons/icon_plane.png differ diff --git a/icons/icon_smooth_normals.png b/icons/icon_smooth_normals.png new file mode 100644 index 0000000..201ba0e Binary files /dev/null and b/icons/icon_smooth_normals.png differ diff --git a/icons/icon_smooth_surface.png b/icons/icon_smooth_surface.png new file mode 100644 index 0000000..7bbe36f Binary files /dev/null and b/icons/icon_smooth_surface.png differ diff --git a/icons/icon_voxels.png b/icons/icon_voxels.png new file mode 100644 index 0000000..7870203 Binary files /dev/null and b/icons/icon_voxels.png differ diff --git a/qt/MainWindow.cxx b/qt/MainWindow.cxx index 057df08..228338a 100644 --- a/qt/MainWindow.cxx +++ b/qt/MainWindow.cxx @@ -435,17 +435,17 @@ void MainWindow::CreateToolBar() { //QActionGroup* filterModeGroup = new QActionGroup(this); //interactionModeGroup->setExclusive(false); - QAction* actionFilterPlane = new QAction(QIcon(":/icons/icon_filter_plane.svg"), "Filter to plane", this); + QAction* actionFilterPlane = new QAction(QIcon(":/icons/icon_filter_plane.png"), "Filter to plane", this); actionFilterPlane->setShortcut(QKeySequence("p")); actionFilterPlane->setCheckable(true); actionFilterPlane->setChecked(visualizationContainer->GetFilterMode() == FilterPlane); - QAction* actionFilterNeighbors = new QAction(QIcon(":/icons/icon_filter_neighbors.svg"), "Filter neighbors", this); + QAction* actionFilterNeighbors = new QAction(QIcon(":/icons/icon_filter_neighbors.png"), "Filter neighbors", this); actionFilterNeighbors->setShortcut(QKeySequence("k")); actionFilterNeighbors->setCheckable(true); actionFilterNeighbors->setChecked(visualizationContainer->GetFilterMode() == FilterNeighbors); - QAction* actionFilterRegion = new QAction(QIcon(":/icons/icon_filter_region.svg"), "Filter region", this); + QAction* actionFilterRegion = new QAction(QIcon(":/icons/icon_filter_region.png"), "Filter region", this); actionFilterRegion->setShortcut(QKeySequence("l")); actionFilterRegion->setCheckable(true); actionFilterRegion->setChecked(visualizationContainer->GetFilterMode() == FilterRegion); @@ -456,14 +456,14 @@ void MainWindow::CreateToolBar() { toolBar->addAction(actionEdit); toolBar->addSeparator(); toolBar->addWidget(CreateLabel("2D")); - toolBar->addAction(CreateActionIcon(":/icons/icon_overlay.svg", "Show overlay", "q", visualizationContainer->GetSliceView()->GetShowLabelSlice(), &MainWindow::on_actionOverlay)); - toolBar->addAction(CreateActionIcon(":/icons/icon_voxels.svg", "Show voxels", "w", visualizationContainer->GetSliceView()->GetShowVoxelOutlines(), &MainWindow::on_actionVoxels)); - toolBar->addAction(CreateActionIcon(":/icons/icon_outline.svg", "Show outlines", "e", visualizationContainer->GetSliceView()->GetShowRegionOutlines(), &MainWindow::on_actionOutline)); + toolBar->addAction(CreateActionIcon(":/icons/icon_overlay.png", "Show overlay", "q", visualizationContainer->GetSliceView()->GetShowLabelSlice(), &MainWindow::on_actionOverlay)); + toolBar->addAction(CreateActionIcon(":/icons/icon_voxels.png", "Show voxels", "w", visualizationContainer->GetSliceView()->GetShowVoxelOutlines(), &MainWindow::on_actionVoxels)); + toolBar->addAction(CreateActionIcon(":/icons/icon_outline.png", "Show outlines", "e", visualizationContainer->GetSliceView()->GetShowRegionOutlines(), &MainWindow::on_actionOutline)); toolBar->addSeparator(); toolBar->addWidget(CreateLabel("3D")); - toolBar->addAction(CreateActionIcon(":/icons/icon_smooth_normals.svg", "Smooth normals", "n", visualizationContainer->GetVolumeView()->GetSmoothShading(), &MainWindow::on_actionSmoothNormals)); - toolBar->addAction(CreateActionIcon(":/icons/icon_smooth_surface.svg", "Smooth surfaces", "s", visualizationContainer->GetVolumeView()->GetSmoothSurfaces(), &MainWindow::on_actionSmoothSurfaces)); - toolBar->addAction(CreateActionIcon(":/icons/icon_plane.svg", "Show plane", "o", visualizationContainer->GetVolumeView()->GetShowPlane(), &MainWindow::on_actionShowPlane)); + toolBar->addAction(CreateActionIcon(":/icons/icon_smooth_normals.png", "Smooth normals", "n", visualizationContainer->GetVolumeView()->GetSmoothShading(), &MainWindow::on_actionSmoothNormals)); + toolBar->addAction(CreateActionIcon(":/icons/icon_smooth_surface.png", "Smooth surfaces", "s", visualizationContainer->GetVolumeView()->GetSmoothSurfaces(), &MainWindow::on_actionSmoothSurfaces)); + toolBar->addAction(CreateActionIcon(":/icons/icon_plane.png", "Show plane", "o", visualizationContainer->GetVolumeView()->GetShowPlane(), &MainWindow::on_actionShowPlane)); toolBar->addSeparator(); toolBar->addWidget(CreateLabel("Filter")); toolBar->addAction(actionFilterPlane); @@ -471,8 +471,8 @@ void MainWindow::CreateToolBar() { toolBar->addAction(actionFilterRegion); toolBar->addSeparator(); toolBar->addWidget(CreateLabel("Edit")); - toolBar->addAction(CreateActionIcon(":/icons/icon_dilate.svg", "Dilate region", "c", &MainWindow::on_actionDilateRegion)); - toolBar->addAction(CreateActionIcon(":/icons/icon_erode.svg", "Erode region", "v",&MainWindow::on_actionErodeRegion)); + toolBar->addAction(CreateActionIcon(":/icons/icon_dilate.png", "Dilate region", "c", &MainWindow::on_actionDilateRegion)); + toolBar->addAction(CreateActionIcon(":/icons/icon_erode.png", "Erode region", "v",&MainWindow::on_actionErodeRegion)); // Need extra logic for interaction mode QObject::connect(actionNavigation, &QAction::triggered, this, &MainWindow::on_actionNavigation);