Skip to content

Commit

Permalink
add hack that allows to round MipmapResolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed May 10, 2024
1 parent de21157 commit 91993ed
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

public class Split_Views implements PlugIn
{
public static boolean roundMipmapResolutions = false;

public static long defaultImgX = 500;
public static long defaultImgY = 500;
public static long defaultImgZ = 200;
Expand Down Expand Up @@ -284,7 +286,8 @@ public static long[] findMinStepSize( final AbstractSpimData< ? > data )
for ( int d = 0; d < minStepSize.length; ++d )
{
if ( lowestResolution[ d ] % 1 != 0.0 )
throw new RuntimeException( "Downsampling has a fraction, cannot split dataset" );
if ( !roundMipmapResolutions )
throw new RuntimeException( "Downsampling has a fraction, cannot split dataset" );

minStepSize[ d ] = lowestCommonMultiplier( minStepSize[ d ], Math.round( lowestResolution[ d ] ) );
}
Expand Down

0 comments on commit 91993ed

Please sign in to comment.