Skip to content

Commit

Permalink
Merge branch 'main' into POL5610_3d_glszm
Browse files Browse the repository at this point in the history
  • Loading branch information
friskluft authored Jan 2, 2025
2 parents 58f36da + 4cc7524 commit f180bc8
Show file tree
Hide file tree
Showing 18 changed files with 1,338 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_cuda11_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [windows-2019, ubuntu-20.04]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_cuda12_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [windows-2019, ubuntu-20.04]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
os: [ubuntu-20.04, macos-13, windows-latest]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_cuda11_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
os: [windows-2019, ubuntu-20.04]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_cuda12_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
os: [windows-2019, ubuntu-20.04]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ubuntu-20.04, macos-13, windows-latest]
cibw_archs: ["auto64"]
cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
matrix:
os: [macos-13-xlarge]
cibw_archs: ["arm64"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ set(SOURCE
src/nyx/features/3d_glcm.cpp
src/nyx/features/3d_glcm_nontriv.cpp
src/nyx/features/3d_glszm.cpp
src/nyx/features/3d_glrlm.cpp
src/nyx/features/3d_glrlm_nontriv.cpp
src/nyx/features/intensity.cpp
src/nyx/features/neighbors.cpp
src/nyx/features/ngldm.cpp
Expand Down
2 changes: 1 addition & 1 deletion ci-utils/install_prereq_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cd ../../
if [[ $BUILD_BOOST_DEP -eq 1 ]]; then
for i in {1..5}
do
curl -L https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2 -o boost_1_79_0.tar.bz2
curl -L https://archives.boost.io/release/1.79.0/source/boost_1_79_0.tar.bz2 -o boost_1_79_0.tar.bz2
if [ -f "boost_1_79_0.tar.bz2" ] ; then
break
fi
Expand Down
2 changes: 1 addition & 1 deletion ci-utils/install_prereq_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ popd

if "%BUILD_Z5_DEP%" == "1" (
for /l %%x in (1, 1, 5) do (
curl -L https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.zip -o boost_1_79_0.zip
curl -L https://archives.boost.io/release/1.79.0/source/boost_1_79_0.zip -o boost_1_79_0.zip
if exist boost_1_79_0.zip (
goto :continue_boost
)
Expand Down
115 changes: 115 additions & 0 deletions src/nyx/env_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,76 @@ bool Environment::expand_3D_featuregroup (const std::string& s)
return true;
}

if (s == Nyxus::theFeatureSet.findGroupNameByCode(Fgroup3D::FG3_GLCM))
{
theFeatureSet.enableAll (false);

auto F =
{
Nyxus::Feature3D::GLCM_ACOR,
Nyxus::Feature3D::GLCM_ASM,
Nyxus::Feature3D::GLCM_CLUPROM,
Nyxus::Feature3D::GLCM_CLUSHADE,
Nyxus::Feature3D::GLCM_CLUTEND,
Nyxus::Feature3D::GLCM_CONTRAST,
Nyxus::Feature3D::GLCM_CORRELATION,
Nyxus::Feature3D::GLCM_DIFAVE,
Nyxus::Feature3D::GLCM_DIFENTRO,
Nyxus::Feature3D::GLCM_DIFVAR,
Nyxus::Feature3D::GLCM_DIS,
Nyxus::Feature3D::GLCM_ENERGY,
Nyxus::Feature3D::GLCM_ENTROPY,
Nyxus::Feature3D::GLCM_HOM1,
Nyxus::Feature3D::GLCM_HOM2,
Nyxus::Feature3D::GLCM_ID,
Nyxus::Feature3D::GLCM_IDN,
Nyxus::Feature3D::GLCM_IDM,
Nyxus::Feature3D::GLCM_IDMN,
Nyxus::Feature3D::GLCM_INFOMEAS1,
Nyxus::Feature3D::GLCM_INFOMEAS2,
Nyxus::Feature3D::GLCM_IV,
Nyxus::Feature3D::GLCM_JAVE,
Nyxus::Feature3D::GLCM_JE,
Nyxus::Feature3D::GLCM_JMAX,
Nyxus::Feature3D::GLCM_JVAR,
Nyxus::Feature3D::GLCM_SUMAVERAGE,
Nyxus::Feature3D::GLCM_SUMENTROPY,
Nyxus::Feature3D::GLCM_SUMVARIANCE,
Nyxus::Feature3D::GLCM_VARIANCE,
Nyxus::Feature3D::GLCM_ASM_AVE,
Nyxus::Feature3D::GLCM_ACOR_AVE,
Nyxus::Feature3D::GLCM_CLUPROM_AVE,
Nyxus::Feature3D::GLCM_CLUSHADE_AVE,
Nyxus::Feature3D::GLCM_CLUTEND_AVE,
Nyxus::Feature3D::GLCM_CONTRAST_AVE,
Nyxus::Feature3D::GLCM_CORRELATION_AVE,
Nyxus::Feature3D::GLCM_DIFAVE_AVE,
Nyxus::Feature3D::GLCM_DIFENTRO_AVE,
Nyxus::Feature3D::GLCM_DIFVAR_AVE,
Nyxus::Feature3D::GLCM_DIS_AVE,
Nyxus::Feature3D::GLCM_ENERGY_AVE,
Nyxus::Feature3D::GLCM_ENTROPY_AVE,
Nyxus::Feature3D::GLCM_HOM1_AVE,
Nyxus::Feature3D::GLCM_ID_AVE,
Nyxus::Feature3D::GLCM_IDN_AVE,
Nyxus::Feature3D::GLCM_IDM_AVE,
Nyxus::Feature3D::GLCM_IDMN_AVE,
Nyxus::Feature3D::GLCM_IV_AVE,
Nyxus::Feature3D::GLCM_JAVE_AVE,
Nyxus::Feature3D::GLCM_JE_AVE,
Nyxus::Feature3D::GLCM_INFOMEAS1_AVE,
Nyxus::Feature3D::GLCM_INFOMEAS2_AVE,
Nyxus::Feature3D::GLCM_VARIANCE_AVE,
Nyxus::Feature3D::GLCM_JMAX_AVE,
Nyxus::Feature3D::GLCM_JVAR_AVE,
Nyxus::Feature3D::GLCM_SUMAVERAGE_AVE,
Nyxus::Feature3D::GLCM_SUMENTROPY_AVE,
Nyxus::Feature3D::GLCM_SUMVARIANCE_AVE
};

theFeatureSet.enableFeatures(F);
return true;
}
if (s == Nyxus::theFeatureSet.findGroupNameByCode(Fgroup3D::FG3_GLDZM))
{
theFeatureSet.enableAll (false);
Expand All @@ -465,6 +535,51 @@ bool Environment::expand_3D_featuregroup (const std::string& s)
return true;
}

if (s == Nyxus::theFeatureSet.findGroupNameByCode(Fgroup3D::FG3_GLRLM))
{
theFeatureSet.enableAll(false);

auto F =
{
Nyxus::Feature3D::GLRLM_SRE,
Nyxus::Feature3D::GLRLM_LRE,
Nyxus::Feature3D::GLRLM_GLN,
Nyxus::Feature3D::GLRLM_GLNN,
Nyxus::Feature3D::GLRLM_RLN,
Nyxus::Feature3D::GLRLM_RLNN,
Nyxus::Feature3D::GLRLM_RP,
Nyxus::Feature3D::GLRLM_GLV,
Nyxus::Feature3D::GLRLM_RV,
Nyxus::Feature3D::GLRLM_RE,
Nyxus::Feature3D::GLRLM_LGLRE,
Nyxus::Feature3D::GLRLM_HGLRE,
Nyxus::Feature3D::GLRLM_SRLGLE,
Nyxus::Feature3D::GLRLM_SRHGLE,
Nyxus::Feature3D::GLRLM_LRLGLE,
Nyxus::Feature3D::GLRLM_LRHGLE,

Nyxus::Feature3D::GLRLM_SRE_AVE,
Nyxus::Feature3D::GLRLM_LRE_AVE,
Nyxus::Feature3D::GLRLM_GLN_AVE,
Nyxus::Feature3D::GLRLM_GLNN_AVE,
Nyxus::Feature3D::GLRLM_RLN_AVE,
Nyxus::Feature3D::GLRLM_RLNN_AVE,
Nyxus::Feature3D::GLRLM_RP_AVE,
Nyxus::Feature3D::GLRLM_GLV_AVE,
Nyxus::Feature3D::GLRLM_RV_AVE,
Nyxus::Feature3D::GLRLM_RE_AVE,
Nyxus::Feature3D::GLRLM_LGLRE_AVE,
Nyxus::Feature3D::GLRLM_HGLRE_AVE,
Nyxus::Feature3D::GLRLM_SRLGLE_AVE,
Nyxus::Feature3D::GLRLM_SRHGLE_AVE,
Nyxus::Feature3D::GLRLM_LRLGLE_AVE,
Nyxus::Feature3D::GLRLM_LRHGLE_AVE
};

theFeatureSet.enableFeatures(F);
return true;
}

return false;
}

Expand Down
2 changes: 2 additions & 0 deletions src/nyx/feature_mgr_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "features/3d_glcm.h"
#include "features/3d_gldzm.h"
#include "features/3d_glszm.h"
#include "features/3d_glrlm.h"

#include "features/focus_score.h"
#include "features/power_spectrum.h"
Expand Down Expand Up @@ -76,6 +77,7 @@ FeatureManager::FeatureManager()
register_feature (new D3_GLCM_feature());
register_feature (new D3_GLDZM_feature());
register_feature (new D3_GLSZM_feature());
register_feature (new D3_GLRLM_feature());

// image quality
register_feature (new FocusScoreFeature());
Expand Down
4 changes: 1 addition & 3 deletions src/nyx/features/3d_gldzm.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#pragma once

#pragma once

#include "../feature_method.h"
#include "texture_feature.h"

/// @brief Grey Level Distance Zone (GLDZM) features
///
/// Grey Level Dsitance Zone (GLDZM) quantifies distances zones of same intensity to the ROI border
/// GLDZM quantifies distance zones of same intensity to the ROI border

class D3_GLDZM_feature : public FeatureMethod, public TextureFeature
{
Expand Down
Loading

0 comments on commit f180bc8

Please sign in to comment.