Results 1 to 3 of 3

Thread: Tile Image Acquisition

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    6

    Tile Image Acquisition

    Dears ,

    need help on tiles Image acquisition .

    After positioning the stage manualy to a starting point , the stage moves 6000mic into the sample .
    How can i make this position to the starting point of a e.g. 5000mic x 4000mic MosaiX ?


    ## Remove all open documents
    Zen.Application.Documents.RemoveAll()

    Zen.Acquisition.StartLive()

    #Zen.Acquisition.AutoExposure()

    Zen.Application.Pause("Move stage to edge of sample ")

    ## get stage position
    posX = Zen.Devices.Stage.ActualPositionX
    posY = Zen.Devices.Stage.ActualPositionY
    posZ = Zen.Devices.Focus.ActualPosition

    ## move from current position 6000Ám in X
    Zen.Devices.Stage.MoveTo(posX + 6000,posY +0)

    #Zen.Acquisition.FindAutofocus()

    exp = ZenExperiment()

    exp.AddRectangleTileRegion(1,posX,posY,50000,40000 ,0)

    # here i get the error message " the block index is wrong , it must be between >= 0 and <= ExperimentBlocks.Count
    # ??? how can i set the present position in the ExperimentBlocks.Count , to start my MosaiX at this pos .


    thank you

    Kind regards


    Robert

  2. #2
    Administrator
    Join Date
    Oct 2017
    Posts
    6
    Dear Robert Nirnberger,

    we are sorry for the inconvenience, but the AddRectangleTileRegion method can only be used to modify an existing experiment, e.g.:

    ## Remove all open documents
    Zen.Application.Documents.RemoveAll()

    Zen.Acquisition.StartLive()

    #Zen.Acquisition.AutoExposure()

    Zen.Application.Pause("Move stage to edge of sample ")

    Zen.Acquisition.StopLive()

    ## get stage position
    posX = Zen.Devices.Stage.ActualPositionX
    posY = Zen.Devices.Stage.ActualPositionY
    posZ = Zen.Devices.Focus.ActualPosition

    ## move from current position 6000Ám in X
    Zen.Devices.Stage.MoveTo(posX + 6000,posY +0)

    #Zen.Acquisition.FindAutofocus()

    exp = Zen.Acquisition.Experiments.GetByName("test1.czexp ")
    exp.SetActive()
    exp.ClearTileRegionsAndPositions(0)
    exp.AddRectangleTileRegion(0, posX, posY, 50000, 40000 , posZ)

    I hope this helps!
    Kind regards.

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    6
    Thanks , it works fine .

    Of course i have to use the new Position as Input for the Experiment .


    ## Remove all open documents
    Zen.Application.Documents.RemoveAll()
    ##
    ## Show live image
    Zen.Acquisition.StartLive()
    ## Set exposure time (AutoExposure)
    ##Zen.Acquisition.AutoExposure()

    #Zen.Application.Pause("Fahren Sie den Tisch an den Nullpunkt!")

    ## get stage position
    posX = Zen.Devices.Stage.ActualPositionX
    posY = Zen.Devices.Stage.ActualPositionY
    posZ = Zen.Devices.Focus.ActualPosition

    ## show stage position info
    #stageinfo = 'Stage Pos X: ' + str(posX) + '\nStagePos Y: ' + str(posY)
    #Zen.Windows.Show(stageinfo)

    # move from current position 6000Ám in X
    Zen.Devices.Stage.MoveTo(posX + 6000,posY +0)

    newposX = Zen.Devices.Stage.ActualPositionX
    newposY = Zen.Devices.Stage.ActualPositionY
    newposZ = Zen.Devices.Focus.ActualPosition

    #Zen.Acquisition.FindAutofocus()

    exp = Zen.Acquisition.Experiments.GetByName("3x3Tiles.cz exp")
    exp.SetActive()
    exp.ClearTileRegionsAndPositions(0)
    exp.AddRectangleTileRegion(0, newposX, newposY, 3000, 2000 , newposZ)
    image = Zen.Acquisition.Execute(exp)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •