public class ImagePlusData extends Object implements JIPipeData
Constructor and Description |
---|
ImagePlusData(ij.ImagePlus image) |
ImagePlusData(ij.ImagePlus image,
ColorSpace colorSpace) |
Modifier and Type | Method and Description |
---|---|
void |
addOverlay(JIPipeData overlay) |
static ImagePlusData |
convertFrom(ImagePlusData data)
Converts the incoming image data into the current format.
|
void |
copyMetadata(ImagePlusData other) |
JIPipeThumbnailData |
createThumbnail(int width,
int height,
JIPipeProgressInfo progressInfo)
This function generates a thumbnail for this data
Can return null
|
void |
display(String displayName,
JIPipeWorkbench workbench,
JIPipeDataSource source)
This function should display the data in the GUI.
|
JIPipeData |
duplicate(JIPipeProgressInfo progressInfo)
Duplicates the data
|
void |
ensureComposite() |
void |
exportData(JIPipeWriteDataStorage storage,
String name,
boolean forceName,
JIPipeProgressInfo progressInfo)
Saves the data to a folder
|
<T extends JIPipeData> |
extractOverlaysOfType(Class<T> klass) |
ColorSpace |
getColorSpace() |
static ColorSpace |
getColorSpaceOf(Class<? extends ImagePlusData> dataType) |
static int |
getDimensionalityOf(Class<? extends ImagePlusData> klass)
Gets the dimensionality of this
|
ij.ImagePlus |
getDuplicateImage()
Returns a duplicate of the contained image
|
int |
getHeight() |
ij.ImagePlus |
getImage()
The ImageJ image
|
Class<? extends ij.process.ImageProcessor> |
getImageProcessorType()
Returns the appropriate
ImageProcessor that stores the pixel data. |
int |
getNChannels() |
int |
getNFrames() |
int |
getNSlices() |
List<JIPipeData> |
getOverlays()
Gets overlay data
|
Class<?> |
getPixelType()
Returns the appropriate Java type that stores the pixel data.
|
ij.ImagePlus |
getViewedImage(boolean duplicate)
The image used by viewers
|
int |
getWidth() |
static ImagePlusData |
importData(JIPipeReadDataStorage storage,
JIPipeProgressInfo progressInfo) |
static ij.ImagePlus |
importImagePlusFrom(JIPipeReadDataStorage storage,
JIPipeProgressInfo progressInfo) |
boolean |
isGrayscale()
Returns true if the image is grayscale
|
void |
makeUnique()
Makes the stored image unique by duplicating it.
|
Component |
preview(int width,
int height)
This function generates a preview component for usage within the GUI
Can return null
|
void |
removeOverlay(JIPipeData overlay) |
void |
removeOverlaysOfType(Class<? extends JIPipeData> klass) |
void |
setOverlays(List<JIPipeData> overlays)
Sets overlay data
|
ImagePlusData |
shallowCopy() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, exportThumbnails, getDescriptionOf, getMenuPathOf, getNameOf, getSortedList, getStorageDocumentation, getStorageSchema, groupByMenuPath, isCommon, isHeavy, isHidden, toDetailedString
public ImagePlusData(ij.ImagePlus image)
image
- wrapped imagepublic ImagePlusData(ij.ImagePlus image, ColorSpace colorSpace)
image
- the wrapped imagecolorSpace
- the color space. please note that it is ignored if the image is greyscalepublic static ij.ImagePlus importImagePlusFrom(JIPipeReadDataStorage storage, JIPipeProgressInfo progressInfo)
public static ImagePlusData importData(JIPipeReadDataStorage storage, JIPipeProgressInfo progressInfo)
public static ColorSpace getColorSpaceOf(Class<? extends ImagePlusData> dataType)
public static int getDimensionalityOf(Class<? extends ImagePlusData> klass)
klass
- the classpublic static ImagePlusData convertFrom(ImagePlusData data)
data
- the datapublic List<JIPipeData> getOverlays()
public void setOverlays(List<JIPipeData> overlays)
overlays
- the overlaypublic void removeOverlay(JIPipeData overlay)
public void addOverlay(JIPipeData overlay)
public void removeOverlaysOfType(Class<? extends JIPipeData> klass)
public int getWidth()
public int getHeight()
public int getNChannels()
public int getNSlices()
public int getNFrames()
public boolean isGrayscale()
public Class<?> getPixelType()
public Class<? extends ij.process.ImageProcessor> getImageProcessorType()
ImageProcessor
that stores the pixel data.ImageProcessor
typepublic ij.ImagePlus getImage()
public ij.ImagePlus getViewedImage(boolean duplicate)
duplicate
- if the returned image is a duplicate (a separate copy)public void exportData(JIPipeWriteDataStorage storage, String name, boolean forceName, JIPipeProgressInfo progressInfo)
JIPipeData
exportData
in interface JIPipeData
storage
- The storage where the data should be writtenname
- A name reference that can be used to generate filename(s)forceName
- If enabled, the data is saved potentially destructively. Generated files must always contain the name parameter. This is used to collect results for humans or other algorithms.progressInfo
- the progresspublic JIPipeData duplicate(JIPipeProgressInfo progressInfo)
JIPipeData
duplicate
in interface JIPipeData
progressInfo
- the progress of duplicating the datapublic ij.ImagePlus getDuplicateImage()
public void makeUnique()
public void display(String displayName, JIPipeWorkbench workbench, JIPipeDataSource source)
JIPipeData
JIPipeDataDisplayOperation
that can be registered separately.
This item will always be shown as "Default" in the list of operations.display
in interface JIPipeData
displayName
- a name that can be usedworkbench
- the workbenchsource
- optional source of the data. Can be null or any kind of data type (e.g. JIPipeDataSlot
)public JIPipeThumbnailData createThumbnail(int width, int height, JIPipeProgressInfo progressInfo)
JIPipeData
createThumbnail
in interface JIPipeData
width
- the widthheight
- the heightprogressInfo
- the progress infopublic Component preview(int width, int height)
JIPipeData
preview
in interface JIPipeData
width
- the target widthheight
- the target heightpublic ColorSpace getColorSpace()
public <T extends JIPipeData> List<T> extractOverlaysOfType(Class<T> klass)
public ImagePlusData shallowCopy()
public void copyMetadata(ImagePlusData other)
public void ensureComposite()
Copyright © 2020–2024 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.