Skip to content

auto ROI

Rob Campbell edited this page Apr 30, 2020 · 3 revisions

This feature is under development. Everything below is subject to change.

Example

Load a preview stack, "take" a preview image, find the threshold, calculate and display the bounding boxes.

hBT.scanner.attachPreviewStack(pStack);
% press "Preview Scan" in the GUI
hBT.getThreshold

In the API we find:

>> hBT.autoROI

ans = 

  struct with fields:

    previewImages: [1x1 struct]
            stats: [1x1 struct]

>> hBT.autoROI.previewImages

ans = 

  struct with fields:

               imStack: [962x570 double]
                recipe: [1x1 recipe]
    voxelSizeInMicrons: 20
     tileSizeInMicrons: 966.6333
              nSamples: []
               fullFOV: 1

>> hBT.autoROI.stats           

ans = 

  struct with fields:

        origPixelSize: 20
    rescaledPixelSize: 50
             nSamples: []
             settings: [1x1 struct]
             roiStats: [1x1 struct]

>> 

You can now overlay the bounding boxes with hBTview.view_acquire.overlayLastBoundingBoxes. You can even overlay the tile pattern:

z=hBT.recipe.tilePattern(false,false,hBT.autoROI.stats.roiStats.BoundingBoxDetails);
hBTview.view_acquire.overlayTileGridOnImage(z)