Skip to content

Commit

Permalink
Merge pull request #549 from girder/fix-stats-computation
Browse files Browse the repository at this point in the history
Sometimes the statistics weren't computed correctly.
  • Loading branch information
manthey authored Feb 19, 2021
2 parents 9a72f5e + e0c4efc commit abb8bc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utilities/converter/large_image_converter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ def compute_error_metrics(original, altered, results, converterOpts=None):
from tempfile import TemporaryDirectory
import skimage.metrics
import numpy
import large_image
import large_image_source_tiff

lastlog = 0
with TemporaryDirectory() as tempDir:
tempPath = os.path.join(tempDir, os.path.basename(original))
tempPath = os.path.join(tempDir, os.path.basename(original) + '.tiff')
orig = large_image_converter.convert(original, tempPath, compression='lzw')
tsOrig = large_image.getTileSource(orig)
tsOrig = large_image_source_tiff.TiffFileTileSource(orig)
numFrames = len(tsOrig.getMetadata().get('frames', [0]))
tsAlt = large_image.getTileSource(altered)
tsAlt = large_image_source_tiff.TiffFileTileSource(altered)
mse = 0
ssim = 0
ssim_count = 0
Expand Down

0 comments on commit abb8bc5

Please sign in to comment.