@@ -738,7 +738,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R
738
738
final DISTANCE_TYPE distanceType ,
739
739
final double ... weights )
740
740
{
741
- final U maxVal = tmp .getType ().copy ();
741
+ final U maxVal = tmp .getType ().createVariable ();
742
742
maxVal .setReal ( maxVal .getMaxValue () );
743
743
final Converter < B , U > converter = new BinaryMaskToCost <>( maxVal );
744
744
final RandomAccessible < U > converted = Converters .convert ( source , converter , maxVal .createVariable () );
@@ -792,7 +792,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R
792
792
final int nTasks ,
793
793
final double ... weights ) throws InterruptedException , ExecutionException
794
794
{
795
- final U maxVal = tmp .getType ().copy ();
795
+ final U maxVal = tmp .getType ().createVariable ();
796
796
maxVal .setReal ( maxVal .getMaxValue () );
797
797
final Converter < B , U > converter = new BinaryMaskToCost <>( maxVal );
798
798
final RandomAccessible < U > converted = Converters .convert ( source , converter , maxVal .createVariable () );
@@ -919,7 +919,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R
919
919
final RandomAccessibleInterval < V > target ,
920
920
final Distance d )
921
921
{
922
- final U maxVal = tmp .getType ().copy ();
922
+ final U maxVal = tmp .getType ().createVariable ();
923
923
maxVal .setReal ( maxVal .getMaxValue () );
924
924
final Converter < B , U > converter = new BinaryMaskToCost <>( maxVal );
925
925
final RandomAccessible < U > converted = Converters .convert ( source , converter , maxVal .createVariable () );
@@ -966,7 +966,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R
966
966
final ExecutorService es ,
967
967
final int nTasks ) throws InterruptedException , ExecutionException
968
968
{
969
- final U maxVal = tmp .getType ().copy ();
969
+ final U maxVal = tmp .getType ().createVariable ();
970
970
maxVal .setReal ( maxVal .getMaxValue () );
971
971
final Converter < B , U > converter = new BinaryMaskToCost <>( maxVal );
972
972
final RandomAccessible < U > converted = Converters .convert ( source , converter , maxVal .createVariable () );
0 commit comments