Skip to content

Commit b5c261d

Browse files
committed
Allow preview_slide to use any image reader (fileseries etc.)
1 parent 7280978 commit b5c261d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ashlar/scripts/preview_slide.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import matplotlib.patches as mpatches
99
import matplotlib.text as mtext
1010
from .. import reg, utils
11+
from ..scripts import ashlar as ascript
1112

1213

1314
def main(argv=sys.argv):
@@ -40,9 +41,18 @@ def main(argv=sys.argv):
4041
"-l", "--log", action="store_true", help="Log-transform pixel intensities"
4142
" (helps visualize dim images)",
4243
)
44+
parser.add_argument(
45+
'--flip-x', default=False, action='store_true',
46+
help='Flip tile positions left-to-right',
47+
)
48+
parser.add_argument(
49+
'--flip-y', default=False, action='store_true',
50+
help='Flip tile positions top-to-bottom',
51+
)
4352
args = parser.parse_args()
4453

45-
reader = reg.BioformatsReader(args.input)
54+
reader = ascript.build_reader(args.input)
55+
ascript.process_axis_flip(reader, args.flip_x, args.flip_y)
4656
metadata = reader.metadata
4757

4858
resolution_scale = 1 / args.downsample

0 commit comments

Comments
 (0)