Skip to content

Commit 0ac45a1

Browse files
committed
filter out entities without normalized scores
1 parent fc8bb55 commit 0ac45a1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

colormipsearch-api/src/main/java/org/janelia/colormipsearch/model/CDMatchEntity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ void setNormalizedScore(Float normalizedScore) {
2727
this.normalizedScore = normalizedScore;
2828
}
2929

30+
public boolean hasNormalizedScore() {
31+
return normalizedScore != null;
32+
}
33+
3034
public Integer getMatchingPixels() {
3135
return matchingPixels;
3236
}

colormipsearch-tools/src/main/java/org/janelia/colormipsearch/cmd/dataexport/AbstractCDMatchesExporter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ List<CDMatchEntity<M, T>> selectBestMatchPerMIPPair(List<CDMatchEntity<? extends
107107
// one mask MIP ID may have multiple matches with the same target MIP ID
108108
// here we only keep the best target MIP ID for the mask MIP ID
109109
return cdMatchEntities.stream()
110+
.filter(CDMatchEntity::hasNormalizedScore)
110111
.filter(this::doesNotLookSuspicious)
111112
.collect(Collectors.collectingAndThen(
112113
Collectors.toMap(

0 commit comments

Comments
 (0)