Interface TiledDataOpenerPlugin

All Superinterfaces:
MMGenericPlugin, MMPlugin, org.scijava.plugin.SciJavaPlugin

public interface TiledDataOpenerPlugin extends MMPlugin
Opens a tiled (pyramidal) dataset in a viewer of its own choosing.

Micro-Manager's built-in data loading path (DataManager.loadData(String, boolean)) produces a Datastore shown in the standard display window. That model does not fit the pyramidal storage formats (OME-Zarr, OME-BigTIFF, tiled NDTiff), which are viewed in the TiledDataViewer and are not backed by a Datastore at all.

Those formats live in libraries that are built after mmstudio, so mmstudio cannot call them directly. This interface is the bridge: mmstudio asks each registered opener whether it recognizes a path, and hands the work to the first one that does. When no opener is installed, the File menu and drag-and-drop behave exactly as they did before this interface existed.

Implementations are discovered through the usual SciJava mechanism, by annotating the class with @Plugin(type = TiledDataOpenerPlugin.class).

  • Method Details

    • canOpen

      boolean canOpen(String path)
      Indicate whether this opener can handle the dataset at the given path.

      The path may be the dataset directory itself or a file inside it, since the file chooser and drag-and-drop both let the user pick either. Implementations are expected to resolve the dataset root themselves.

      Called before Micro-Manager attempts its own format detection, so this method should avoid expensive work where it can, and must not show any UI.

      Parameters:
      path - directory of a dataset, or a file within one
      Returns:
      true if open(String) should be called with this path
    • open

      String open(String path)
      Open the dataset and show a viewer for it.

      Called on a background thread, never on the EDT. Implementations report their own failures to the user (for instance through studio.logs().showError()) and return null; Micro-Manager will not attempt to open the data by any other means afterwards.

      Parameters:
      path - the same path that canOpen(String) accepted
      Returns:
      the dataset root that was opened, so that it can be recorded in the list of recently-opened files, or null if the dataset could not be opened