public class DefaultNotebookService extends AbstractService implements NotebookService
NotebookService.NotebookService.ValueScaling| Constructor and Description |
|---|
DefaultNotebookService() |
| Modifier and Type | Method and Description |
|---|---|
Object |
display(Object source)
Converts the given object to a form renderable by scientific notebooks.
|
void |
initialize() |
NotebookTable |
methods(Class<?> type,
String prefix)
Outputs a table of public methods for the given class.
|
<T extends RealType<T> & NativeType<T>> |
mosaic(int[] gridLayout,
RandomAccessibleInterval<T>... images)
Organizes the given list of images into an N-dimensional mosaic.
|
<T extends RealType<T>> |
viewRealType(RandomAccessibleInterval<T> source)
Conveniently wraps a
RandomAccessibleInterval of RealType
into a DefaultDatasetView and presets the channel ranges to the
given minimum and maximum arrays. |
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdisplay, display, display, display, display, display, display, display, display, display, display, display, methods, methods, methods, view, view, viewregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic void initialize()
initialize in interface Initializableinitialize in interface Servicepublic Object display(Object source)
NotebookServicedisplay in interface NotebookServicesource - The object to render.public <T extends RealType<T> & NativeType<T>> RandomAccessibleInterval<T> mosaic(int[] gridLayout, RandomAccessibleInterval<T>... images)
NotebookServiceFor example, passing a grid layout of {2, 2} with four images {A, B, C, D} will result in them being laid out along the first two axes (let's call them X and Y) in a 2 x 2 grid:
AB CD
The images do not need to be of equal size; images will be padded along each dimension as needed so that everything lines up in a grid. In the example above, if A and C have different widths, then the first column will be as wide as the wider of the two. Same for the second column with images B and D. If A and B have different heights, than the first row will be as tall as the taller of the two. And same for the second row with images C and D.
Normally, the number of grid cells (i.e., the product of the grid dimensions) should match the given number of images. However, the algorithm handles a mismatch in either direction. If the number of grid cells is less than the number of images, than the excess images are discarded—i.e., they will not appear anywhere in the mosaic. On the other hand, if the number of grid cells exceeds the given number of images, then some grid cells will be empty. The cells are filled along the first dimension fastest, so e.g. a grid layout of {2, 3, 2} will fill as follows: 000, 100, 010, 110, 020, 120, 001, 101, 011, 111, 021, 121.
mosaic in interface NotebookServicegridLayout - Dimensions of the grid.images - Images to combine into the mosaic.public NotebookTable methods(Class<?> type, String prefix)
NotebookServicemethods in interface NotebookServicetype - The class for which to generate a table of its methods.prefix - The starting characters to use for limiting method names.public <T extends RealType<T>> DatasetView viewRealType(RandomAccessibleInterval<T> source)
NotebookServiceRandomAccessibleInterval of RealType
into a DefaultDatasetView and presets the channel ranges to the
given minimum and maximum arrays.viewRealType in interface NotebookServicesource - - the input dataCopyright © 2014–2022 ImageJ. All rights reserved.