Skip to content

Commit 6603f5e

Browse files
committed
Fixed importImage returning Image ID instead of Pixel ID.
1 parent fa2a4d4 commit 6603f5e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/fr/igred/omero/annotations/TableWrapper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ private static ROIData[] createROIColumn(ResultsTable results,
214214
}
215215
}
216216

217-
218217
String[] headings = results.getHeadings();
219218

220219
if (results.columnExists("ROI")) {

src/main/java/fr/igred/omero/repository/DatasetWrapper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import java.util.concurrent.ExecutionException;
5353
import java.util.concurrent.ExecutorService;
5454
import java.util.concurrent.Executors;
55+
import java.util.stream.Collectors;
5556

5657
import static fr.igred.omero.exception.ExceptionHandler.handleServiceOrAccess;
5758

@@ -489,8 +490,8 @@ public List<Long> importImage(Client client, String path) throws Exception {
489490
refresh(client);
490491

491492
List<Long> ids = new ArrayList<>(pixels.size());
492-
pixels.forEach(pix -> ids.add(pix.getId().getValue()));
493-
return ids;
493+
pixels.forEach(pix -> ids.add(pix.getImage().getId().getValue()));
494+
return ids.stream().distinct().collect(Collectors.toList());
494495
}
495496

496497

0 commit comments

Comments
 (0)