Skip to content

Commit

Permalink
TTK patches
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-tierny committed May 6, 2023
1 parent ba8e296 commit f3c0a7c
Show file tree
Hide file tree
Showing 21 changed files with 155 additions and 317 deletions.
2 changes: 1 addition & 1 deletion CMake/ParaViewOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ if (NOT WIN32)
unset(_has_fortran)
endif()

vtk_deprecated_setting(python_default PARAVIEW_USE_PYTHON PARAVIEW_ENABLE_PYTHON OFF)
vtk_deprecated_setting(python_default PARAVIEW_USE_PYTHON PARAVIEW_ENABLE_PYTHON ON)
option(PARAVIEW_USE_PYTHON "Enable/Disable Python scripting support" "${python_default}")

# Currently, we're making `PARAVIEW_USE_QT` available only when doing CANONICAL
Expand Down
48 changes: 46 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ endif ()
get_property(generator_is_multi_config GLOBAL
PROPERTY GENERATOR_IS_MULTI_CONFIG)
if (NOT CMAKE_BUILD_TYPE AND NOT generator_is_multi_config)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE
PROPERTY
Expand Down Expand Up @@ -950,3 +950,47 @@ install(
if (PARAVIEW_ENABLE_EXAMPLES)
add_subdirectory(Examples)
endif ()

#-----------------------------------------------------------------------------
# Install TTK example data
install(FILES ${ParaView_SOURCE_DIR}/TTK/Data/Example1.vti
DESTINATION share/paraview-5.11/examples/
COMPONENT development)

install(FILES ${ParaView_SOURCE_DIR}/TTK/Data/Example2.vti
DESTINATION share/paraview-5.11/examples/
COMPONENT development)

install(FILES ${ParaView_SOURCE_DIR}/TTK/Data/Example3.vti
DESTINATION share/paraview-5.11/examples/
COMPONENT development)

#-----------------------------------------------------------------------------
# Generate a .deb package
set(CPACK_PACKAGE_NAME "TTK-ParaView")
set(CPACK_PACKAGE_FILE_NAME "ttk-paraview")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ParaView built with TTK patches")
set(CPACK_PACKAGE_CONTACT "Julien Tierny <[email protected]>")
set(CPACK_PACKAGE_VENDOR "CNRS, Sorbonne University and contributors")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://topology-tool-kit.github.io/")

option(TTK_PARAVIEW_HEADLESS_DEPS "Use headless TTK-ParaView dependencies for .deb packages" OFF)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3-dev")
if(TTK_PARAVIEW_HEADLESS_DEPS)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libopenmpi-dev, libosmesa-dev, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"qtbase5-dev, qtchooser, qt5-qmake, qtbase5-dev-tools, qttools5-dev, libqt5x11extras5-dev, qtxmlpatterns5-dev-tools, libqt5svg5-dev, libxt-dev, ${CPACK_DEBIAN_PACKAGE_DEPENDS}"
)
endif()

set(CPACK_PACKAGE_VERSION_MAJOR ${PARAVIEW_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PARAVIEW_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PARAVIEW_VERSION_PATCH})
# autogenerate dependency information
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# package will be installed under %ProgramFiles%\${CPACK_PACKAGE_INSTALL_DIRECTORY} on Windows
set(CPACK_PACKAGE_INSTALL_DIRECTORY "TTK-ParaView")
# let the installer uninstall previous installations on Windows
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
include(CPack)
6 changes: 3 additions & 3 deletions Clients/ParaView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ if (PARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION)
endif ()

