Package org.micromanager.remote
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 Summary
Constructors Constructor Description RemoteViewerStorageAdapter(boolean showViewer, String dataStorageLocation, String name, boolean xyTiled, int tileOverlapX, int tileOverlapY, Integer maxResLevel, int savingQueueSize) -
Method Summary
Modifier and Type Method Description booleananythingAcquired()voidclose()voidfinished()int[]getBounds()StringgetDiskLocation()mmcorej.TaggedImagegetImageForDisplay(HashMap<String,Integer> axes, int resolutionindex, double xOffset, double yOffset, int imageWidth, int imageHeight)intgetMaxResolutionIndex()org.micromanager.multiresstorage.StorageAPIgetStorage()RemoteStorageMonitorgetStorageMonitor()Set<HashMap<String,Integer>>getStoredAxes()voidinitialize(org.micromanager.acqj.api.Acquisition acq, mmcorej.org.json.JSONObject summaryMetadata)booleanisFinished()voidputImage(mmcorej.TaggedImage taggedImg)
-
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 viewerdataStorageLocation- where should data be saved to diskname- name for data storage and viewerxyTiled- true if using XY tiling/multiresolution featurestileOverlapX- X pixel overlap between adjacent tiles if using XY tiling/multiresolutiontileOverlapY- Y pixel overlap between adjacent tiles if using XY tiling/multiresolutionmaxResLevel- 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:
initializein interfaceorg.micromanager.acqj.api.DataSink
-
getStorageMonitor
-
getStorage
public org.micromanager.multiresstorage.StorageAPI getStorage() -
putImage
public void putImage(mmcorej.TaggedImage taggedImg)- Specified by:
putImagein interfaceorg.micromanager.acqj.api.DataSink
-
getBounds
public int[] getBounds()- Specified by:
getBoundsin interfaceorg.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:
getImageForDisplayin interfaceorg.micromanager.ndviewer.api.DataSourceInterface
-
getStoredAxes
- Specified by:
getStoredAxesin interfaceorg.micromanager.ndviewer.api.DataSourceInterface
-
getMaxResolutionIndex
public int getMaxResolutionIndex()- Specified by:
getMaxResolutionIndexin interfaceorg.micromanager.ndviewer.api.DataSourceInterface
-
getDiskLocation
- Specified by:
getDiskLocationin interfaceorg.micromanager.ndviewer.api.DataSourceInterface
-
close
public void close()- Specified by:
closein interfaceorg.micromanager.ndviewer.api.DataSourceInterface
-
finished
public void finished()- Specified by:
finishedin interfaceorg.micromanager.acqj.api.DataSink
-
isFinished
public boolean isFinished()- Specified by:
isFinishedin interfaceorg.micromanager.acqj.api.DataSink
-
anythingAcquired
public boolean anythingAcquired()- Specified by:
anythingAcquiredin interfaceorg.micromanager.acqj.api.DataSink
-