Skip to content

Commit

Permalink
expose blocksize for Lazy compute of CLLCN
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed Apr 10, 2024
1 parent 3b0c97a commit 79457d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,16 @@ protected static RandomAccessibleInterval<UnsignedByteType> filter(
final boolean invert,
final boolean normalizeContrast,
final int scaleIndex )
{
return filter(sourceRaw, invert, normalizeContrast, scaleIndex, new int[] {1024, 1024, 1} );
}

protected static RandomAccessibleInterval<UnsignedByteType> filter(
RandomAccessibleInterval<UnsignedByteType> sourceRaw,
final boolean invert,
final boolean normalizeContrast,
final int scaleIndex,
final int[] blocksize )
{
if ( invert )
sourceRaw = Converters.convertRAI(sourceRaw, (in,out) -> out.set( 255 - in.get() ), new UnsignedByteType() );
Expand All @@ -328,7 +338,7 @@ protected static RandomAccessibleInterval<UnsignedByteType> filter(

return Lazy.process(
sourceRaw,
new int[] {1024, 1024, 1},
blocksize,
new UnsignedByteType(),
AccessFlags.setOf(AccessFlags.VOLATILE),
cllcn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static void saveFullScaleBlock(final String n5PathInput,

final RandomAccessibleInterval<UnsignedByteType> filteredSource;
if (normalizeMethod == NormalizationMethod.LOCAL_CONTRAST) {
filteredSource = SparkGenerateFaceScaleSpace.filter(sourceRaw, invert, true, 0);
filteredSource = SparkGenerateFaceScaleSpace.filter(sourceRaw, invert, true, 0, blockSize );
} else if (normalizeMethod == NormalizationMethod.LAYER_INTENSITY) {
filteredSource = applyShifts(sourceRaw, shifts, invert);
} else {
Expand Down

0 comments on commit 79457d3

Please sign in to comment.