File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/main/java/qupath/ext/biop/cellpose Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ ext.qupathVersion = gradle.ext.qupathVersion
25
25
26
26
description = ' QuPath extension to use Cellpose'
27
27
28
- version = " 0.9.4 "
28
+ version = " 0.9.5 "
29
29
30
30
dependencies {
31
31
implementation " io.github.qupath:qupath-gui-fx:${ qupathVersion} "
Original file line number Diff line number Diff line change 31
31
import org .bytedeco .opencv .opencv_core .Mat ;
32
32
import org .locationtech .jts .geom .Envelope ;
33
33
import org .locationtech .jts .geom .Geometry ;
34
+ import org .locationtech .jts .geom .GeometryCollection ;
34
35
import org .locationtech .jts .index .strtree .STRtree ;
35
36
import org .locationtech .jts .simplify .VWSimplifier ;
36
37
import org .slf4j .Logger ;
@@ -609,14 +610,14 @@ private List<CandidateObject> filterDetections(Collection<CandidateObject> rawCa
609
610
retainedObjects .add (currentCandidate );
610
611
var envelope = envelopes .get (currentCandidate );
611
612
612
- var overlaps = (List <CandidateObject >) tree .query (envelope );
613
- for (var overlappingCandidate : overlaps ) {
613
+ List < CandidateObject > overlaps = (List <CandidateObject >) tree .query (envelope );
614
+ for (CandidateObject overlappingCandidate : overlaps ) {
614
615
if (overlappingCandidate == currentCandidate || skippedObjects .contains (overlappingCandidate ) || retainedObjects .contains (overlappingCandidate ))
615
616
continue ;
616
617
617
618
// If we have an overlap, try to keep the largest object
618
619
try {
619
- /*
620
+
620
621
var env = envelopes .get (overlappingCandidate );
621
622
if (envelope .intersects (env ) && currentCandidate .geometry .intersects (overlappingCandidate .geometry )) {
622
623
// Retain the nucleus only if it is not fragmented, or less than half its original area
@@ -645,8 +646,6 @@ private List<CandidateObject> filterDetections(Collection<CandidateObject> rawCa
645
646
skippedObjects .add (overlappingCandidate );
646
647
}
647
648
}
648
- */
649
- skippedObjects .add (overlappingCandidate );
650
649
651
650
} catch (Exception e ) {
652
651
skipErrorCount ++;
You can’t perform that action at this time.
0 commit comments