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.
Turn off Image Pyramid Generation or Add Channels more that two images at a time?
Dear Jason Dugas,
first of all, there is a very general way to suppress pyramid calculation:
second, there are some alternatives to add channels
I hope that these aspects can help you.
first of all, there is a very general way to suppress pyramid calculation:
Code: Select all
Zen.Processing.Options.IsImagePyramidEnabled = False
Code: Select all
image3 = Zen.Processing.Utilities.AddChannels(image1, image2)
image.AddChannel(image1)
Image.AddSubImage(image1, ...)
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
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