Skip to content

Commit

Permalink
ExportBestFlatImage: adapt to new method calls in ExportUnsignedByte.
Browse files Browse the repository at this point in the history
  • Loading branch information
acardona committed Apr 6, 2018
1 parent 1b0fa18 commit a3f3228
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public ByteProcessor makeFlatGrayImage()
{
// Use mipmaps directly: they are already Gaussian-downsampled
// (TODO waste: generates an alpha mask that is then not used)
return ExportUnsignedByte.makeFlatImage( patches, finalBox, 0, scale ).a;
return ExportUnsignedByte.makeFlatImageFromMipMaps( patches, finalBox, 0, scale ).a;
}

// Else: no mipmaps
Expand Down Expand Up @@ -257,7 +257,7 @@ public Pair<ByteProcessor, ByteProcessor> makeFlatGrayImageAndAlpha()
if ( loader.isMipMapsRegenerationEnabled() )
{
// Use mipmaps directly: they are already Gaussian-downsampled
return ExportUnsignedByte.makeFlatImage( patches, finalBox, 0, scale );
return ExportUnsignedByte.makeFlatImageFromMipMaps( patches, finalBox, 0, scale );
}

// Else: no mipmaps
Expand Down Expand Up @@ -338,7 +338,7 @@ public Pair<FloatProcessor, FloatProcessor> makeFlatFloatGrayImageAndAlpha()
if ( loader.isMipMapsRegenerationEnabled() )
{
// Use mipmaps directly: they are already Gaussian-downsampled
final Pair<ByteProcessor, ByteProcessor> pair = ExportUnsignedByte.makeFlatImage( patches, finalBox, 0, scale );
final Pair<ByteProcessor, ByteProcessor> pair = ExportUnsignedByte.makeFlatImageFromMipMaps( patches, finalBox, 0, scale );
return new Pair<FloatProcessor, FloatProcessor>(
pair.a.convertToFloatProcessor(),
pair.b.convertToFloatProcessor() );
Expand All @@ -354,6 +354,9 @@ public Pair<FloatProcessor, FloatProcessor> makeFlatFloatGrayImageAndAlpha()
// Double width, not double height: 2 images
loader.releaseAll();


// TODO problem: takes a long time to map the intensities
// Instead, it should map images to 8-bit and make a flat image from that
final Pair<ShortProcessor, ByteProcessor> pair = ExportUnsignedShort.makeFlatImage( patches, finalBox, 0, scaleUP, true );

loader.releaseAll();
Expand Down

0 comments on commit a3f3228

Please sign in to comment.