How do I decide orientation for background image import?¶
Use the SGE visualization from sge_convert as your orientation reference. Compare your raw background image against it to determine whether the image needs rotation and/or flips before it is imported.
Use the north-up reference
sge_convert --sge-visual --north-up writes xy_northup.tif (next to xy.png), the SGE rendered in the north-up view that CartoScope displays. Compare against xy_northup.tif, not xy.png.
Recommended workflow¶
- Generate SGE reference image:
- Run
sge_convertwith--sge-visual --north-up. - Locate
xy_northup.tifin the SGE output directory. - Open your background image and
xy_northup.tifside by side. - Match major landmarks (tissue outline, empty corners, distinctive structures).
- Infer the transform:
- 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.
Applying the transform¶
import_image:--rotate 90|180|270,--flip-horizontal,--flip-vertical.run_together: the same transform as therotate,flip_horizontal, andflip_verticalkeys of the image's entry (--image, the--imagessheet, or the config). See Image Modalities for which image kinds honor them.
Practical tips¶
- Start with rotation only; add flips only if left/right or up/down are mirrored.
- Rotation is applied before flips.
- Keep one transform per image source and reuse it for consistency.
See also: