Zerene Stacker now has slabbing built in

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Zerene Stacker now has slabbing built in

Post by rjlittlefield »

Just wanted to mention that the latest beta of Zerene Stacker also includes a slabbing capability.

Primary motivation for this feature is that last year's major update of macOS, to 10.15 "Catalina", broke BugSlabber. (The issue is that BugSlabber is a 32-bit application, and Catalina only allows 64-bit apps.)

Main limitations of the slabbing capability in Zerene Stacker are that there's no GUI yet to select DMap or to specify how or where the saved images are written. Those options are preset to be PMax, with 16-bit TIFF images saved inside the project, to the SavedImages folder. Contrary to appearances, changing the "Save in" setting that appears in the Batch Queue dialog will probably not change what the slabbing tasks actually do with their images. [Edited to add: these problems are fixed in the T2020-04-04-1104-beta, described below.]

To use the built-in slabbing, first proceed as usual to the point where you have loaded source files, aligned them, and saved a project.

Then instead of running Bugslabber and loading the script that it makes, do this:
  1. In the Zerene Stacker menu bar, click on Batch > Slabbing... to open the Slabbing panel of the Preferences dialog.
  2. In the Slabbing panel, adjust the slab size and overlap as required.
  3. Click OK to close the Preferences dialog. This results in silently constructing a bunch of batch tasks to create the slices.
  4. In the menu bar, click on Batch > Show Batch Dialog. You should see one batch of tasks, one task per slab.
  5. Run All Batches
Then proceed as you would have with Bugslabber:
  • Be sure that there's a checkmark on Options > Preferences > Preprocessing > "Add files to existing project as already aligned".
  • Look into the SavedImages subfolder of the project.
  • Select the slab outputs,.
  • Drag those into the Zerene Stacker Input Files List.
After the slab outputs are loaded into Zerene Stacker, then you can select just those and run Stack Selected to generate final output. This leaves the original source files, plus the slab outputs, all available as source for retouching.

Edited to add: I've just now noticed that the above workflow will not work correctly if you have selected any of Pre-rotation, Pre-cropping, or Pre-sizing, at Options > Preferences > Preprocessing. That's because the slab outputs will already have those transformations applied to them, and loading them as inputs will result in a mismatch between the original sources and the slab outputs. This same restriction has always applied, but I was not aware of it. I consider it to be a long-standing bug, to be fixed at some time in the future. But for the moment, the only way to handle slab outputs that have been generated with any of the Pre-transformations is to load them into a new project with those transformations turned off.

Feedback solicited, of course.

--Rik

[Edit: March 30, 2020, 8 PM my time, to document problems.]
[Edit: April 4, 2020, 3:30 PM my time, to provide more realistic title per new beta described below.]
Last edited by rjlittlefield on Sat Apr 04, 2020 3:34 pm, edited 2 times in total.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

The latest beta Build T2020-04-04-1104-beta takes care of most of the problems mentioned above.

In the Preferences > Slabbing panel, you can now select PMax versus DMap, and you can specify where the output images are to be saved.

If the Preferences dialog was opened via Batch > Slabbing, then the Image Saving panel is renamed to be Slab Saving, and there you can select JPEG vs TIFF, the naming template for the slab outputs, and so on.

It also works to change the location for saving, in the Batch dialog, after the slabbing tasks have been generated.

--Rik

Lou Jost
Posts: 5943
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Fantastic, this is great! How do we get this update? I have a 2018 build. When I select "Check for Updates" it says there are none.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

How do we get this update? I have a 2018 build. When I select "Check for Updates" it says there are none.
Visit https://zerenesystems.com/cms/stacker/s ... urrentbeta .

Download and install from there will put you on the beta channel.

When you're on the beta channel, then if you're connected to the Internet and you're doing update checks, you'll get early notifications of new betas, before I finally get confident enough to push a beta notification onto the standard channel.

--Rik

svalley
Posts: 343
Joined: Sun Dec 03, 2006 7:07 pm
Location: Albany, Oregon

Post by svalley »

Thanks for adding this Rik!

I ran it last night on a stack and oddly the slabs disappeared and the project was not saved.

This morning I ran it again and it saved the slabs correctly and I saved the project manually just to be sure.

My workflow has been to Align and Stack All (P{Max) in Batch.
Reload the project and run the slab scripts created by Bugslabber.

Most days I shoot multiple stacks and then process them overnight. Right now the workflow requires 2 separate processes in Zerene. Why can't the alignment operation and the slab producing operation both be sequences in the same script or sequential scripts?

Steve
"You can't build a time machine without weird optics"
Steve Valley - Albany, Oregon

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

svalley wrote:Why can't the alignment operation and the slab producing operation both be sequences in the same script or sequential scripts?
They can, with a bit of awkwardness at the user level.

The recipe goes like this:
  1. Load image files.
  2. Batch > Slabbing
  3. Select the one batch in the Queued Batches panel at the bottom of the Batch Queue dialog.
  4. In the Stacking Tasks panel, click the Add button.
  5. Check-mark Align All Frames and click OK.
  6. Scroll to bottom of the list of Stacking Tasks and select the Align All that appears there.
  7. Click the "Up" button to move Align Tasks one step up in the list.
  8. Keep clicking the Up button until it becomes gray and unclickable because Align All has reached the top.
  9. (Scroll to top of the list of tasks and see that Align All Tasks is now the first task.)
  10. Click "Save Batch To Queue".
At this point you have a set of tasks that should be applicable to any project that has the same number of source files. So if you had, say, 10 folders each containing a stack of the same size, then you could delete %CurrentProject% from the list of Projects & Image Folders, add the folders to be worked on, and run the whole batch at one go. At least I think that will work. Have to confess that I haven't tried it yet.

The reason for having to mess around with an explicit Align All task is that things get weird if the stack order gets reversed via Automatic Order, after the slabs start to get processed. That's caused by a problem with internal bookkeeping that ends up processing the first slab using source files that are effectively selected "by name" but the other slabs "by index", eventually resulting in some frames getting stacked out of order, some twice, and some not at all. You don't want to go there.

In the next beta I'll arrange for the Align All Frames task to be generated automatically.

In the longer run, I want to get things working so that the slabbing script generation can itself be specified as a batch operation. The imagined workflow would be to allow writing a single generic script that would take a folder containing an indefinite number of source files and produce from it a project with slabs already generated and loaded, and the slabs stacked also. I expect that's a lot more than I can get done this week, though.

--Rik

svalley
Posts: 343
Joined: Sun Dec 03, 2006 7:07 pm
Location: Albany, Oregon

Post by svalley »

I expect that's a lot more than I can get done this week, though.
I have faith in you! :D

Thanks for doing this, it will certainly improve my overnight computations.

Steve
"You can't build a time machine without weird optics"
Steve Valley - Albany, Oregon

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

The latest beta for Batch > Slabbing now always includes an explicit Align All task, which should avoid the awkwardness mentioned above.

If the images are already aligned, the task realizes that and does not repeat any processing.

--Rik

Post Reply Previous topicNext topic