Skip to content
Snippets Groups Projects
Commit a76b53a4 authored by Stéphane  DALLONGEVILLE's avatar Stéphane DALLONGEVILLE
Browse files

Fixed error spamming on haralick features descriptor

parent ea7d3c1d
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
......@@ -654,6 +656,7 @@ public class ROIMeasures extends EzPlug implements ROIBlock, GlobalSequenceListe
}
Map<ROIDescriptor, Object>[] haralickTextureValues = null;
Set<String> haralickErrors = new HashSet<>();
if (Measures.INTENSITY_TEXTURE_ASM.isSelected() || Measures.INTENSITY_TEXTURE_CONT.isSelected()
|| Measures.INTENSITY_TEXTURE_ENT.isSelected() || Measures.INTENSITY_TEXTURE_HOMO.isSelected())
{
......@@ -673,8 +676,14 @@ public class ROIMeasures extends EzPlug implements ROIBlock, GlobalSequenceListe
}
catch (UnsupportedOperationException ex)
{
System.err.println("Could not compute Haralick texture descriptor");
ex.printStackTrace();
final String mess = ex.getMessage();
// we don't want to spam output with these errors
if (!haralickErrors.contains(mess))
{
haralickErrors.add(mess);
System.err.println(mess);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment