Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion histomicstk/annotations_and_masks/review_gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import tempfile

import numpy as np
import pyvips
from imageio import imwrite
from PIL import Image

Expand Down Expand Up @@ -322,6 +321,7 @@ def create_review_galleries(
post request to upload the gallery to DSA.

"""
import pyvips
from pandas import DataFrame

if upload_results:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import pandas as pd
import pytest
import sqlalchemy as db
from sqlalchemy import text

from histomicstk.annotations_and_masks.annotation_database_parser import (
dump_annotations_locally, parse_annotations_to_local_tables)
Expand Down Expand Up @@ -67,6 +65,9 @@ class TestDatabaseParser:

def test_dump_annotations_locally_1(self):
"""Test dump annotations locally."""
import sqlalchemy as db
from sqlalchemy import text

savepath = tempfile.mkdtemp()

# recursively save annotations -- JSONs + sqlite for folders/items
Expand Down Expand Up @@ -98,6 +99,9 @@ def test_dump_annotations_locally_1(self):

def test_dump_annotations_locally_2(self):
"""Test dump annotations locally."""
import sqlalchemy as db
from sqlalchemy import text

savepath = tempfile.mkdtemp()

# recursively save annotations -- parse to csv + sqlite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import large_image
import numpy
import pyvips
import scipy
import skimage

Expand All @@ -20,6 +19,8 @@ def createSuperPixels(opts): # noqa
opts.callback, which is a function that takes (step_name: str,
step_count: int, step_total: int).
"""
import pyvips

averageSize = opts.superpixelSize ** 2
overlap = opts.superpixelSize * 4 * 2 if opts.overlap else 0
tileSize = opts.tileSize + overlap
Expand Down
Loading