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

Added IBSI2 definitions in parameter file #1489

Merged
merged 3 commits into from
Mar 23, 2022
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: 3 additions & 0 deletions src/applications/FeatureExtraction/data/1_params_default.csv
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ LBP,Neighborhood,Int,0:27,27,The total number of neighbors to consider for compu
LBP,Type,Int,0:3,2,0: original LBP | 1: uniform LBP | 2: rotation invariant LBP | 3: uniform + rotation invariant LBP
Collage,Radius,Int,(1:9),1,Radius around the center voxel/pixel (if defined as float it is assumed to be in world coordinates and if as Integer it is assumed to be in image coordinates); currently disabled for lattice computation
Collage,Bins,Int,,20,The number of bins (FBN) or size of each bin (FBS) to calculate for the Histogram
IBSI2,Bins,Int,,20,The number of bins (FBN) or size of each bin (FBS) to calculate for the Histogram; currently unused for IBSI2
IBSI2,Radius,Int,(1:9),1,Radius around the center voxel which can be in mm as well (needs to be defined as float in same space as input image/mask); currently unused for IBSI2
IBSI2,Offset,String,[Individual:Average:Combined],Combined,Either individual offset values or averaged computation for individual offsets might not work); currently unused for IBSI2
Lattice,FullImage,Int,0:1,0,Whether computations across the entire image need to happen in addition to lattice
Lattice,Window,mm,0:ImageSize,6.3,Window of single lattice node (number based on experiments by CBIG) - should be same as Step for non-overlapping tiles
Lattice,Step,mm,0:ImageSize,6.3,Step size to increase for consecutive lattice node (number based on experiments by CBIG) - should be same as Step for non-overlapping tiles
Expand Down
2 changes: 1 addition & 1 deletion src/applications/FeatureExtraction/src/FeatureExtraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ enum FeatureFamily

static const char FeatureFamilyString[FeatureMax + 1][20] =
{ "Generic", "Intensity", "Histogram", "Volumetric", "Morphologic", "GLCM", "GLRLM", "GLSZM", "NGTDM", "NGLDM", "LBP",
"Collage", "Lattice", "FractalDimension", "GaborWavelets", "Laws", "EdgeEnhancement", "PowerSpectrum", "FeatureMax" };
"Collage", "IBSI2", "Lattice", "FractalDimension", "GaborWavelets", "Laws", "EdgeEnhancement", "PowerSpectrum", "FeatureMax" };

/**
\brief FeatureExtraction Class -The main class structure enclosing all the feature calculations functions.
Expand Down
10 changes: 5 additions & 5 deletions src/applications/FeatureExtraction/src/FeatureExtraction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2972,32 +2972,32 @@ void FeatureExtraction< TImage >::Update()
if (TImage::ImageDimension == 3)
{
std::string currentFeatureFamily = FeatureFamilyString[f];
CalculateCOLLAGE(currentInputImage_patch, currentMask_patch, std::get<4>(temp->second));
CalculateIBSI2(currentInputImage_patch, currentMask_patch, std::get<4>(temp->second));
WriteFeatures(m_modality[i], allROIs[j].label, currentFeatureFamily, std::get<4>(temp->second),
"Axis=3D;Dimension=3D;Bins=" + m_Bins_string + ";Directions=" + std::to_string(m_Direction) +
";Radius=" + m_Radius_string, m_currentLatticeCenter, writeFeatureMapsAndLattice, allROIs[j].weight);

if (!writeFeatureMapsAndLattice && m_SliceComputation)
{
CalculateCOLLAGE(currentInputImage_patch, currentMask_patch_axisImages[0], std::get<4>(temp->second));
CalculateIBSI2(currentInputImage_patch, currentMask_patch_axisImages[0], std::get<4>(temp->second));
WriteFeatures(m_modality[i], allROIs[j].label, currentFeatureFamily + "_X", std::get<4>(temp->second),
"Axis=X;Dimension=2D;Bins=" + m_Bins_string + ";Directions=" + std::to_string(m_Direction) +
";Radius=" + m_Radius_string, m_currentLatticeCenter, writeFeatureMapsAndLattice, allROIs[j].weight);

CalculateCOLLAGE(currentInputImage_patch, currentMask_patch_axisImages[1], std::get<4>(temp->second));
CalculateIBSI2(currentInputImage_patch, currentMask_patch_axisImages[1], std::get<4>(temp->second));
WriteFeatures(m_modality[i], allROIs[j].label, currentFeatureFamily + "_Y", std::get<4>(temp->second),
"Axis=Y;Dimension=2D;Bins=" + m_Bins_string + ";Directions=" + std::to_string(m_Direction) +
";Radius=" + m_Radius_string, m_currentLatticeCenter, writeFeatureMapsAndLattice, allROIs[j].weight);

CalculateCOLLAGE(currentInputImage_patch, currentMask_patch_axisImages[2], std::get<4>(temp->second));
CalculateIBSI2(currentInputImage_patch, currentMask_patch_axisImages[2], std::get<4>(temp->second));
WriteFeatures(m_modality[i], allROIs[j].label, currentFeatureFamily + "_Z", std::get<4>(temp->second),
"Axis=2;Dimension=2D;Bins=" + m_Bins_string + ";Directions=" + std::to_string(m_Direction) +
";Radius=" + m_Radius_string, m_currentLatticeCenter, writeFeatureMapsAndLattice, allROIs[j].weight);
}
}
else
{
CalculateCOLLAGE(currentInputImage_patch, currentMask_patch, std::get<4>(temp->second));
CalculateIBSI2(currentInputImage_patch, currentMask_patch, std::get<4>(temp->second));
WriteFeatures(m_modality[i], allROIs[j].label, currentFeatureFamily, std::get<4>(temp->second),
"Axis=" + m_Axis + ";Dimension=" + std::to_string(m_Dimension) + ";Bins=" + m_Bins_string + ";Directions=" + std::to_string(m_Direction) +
";Radius=" + m_Radius_string, m_currentLatticeCenter, writeFeatureMapsAndLattice);
Expand Down