Skip to content

Commit

Permalink
Reorder sockets to maintain backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTripleV committed Mar 25, 2019
1 parent c696c89 commit 43d3ad1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public FindBlobsOperation(InputSocket.Factory inputSocketFactory, OutputSocket.F
this.inputSocket = inputSocketFactory.create(inputHint);
this.minAreaSocket = inputSocketFactory.create(minAreaHint);
this.circularitySocket = inputSocketFactory.create(circularityHint);
this.colorSocket = inputSocketFactory.create(colorHint);
this.convexitySocket = inputSocketFactory.create(convexityHint);
this.inertiaRatioSocket = inputSocketFactory.create(inertiaRatioHint);
this.colorSocket = inputSocketFactory.create(colorHint);

this.outputSocket = outputSocketFactory.create(blobsHint);
}
Expand All @@ -74,9 +74,10 @@ public List<InputSocket> getInputSockets() {
inputSocket,
minAreaSocket,
circularitySocket,
colorSocket,
//Sockets placed last to maintain backwards compatibility in deserialization
convexitySocket,
inertiaRatioSocket,
colorSocket
inertiaRatioSocket
);
}

Expand All @@ -93,10 +94,9 @@ public void perform() {
final Mat input = inputSocket.getValue().get();
final Number minArea = minAreaSocket.getValue().get();
final List<Number> circularity = circularitySocket.getValue().get();
final Boolean darkBlobs = colorSocket.getValue().get();
final List<Number> convexity = convexitySocket.getValue().get();
final List<Number> inertiaRatio = inertiaRatioSocket.getValue().get();
final Boolean darkBlobs = colorSocket.getValue().get();


final SimpleBlobDetector blobDetector = SimpleBlobDetector.create(new SimpleBlobDetector
.Params()
Expand Down

0 comments on commit 43d3ad1

Please sign in to comment.