Class RemoteViewerStorageAdapter

java.lang.Object
org.micromanager.remote.RemoteViewerStorageAdapter
All Implemented Interfaces:
org.micromanager.acqj.api.DataSink, org.micromanager.ndviewer.api.DataSourceInterface

public class RemoteViewerStorageAdapter
extends Object
implements org.micromanager.ndviewer.api.DataSourceInterface, org.micromanager.acqj.api.DataSink
The class is the glue needed in order for Acquisition engine, viewer, and data storage to be able to be used together, since they are independent libraries that do not know about one another. It implements the Acquisition engine API for a DataSink interface, dispatching acquired images to viewer and storage as appropriate. It implements viewers DataSourceInterface interface, so that images in storage can be passed to the viewer to display.
Author:
henrypinkard
  • Constructor Details

    • RemoteViewerStorageAdapter

      public RemoteViewerStorageAdapter​(boolean showViewer, String dataStorageLocation, String name, boolean xyTiled, int tileOverlapX, int tileOverlapY, Integer maxResLevel, int savingQueueSize)
      Parameters:
      showViewer - create and show a viewer
      dataStorageLocation - where should data be saved to disk
      name - name for data storage and viewer
      xyTiled - true if using XY tiling/multiresolution features
      tileOverlapX - X pixel overlap between adjacent tiles if using XY tiling/multiresolution
      tileOverlapY - Y pixel overlap between adjacent tiles if using XY tiling/multiresolution
      maxResLevel - The maximum resolution level index if using XY tiling/multiresolution
  • Method Details

    • initialize

      public void initialize​(org.micromanager.acqj.api.Acquisition acq, mmcorej.org.json.JSONObject summaryMetadata)
      Specified by:
      initialize in interface org.micromanager.acqj.api.DataSink
    • getStorageMonitor

      public RemoteStorageMonitor getStorageMonitor()
    • getStorage

      public org.micromanager.multiresstorage.StorageAPI getStorage()
    • putImage

      public void putImage​(mmcorej.TaggedImage taggedImg)
      Specified by:
      putImage in interface org.micromanager.acqj.api.DataSink
    • getBounds

      public int[] getBounds()
      Specified by:
      getBounds in interface org.micromanager.ndviewer.api.DataSourceInterface
    • getImageForDisplay

      public mmcorej.TaggedImage getImageForDisplay​(HashMap<String,​Integer> axes, int resolutionindex, double xOffset, double yOffset, int imageWidth, int imageHeight)
      Specified by:
      getImageForDisplay in interface org.micromanager.ndviewer.api.DataSourceInterface
    • getStoredAxes

      public Set<HashMap<String,​Integer>> getStoredAxes()
      Specified by:
      getStoredAxes in interface org.micromanager.ndviewer.api.DataSourceInterface
    • getMaxResolutionIndex

      public int getMaxResolutionIndex()
      Specified by:
      getMaxResolutionIndex in interface org.micromanager.ndviewer.api.DataSourceInterface
    • getDiskLocation

      public String getDiskLocation()
      Specified by:
      getDiskLocation in interface org.micromanager.ndviewer.api.DataSourceInterface
    • close

      public void close()
      Specified by:
      close in interface org.micromanager.ndviewer.api.DataSourceInterface
    • finished

      public void finished()
      Specified by:
      finished in interface org.micromanager.acqj.api.DataSink
    • isFinished

      public boolean isFinished()
      Specified by:
      isFinished in interface org.micromanager.acqj.api.DataSink
    • anythingAcquired

      public boolean anythingAcquired()
      Specified by:
      anythingAcquired in interface org.micromanager.acqj.api.DataSink