Skip to content

Commit

Permalink
Merge pull request #44 from tfehlmann/fix_op_multi_image
Browse files Browse the repository at this point in the history
Ensure that operations are the same when processing multiple images
  • Loading branch information
lacan authored Apr 12, 2024
2 parents 6ab889a + cc8ff7b commit e0ba95c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/qupath/ext/biop/cellpose/Cellpose2D.java
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,9 @@ public void saveTrainingImages() {
if (fullPreprocess.size() > 1)
fullPreprocess.add(ImageOps.Core.ensureType(PixelType.FLOAT32));

op = op.appendOps(fullPreprocess.toArray(ImageOp[]::new));
var opWithPreprocessing = op.appendOps(fullPreprocess.toArray(ImageOp[]::new));

ImageServer<BufferedImage> processed = ImageOps.buildServer(imageData, op, resolution, tileWidth, tileHeight);
ImageServer<BufferedImage> processed = ImageOps.buildServer(imageData, opWithPreprocessing, resolution, tileWidth, tileHeight);

LabeledImageServer labelServer = new LabeledImageServer.Builder(imageData)
.backgroundLabel(0, ColorTools.BLACK)
Expand Down

0 comments on commit e0ba95c

Please sign in to comment.