Skip to content

Commit

Permalink
Allow preview_slide to use any image reader (fileseries etc.)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuhlich committed Mar 20, 2023
1 parent 7280978 commit b5c261d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ashlar/scripts/preview_slide.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import matplotlib.patches as mpatches
import matplotlib.text as mtext
from .. import reg, utils
from ..scripts import ashlar as ascript


def main(argv=sys.argv):
Expand Down Expand Up @@ -40,9 +41,18 @@ def main(argv=sys.argv):
"-l", "--log", action="store_true", help="Log-transform pixel intensities"
" (helps visualize dim images)",
)
parser.add_argument(
'--flip-x', default=False, action='store_true',
help='Flip tile positions left-to-right',
)
parser.add_argument(
'--flip-y', default=False, action='store_true',
help='Flip tile positions top-to-bottom',
)
args = parser.parse_args()

reader = reg.BioformatsReader(args.input)
reader = ascript.build_reader(args.input)
ascript.process_axis_flip(reader, args.flip_x, args.flip_y)
metadata = reader.metadata

resolution_scale = 1 / args.downsample
Expand Down

0 comments on commit b5c261d

Please sign in to comment.