Results 1 to 6 of 6

Thread: Turn off Image Pyramid Generation or Add Channels more that two images at a time?

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    3

    Turn off Image Pyramid Generation or Add Channels more that two images at a time?

    Does anyone know of a way to turn off the automatic Image Pyramid generation in Zen that occurs every time a new image is generated? Specifically, I am running some macros that generate several threshold images and working towards generating a 20-channel image for subsequent complex analysis. Because Zen only lets you merge two images at a time (Add Channels), each merge involves generating an Image Pyramid for progressively larger and larger images (more channels), so tons of processing time spend on generating Image Pyramids for intermediate images that are discarded at the end of the script run. Not opening the images doesn't help, as Image Pyramid runs on any images temporarily stored in the RAM / buffer.

    Alternatively, if there was a way to use ADD CHANNELS or a similar command to merge multiple images at once into one multi-channel image, I would only have to generate the Image Pyramid for the final output, 20-channel image (which I am saving).

    Thanks for your help.

  2. #2
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    373
    Dear Jason Dugas,

    first of all, there is a very general way to suppress pyramid calculation:

    Code:
    Zen.Processing.Options.IsImagePyramidEnabled = False
    second, there are some alternatives to add channels

    Code:
    image3 = Zen.Processing.Utilities.AddChannels(image1, image2)
    
    image.AddChannel(image1)
    
    Image.AddSubImage(image1, ...)
    I hope that these aspects can help you.

  3. #3
    Junior Member
    Join Date
    Jan 2019
    Posts
    3

    Sadly these solutions didn't work

    Thanks for the suggestions. Unfortunately, these solutions didn't work for me.

    The IsImagePyramidEnabled function only turns off Image Pyramid generation for mid-sized images. Large images (which are what are slowing me down) are still getting Image Pyramid calculation (and that is what the Macro Object Model help states as well).

    For the suggested alternatives to AddChannels, all of those still only add ONE channel at a time. I was hoping there was a solution to add MULTIPLE, differently-named channels to an existing image all at once.

    Thanks in advance for any other suggestions.

    Jason

  4. #4
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    373
    IsImagePyramidEnabled
    Dear Jason Dugas,

    we are planning a Hotfix so that IsImagePyramidEnabled will work independent of the image size.

    Do you work with Zen blue 2.6 or is it possible for you to upgrade to this version?

  5. #5
    Junior Member
    Join Date
    Jan 2019
    Posts
    3
    I should be upgrading to 2.6 in the very near future, so that would be great. Do you know if there is any way to do the Add Channels (or similar function) with more than 2 images at a time? That would also be awesome and very useful.

    Thanks for the heads up!

    Jason

  6. #6
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    373
    having a way to Add more than 2 images
    The bottlenecks are reading, pixel access and writing.

    Therefore no real gain is expected when doing this process with multiple images at a time.

Posting Permissions

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