Looking for up-to-date ScanImage documentation? That has moved here: docs.scanimage.org

Icon
This documentation is for a legacy ScanImage version. The current documentation is ScanImage 2019.
Skip to end of metadata
Go to start of metadata
Icon

For an overview of the ScanImage Roi concept, please review the article Scanfields, ROIs, ROI Groups.

For an overview of the RoiGroup and Roi API, please review the article RoiGroup & Roi

Rotated Rectangle Imaging Scanfield

For imaging with a rectangular scanpattern, ScanImage uses the Scanfield 'RotatedRectangle'. The following paramters define this Scanfield:

Rotated Rectangle Imaging Scanfield

Pixel Positions in Reference Space

Icon

Review the article ScanImage Coordinate Systems to learn more about the different coordinate spaces used in ScanImage.

Scanfields of type RotatedRectangle have two associated affine matrices that allow coordinate space conversions

  • pixelToRefTransfrom - transform pixel coordinates to reference space
  • affine - transform scanfield coordinates to reference space

 

Pixel To Reference Space Transform
Pixel Coordinates in a Rotated Rectangle

Pixel coordinates within a RotatedRectangle. The pixel coordinates change when the resolution of the scanfield is changed.

RoiManager

All imaging RoiGroups are managed by the ScanImage component hSI.hRoiManager. This component contains two RoiGroups:

  • hSI.hRoiManager
    • hSI.hRoiManager.roiGroupDefault (default, used for non-mRoi imaging)
    • hSI.hRoiManager.roiGroupMroi (used for mRoi imaging)

hSI.hRoiManager.currentRoiGroup returns one of this roiGroups, depending if hSI.hRoiManager.mroiEnable is set to True or False

Icon

Do not change hSI.hRoiManager.roiGroupDefault directly. The scanfield of this RoiGroup is configured automatically by ScanImage using the following properties in hSI.hRoiManager:

hSI.hRoiManager.pixelsPerLine
hSI.hRoiManager.linesPerFrame
hSI.hRoiManager.scanZoomFactor
hSI.hRoiManager.scanRotation
hSI.hRoiManager.scanAngleMultiplierSlow
hSI.hRoiManager.scanAngleMultiplierFast
hSI.hRoiManager.scanAngleShiftSlow
hSI.hRoiManager.scanAngleShiftFast
hSI.hRoiManager.forceSquarePixelation
hSI.hRoiManager.forceSquarePixels

Use hSI.hRoiManager.roiGroupDefault.rois(1).scanfields(1) to inspect the current scanning paramters

  • No labels