if (DEFINED PARAVIEW_VERSION_NICKNAME)
set(paraview_version "${PARAVIEW_VERSION_NICKNAME}")
set(paraview_version "[TTK 1.1] ${PARAVIEW_VERSION_NICKNAME}")
else ()
set(paraview_version "${PARAVIEW_VERSION_FULL}")
set(paraview_version "[TTK 1.1] ${PARAVIEW_VERSION_FULL}")
endif ()
set(paraview_title "ParaView ${paraview_version}")
if (PARAVIEW_BRANCH)
Expand Down Expand Up @@ -65,7 +65,7 @@ paraview_client_add(
EXPORT "ParaViewClient"
APPLICATION_NAME "ParaView"
TITLE "${paraview_title}"
ORGANIZATION "ParaView"
ORGANIZATION "TTK"
VERSION "${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}.${PARAVIEW_VERSION_PATCH}"
${style_args}
MAIN_WINDOW_CLASS "ParaViewMainWindow"
Expand Down
Binary file modified Clients/ParaView/pvIcon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Clients/ParaView/pvIcon-22x22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Clients/ParaView/pvIcon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Clients/ParaView/pvIcon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Clients/ParaView/pvIcon-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Clients/ParaView/pvIcon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Clients/ParaView/pvIcon.ico
Binary file not shown.
166 changes: 31 additions & 135 deletions Qt/ApplicationComponents/Resources/UI/pqExampleVisualizationsDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,22 @@
<rect>
<x>0</x>
<y>0</y>
<width>682</width>
<height>666</height>
<width>996</width>
<height>420</height>
</rect>
</property>
<property name="windowTitle">
<string>ParaView Example Visualizations</string>
<string>TTK Example Visualizations</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Click on one of thumbnails below to load an example visualization&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="HotGasAnalysisExampleButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../pqApplicationComponents.qrc">
<normaloff>:/pqApplicationComponents/Thumbnails/HotGasAnalysisExample.png</normaloff>:/pqApplicationComponents/Thumbnails/HotGasAnalysisExample.png</iconset>
</property>
<property name="iconSize">
<size>
<width>300</width>
<height>225</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="HotGasAnalysisExampleDescription">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Data analysis of hot gas from Exodus II file&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
Expand All @@ -65,43 +32,17 @@
</font>
</property>
<property name="text">
<string>ParaView Example Visualizations</string>
<string>TTK Example Visualizations</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="WaveletExampleDescription">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Wavelet with volume rendering and contours&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="HeadSQExampleDescription">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Contouring CT scan of a head&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="TosExampleDescription">
<item row="3" column="0">
<widget class="QLabel" name="Example1Description">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sea surface temperatures&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Scalar data example</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
Expand All @@ -111,7 +52,7 @@
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<item row="8" column="0" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -122,9 +63,9 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="DiskOutRefExampleDescription">
<widget class="QLabel" name="Example2Description">
<property name="text">
<string>Exodus II file, Clip filter, Stream Tracer filter, Tube filter, Glyph filter</string>
<string>Bivariate scalar data example</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
Expand All @@ -134,55 +75,27 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="WaveletExampleButton">
<item row="3" column="2">
<widget class="QLabel" name="Example3Description">
<property name="text">
<string/>
<string>Uncertain data example</string>
</property>
<property name="icon">
<iconset resource="../pqApplicationComponents.qrc">
<normaloff>:/pqApplicationComponents/Thumbnails/WaveletExample.png</normaloff>:/pqApplicationComponents/Thumbnails/WaveletExample.png</iconset>
</property>
<property name="iconSize">
<size>
<width>300</width>
<height>225</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QPushButton" name="HeadSQExampleButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../pqApplicationComponents.qrc">
<normalon>:/pqApplicationComponents/Thumbnails/HeadSQExample.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>300</width>
<height>225</height>
</size>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="flat">
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QPushButton" name="TosExampleButton">
<item row="2" column="0">
<widget class="QPushButton" name="Example1Button">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../pqApplicationComponents.qrc">
<normalon>:/pqApplicationComponents/Thumbnails/TosExample.png</normalon>
<iconset>
<normalon>:/pqApplicationComponents/Thumbnails/Example1.png</normalon>
</iconset>
</property>
<property name="iconSize">
Expand All @@ -196,27 +109,14 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="CanExampleDescription">
<property name="text">
<string>Exodus II file with timesteps, Clip filter</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="DiskOutRefExampleButton">
<widget class="QPushButton" name="Example2Button">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/pqApplicationComponents/Thumbnails/DiskOutRefExample.png</normalon>
<normalon>:/pqApplicationComponents/Thumbnails/Example2.png</normalon>
</iconset>
</property>
<property name="iconSize">
Expand All @@ -230,15 +130,14 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="CanExampleButton">
<item row="2" column="2">
<widget class="QPushButton" name="Example3Button">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/pqApplicationComponents/Thumbnails/CanExample.png</normalon>
</iconset>
<iconset resource="../pqApplicationComponents.qrc">
<normaloff>:/pqApplicationComponents/Thumbnails/Example3.png</normaloff>:/pqApplicationComponents/Thumbnails/Example3.png</iconset>
</property>
<property name="iconSize">
<size>
Expand Down Expand Up @@ -267,12 +166,9 @@
</layout>
</widget>
<tabstops>
<tabstop>CanExampleButton</tabstop>
<tabstop>DiskOutRefExampleButton</tabstop>
<tabstop>HeadSQExampleButton</tabstop>
<tabstop>HotGasAnalysisExampleButton</tabstop>
<tabstop>WaveletExampleButton</tabstop>
<tabstop>TosExampleButton</tabstop>
<tabstop>Example1Button</tabstop>
<tabstop>Example2Button</tabstop>
<tabstop>Example3Button</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
Expand Down
18 changes: 6 additions & 12 deletions Qt/ApplicationComponents/Resources/pqApplicationComponents.qrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
<RCC>
<qresource prefix="/pqApplicationComponents">
<file>ExampleVisualizations/CanExample.pvsm</file>
<file>ExampleVisualizations/DiskOutRefExample.pvsm</file>
<file>ExampleVisualizations/HeadSQExample.pvsm</file>
<file>ExampleVisualizations/HotGasAnalysisExample.pvsm</file>
<file>ExampleVisualizations/TosExample.pvsm</file>
<file>ExampleVisualizations/WaveletExample.pvsm</file>
<file>Thumbnails/CanExample.png</file>
<file>Thumbnails/DiskOutRefExample.png</file>
<file>Thumbnails/HeadSQExample.png</file>
<file>Thumbnails/HotGasAnalysisExample.png</file>
<file>Thumbnails/TosExample.png</file>
<file>Thumbnails/WaveletExample.png</file>
<file>ExampleVisualizations/Example1.pvsm</file>
<file>ExampleVisualizations/Example2.pvsm</file>
<file>ExampleVisualizations/Example3.pvsm</file>
<file>Thumbnails/Example1.png</file>
<file>Thumbnails/Example2.png</file>
<file>Thumbnails/Example3.png</file>
</qresource>
</RCC>
Loading

0 comments on commit f3c0a7c

Please sign in to comment.