From 82798cdd3e48f40565571b53a3d2c1de79439e17 Mon Sep 17 00:00:00 2001 From: Ko Sugawara Date: Wed, 23 Oct 2024 22:56:39 +0900 Subject: [PATCH] fix: correct path resolution with root directory handling - Fixed the logic for resolving paths by using the root directory when it's not null. - If the root directory is null, the path is now resolved using the Cellprofiler column. --- src/main/java/org/embl/mobie/lib/data/ImageGridSources.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java b/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java index 0b436fd3..48f52f33 100644 --- a/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java +++ b/src/main/java/org/embl/mobie/lib/data/ImageGridSources.java @@ -133,7 +133,7 @@ else if ( isCellProfilerColumn( imageColumn, table ) ) for ( int rowIndex = 0; rowIndex < numRows; rowIndex++ ) { String fileName = table.getString( rowIndex, imageColumn ); - String folder = table.getString( rowIndex, folderColumn ); + String folder = root != null ? root : table.getString( rowIndex, folderColumn ); String path = IOHelper.combinePath( folder, fileName ); String imageName = createImageName( channelIndex, fileName ); nameToFullPath.put( imageName, applyPathMapping( pathMapping, path ) );