Skip to content

Commit 9153bb7

Browse files
committed
env suffix in new version
1 parent 28293b3 commit 9153bb7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/java/fiji/plugin/appose/cellpose/Cellpose.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package fiji.plugin.appose.cellpose;
22

3+
import static fiji.plugin.appose.ApposeUtils.getBestTorchConfig;
34
import static fiji.plugin.appose.ApposeUtils.rawWraps;
45
import static fiji.plugin.appose.ApposeUtils.transferCalibration;
56
import static fiji.plugin.appose.ApposeUtils.useGlasbeyDarkLUT;
@@ -153,7 +154,8 @@ private static < T extends RealType< T > & NativeType< T > > List< Img< T > > ru
153154
*/
154155
public static < T extends RealType< T > & NativeType< T > > List< Img< T > > cellpose3( final ImgPlus< T > img, final Cellpose3Parameters params ) throws BuildException, IOException, InterruptedException, TaskException
155156
{
156-
final String envName = "cp3";
157+
String envSuffix = getBestTorchConfig();
158+
final String envName = "cp3" + envSuffix;
157159
final String pythonScriptPath = "/cp3.py";
158160
return run( img, params, pythonScriptPath, envName );
159161
}
@@ -214,7 +216,8 @@ public static ImagePlus[] cellpose3( final ImagePlus imp, final Cellpose3Paramet
214216
*/
215217
public static < T extends RealType< T > & NativeType< T > > List< Img< T > > cellpose4( final ImgPlus< T > img, final Cellpose4Parameters params ) throws BuildException, IOException, InterruptedException, TaskException
216218
{
217-
final String envName = "cp4";
219+
String envSuffix = getBestTorchConfig();
220+
final String envName = "cp4" + envSuffix;
218221
final String pythonScriptPath = "/cp4.py";
219222
return run( img, params, pythonScriptPath, envName );
220223
}

0 commit comments

Comments
 (0)