Retrieving z-stack settings from Micro-manager MDA dialog?

I am using an acquisition script on my microscope that grabs settings from the MDA dialog and uses them to set up a hardware triggered acquisition. On an older version of Micro-Manager gamma(20200228) the following code will get me the z-stack dialog settings

settings = mm.acquisitions().getAcquisitionSettings()
z =settings.slices

in a newer version of Micro-manager(installed in parallel so I can move acquisition to micro-Magellan), settings.slices returns an empty array. I took a look at the javadocs and they seem to imply that what I want can be found in org.micromanager.acquisition.SequenceSettings.Builder, but that doesn’t seem to be working either. I’m hoping someone can point me at what I’m doing wrong?

Hi Kwasi,

I recently refactored SequenceSettings. My intentions were noble! Giving public access to fields in a Java class is generally not a good thing, so I likely changed that field to private (as nothing in the MM code was using it).

However, there is a public method to get the slices:

z = settings.slices()

should work.

Hope this helps!


Hi Niko,

I thought there might have been some refactoring. The perils of using software still under development I guess :slight_smile:

On the version of MM gamma I have installed(20201001), that doesn’t work either. Is it worth my upgrading to a newer version to try again?


You found a bug! It looks like most/all (?) settings were provided correctly, except for the slices. I fixed the bug (, which should be in tonight’s (20201015 and later) build.

Hi Nico, that seems to have fixed it, thanks!

1 Like

Hi @kkwakwa,

Great to hear!

Best, Nico