DataMedSci / yagit

The gamma index calculation library for radiation dose DICOM images
https://datamedsci.github.io/yagit/
GNU General Public License v3.0
2 stars 4 forks source link

new implementation #52

Closed michal367 closed 1 year ago

michal367 commented 1 year ago

New implementation of gamma index including:

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request introduces a variety of new files and updates for the 'yet Another Gamma Index Tool' project. It includes new source, header, and test files, as well as build and dependency management files. The key additions are the core library files for gamma index calculation (Gamma.cpp, Gamma.hpp, GammaParameters.hpp, and GammaResult.hpp) and associated data structures and utility classes (DoseData.hpp, DoseData.cpp, DataStructs.hpp, ImageData.hpp, ImageData.tpp, Image.hpp, and DataReader.hpp). Test files (test.cpp, test2.cpp, and test3.cpp) are also included for testing purposes. Furthermore, the pull request provides build instructions in the README.md file and related build scripts (bar.bat and CMakeLists.txt), a Conan package manager configuration file (conanfile.txt), and the addition of the GDCM dependency. Note that some files are marked as temporary and that there are recommendations to add newlines at the end of certain files to avoid potential issues.

reviewpad[bot] commented 1 year ago

Thank you @michal367 for this first contribution!

reviewpad[bot] commented 1 year ago

Reviewpad Report

:warning: Warnings

:bangbang: Errors

grzanka commented 1 year ago

On clean Linux installation fails:

grzanka@workspace:~/workspace/gi-yagit/build$ cmake ..
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR system filesystem
  unit_test_framework)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 (find_package_handle_standard_args)
  gi_core/CMakeLists.txt:26 (find_package)

-- Configuring incomplete, errors occurred!
See also "/data/grzanka/workspace/gi-yagit/build/CMakeFiles/CMakeOutput.log".
grzanka commented 1 year ago

OK, previous comment not valid, I was in a wrong directory. Now trying again:

grzanka@workspace:~/workspace/gi-yagit/new$ mkdir build && cd build
grzanka@workspace:~/workspace/gi-yagit/new/build$ cmake ..
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.23.0 or higher is required.  You are running version 3.16.3

-- Configuring incomplete, errors occurred!
grzanka@workspace:~/workspace/gi-yagit/new/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
grzanka commented 1 year ago

OK, works on newest Ubuntu:

grzanka@grzankax1:~/workspace/gi-yagit/new/build$ ./examples/gammaImage 
Reference image:
[[0.93, 0.95],
 [0.97, 1]]
size: (1, 2, 2)
offset: (0, 0, -1)
spacing: (0, 1, 1)
------------------------------
Evaluated image:
[[0.95, 0.97],
 [1, 1.03]]
size: (1, 2, 2)
offset: (0, -1, 0)
spacing: (0, 1, 1)
------------------------------
Gamma index image:
[[0.816496, 0.333333],
 [0.942809, 0.333333]]
GIPR: 100%
Gamma mean: 0.606493
Gamma min: 0.333333
Gamma max: 0.942809
grzanka@grzankax1:~/workspace/gi-yagit/new/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.04
Release:        23.04
Codename:       lunar
reviewpad[bot] commented 1 year ago

📈 Pull Request Metrics

💻 Coding Time: 3 minutes 🛻 Pickup Time: 14 days 👀 Review Time: 5 days