Skip to content

MohamedKISSI/Code-Paper-A-Pratical-Solver-for-Scalar-Data-Topological-Simplification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Pratical Solver for Scalar Data Topological Simplification

This archive contains the exact code used for the manuscript referenced below.

"A Practical Solver for Scalar Data Topological Simplification"

Installation Note

Tested on Ubuntu 22.04.3 LTS.

You can follow the instructions below or perform the installation using the install.sh script. You should choose one of the following methods: either follow the instructions below or perform the installation using the install.sh script, but not both.

Installation via install.sh Script

  1. Make the script executable:

    • Open a terminal and navigate to the directory where install.sh is located.
    • Run the following command to make the script executable:
      chmod +x install.sh
  2. Run the script:

    • Execute the script by typing:
      ./install.sh

Step-by-Step Manual Installation

sudo apt-get install cmake-qt-gui libboost-system-dev libpython3.10-dev libxt-dev libxcursor-dev libopengl-dev
sudo apt-get install qttools5-dev libqt5x11extras5-dev libqt5svg5-dev qtxmlpatterns5-dev-tools 
sudo apt-get install python3-sklearn 
sudo apt-get install libsqlite3-dev 
sudo apt-get install gawk
sudo apt-get install git

Install Paraview

First, go to the root of this repository and run the following commands: (replace the 4 in make -j4 by the number of available cores on your system)

git clone https://github.com/topology-tool-kit/ttk-paraview.git
cd ttk-paraview
git checkout 5.10.1
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DCMAKE_INSTALL_PREFIX=../install ..
make -j4
make -j4 install

Some warnings are expected when using the make command, they should not cause any problems.

Stay in the build directory and set the environment variables: (replace 3.10 in python3.10 by your version of python)

PV_PREFIX=`pwd`/../install
export PATH=$PATH:$PV_PREFIX/bin
export LD_LIBRARY_PATH=$PV_PREFIX/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$PV_PREFIX/lib/python3.10/site-packages

Download Torch

Go in the root of this repository and run the following commands:

wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.13.1%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-1.13.1+cpu.zip

Install TTK

Go in the ttk-dev directory then run the following commands: (replace the 4 in make -j4 by the number of available cores on your system)

mkdir build && cd build
paraviewPath=`pwd`/../../ttk-paraview/install/lib/cmake/paraview-5.10
torchPath=`pwd`/../../libtorch/share/cmake/Torch/
cmake -DCMAKE_INSTALL_PREFIX=../install -DParaView_DIR=$paraviewPath -DTorch_DIR=$torchPath ..
make -j4
make -j4 install

Stay in the build directory and set the environment variables: (replace 3.10 in python3.10 by your version of python)

TTK_PREFIX=`pwd`/../install
export PV_PLUGIN_PATH=$TTK_PREFIX/bin/plugins/TopologyToolKit
export LD_LIBRARY_PATH=$TTK_PREFIX/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$PYTHONPATH:$TTK_PREFIX/lib/python3.10/site-packages

Get the results

Go in the root directory of this repository and extract the data:

tar xvJf aneurism.tar.xz

Create the folder that will store the execution results:

mkdir results

To reproduce the results from the tables from the manuscript for the "Aneurysm" dataset, please go to the scripts directory and enter the following commands:

chmod +x runScripts.sh

Running the experiments

./runScripts.sh

In the results folder, you will find a CSV file named "timePerformanceComparison.csv," showcasing a comparison of time performance between the baseline optimization method and our solver for the simplification setup described in the paper. Additionally, there is another CSV file named "optimizationQualityComparison.csv" presenting a comparison of optimization quality between the baseline method and our solver. Both approaches' optimized data are also available in VTI files within the same folder.

Expected Timing

The script is expected to take approximately 50 minutes to complete, depending on your system's performance.

Reference to Table 1

For a detailed comparison of performance and other metrics, please refer to Table 1 in the paper.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published