How do I decide orientation for background image import?¶
Use xy.png from sge_convert as your orientation reference. Compare your raw background image against this xy.png to determine whether your image needs rotation and/or flips before import_image.
Reference xy.png
Ensure xy.png is already georeferenced in a north-up view (see --north-up in sge_convert )
Recommended workflow¶
- Generate SGE reference image:
- Run
sge_convertwith--sge-visual --north-up. - Locate
xy.pngin the SGE output directory. - Open your background image and
xy.pngside by side. - Match major landmarks (tissue outline, empty corners, distinctive structures).
- Infer transform for
import_image: - Rotation:
--rotate 90,--rotate 180, or--rotate 270 - Flips:
--flip-horizontaland/or--flip-vertical - Run a quick trial import and verify overlap in the viewer.
- If needed, adjust transform and rerun.
Practical tips¶
- Start with rotation only; add flips only if left/right or up/down are mirrored.
- Rotation is applied before flips in
import_image. - Keep one transform per image source and reuse it for consistency.
See also: