Package org.micromanager.ndviewer.api
Interface DataSourceInterface
public interface DataSourceInterface
Interface for a source of image data. This data can be multi-resolution, though this isn't required
- Author:
- henrypinkard
-
Method Summary
Modifier and Type Method Description voidclose()Called when viewer is closingint[]getBounds()The minimal and maximal pixel coordinates of the image to be viewedStringgetDiskLocation()Path to where the data is stored on disk, if applicablemmcorej.TaggedImagegetImageForDisplay(HashMap<String,Integer> axes, int resolutionindex, double xOffset, double yOffset, int imageWidth, int imageHeight)Retrieve image with the given parameters so it can be displayedintgetMaxResolutionIndex()Index of the log 2 biggest downsample factor in the pyramid 0 is full resolution, 1 is downsampled by 2x, 2 is downsampled by 4x, etc For a non-multi resolution source, should pass 0Set<HashMap<String,Integer>>getStoredAxes()Get the axes of all available images in this dataset
-
Method Details
-
getBounds
int[] getBounds()The minimal and maximal pixel coordinates of the image to be viewed- Returns:
- 4 element array x_min, y_min, x_max, y_max
-
getImageForDisplay
mmcorej.TaggedImage getImageForDisplay(HashMap<String,Integer> axes, int resolutionindex, double xOffset, double yOffset, int imageWidth, int imageHeight)Retrieve image with the given parameters so it can be displayed- Parameters:
axes- Map of axes to indices (e.g. "z": 0, "t": 1) (Note: no position needed for channels as this is automatically inferredresolutionindex- Index in level of multiresolution pyramid. (0 is full resolution, 1 is downsampled by 2x, 2 is downsampled by 4x, etcxOffset- leftmost pixel at the requested resolutionyOffset- rightmost pixel at the requested resolutionimageWidth- pixel width of the image at the requested resolutionimageHeight- pixel height of the image at the requested resolution- Returns:
-
getStoredAxes
Get the axes of all available images in this dataset- Returns:
-
getMaxResolutionIndex
int getMaxResolutionIndex()Index of the log 2 biggest downsample factor in the pyramid 0 is full resolution, 1 is downsampled by 2x, 2 is downsampled by 4x, etc For a non-multi resolution source, should pass 0- Returns:
-
getDiskLocation
String getDiskLocation()Path to where the data is stored on disk, if applicable- Returns:
-
close
void close()Called when viewer is closing
-