Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3-dimensional GLCM #245

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O2")
#== GTest
option(RUN_GTEST "Downloads google unit test API and runs google test scripts to test Nyxus" OFF)


#==== Source files
set(SOURCE
src/nyx/arrow_output_stream.cpp
Expand Down Expand Up @@ -166,6 +165,8 @@ set(SOURCE
src/nyx/features/2d_geomoments_basic_nt.cpp
src/nyx/features/3d_intensity.cpp
src/nyx/features/3d_gldzm.cpp
src/nyx/features/3d_glcm.cpp
src/nyx/features/3d_glcm_nontriv.cpp
src/nyx/features/intensity.cpp
src/nyx/features/neighbors.cpp
src/nyx/features/ngldm.cpp
Expand Down
11 changes: 9 additions & 2 deletions src/nyx/env_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "features/neighbors.h"
#include "features/ngldm.h"
#include "features/ngtdm.h"
#include "features/3d_glcm.h"
#include "features/roi_radius.h"
#include "helpers/helpers.h"
#include "helpers/system_resource.h"
Expand Down Expand Up @@ -437,6 +438,14 @@ bool Environment::expand_3D_featuregroup (const std::string& s)
return true;
}

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

theFeatureSet.enableFeatures (D3_GLCM_feature::featureset);
return true;
}

if (s == Nyxus::theFeatureSet.findGroupNameByCode(Fgroup3D::FG3_GLDZM))
{
theFeatureSet.enableAll(false);
Expand Down Expand Up @@ -467,8 +476,6 @@ bool Environment::expand_3D_featuregroup (const std::string& s)
return true;
}



return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/nyx/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ bool Environment::parse_cmdline(int argc, char** argv)
}

// -- check if any feature is enablesd as a result of expanding user's choice
if (theFeatureSet.numOfEnabled() == 0)
if (theFeatureSet.numOfEnabled(dim()) == 0)
{
std::cerr << "Error: no features are selected. Stopping \n";
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 @@ -29,6 +29,7 @@
#include "features/zernike.h"

#include "features/3d_intensity.h"
#include "features/3d_glcm.h"
#include "features/3d_gldzm.h"

#include "features/focus_score.h"
Expand Down Expand Up @@ -71,6 +72,7 @@ FeatureManager::FeatureManager()
register_feature (new RadialDistributionFeature());
// 3D
register_feature (new D3_PixelIntensityFeatures());
register_feature (new D3_GLCM_feature());
register_feature (new D3_GLDZM_feature());

// image quality
Expand Down
Loading
Loading