public class ImagePlusData extends Object implements JIPipeData
Constructor and Description |
---|
ImagePlusData(ij.ImagePlus image) |
ImagePlusData(ij.ImagePlus image,
ColorSpace colorSpace) |
ImagePlusData(ImageSource imageSource)
Initializes this with an image source, meaning that the image data is not loaded until necessary
|
ImagePlusData(ImageSource imageSource,
ColorSpace colorSpace)
Initializes this with an image source, meaning that the image data is not loaded until necessary
|
Modifier and Type | Method and Description |
---|---|
static ImagePlusData |
convertFrom(ImagePlusData data)
Converts the incoming image data into the current format.
|
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 |
exportData(JIPipeWriteDataStorage storage,
String name,
boolean forceName,
JIPipeProgressInfo progressInfo)
Saves the data to a folder
|
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. |
ImageSource |
getImageSource() |
int |
getNChannels() |
int |
getNFrames() |
int |
getNSlices() |
Class<?> |
getPixelType()
Returns the appropriate Java type that stores the pixel data.
|
ij.ImagePlus |
getViewedImage(boolean duplicate)
The image used by viewers
|
int |
getWidth() |
boolean |
hasLoadedImage() |
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
|
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(ImageSource imageSource)
imageSource
- the image sourcepublic ImagePlusData(ImageSource imageSource, ColorSpace colorSpace)
imageSource
- the image sourcecolorSpace
- the color space. please not that it is ignored if the image is greyscalepublic ImagePlusData(ij.ImagePlus image, ColorSpace colorSpace)
image
- the wrapped imagecolorSpace
- the color space. please not 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 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 Component preview(int width, int height)
JIPipeData
preview
in interface JIPipeData
width
- the target widthheight
- the target heightpublic ColorSpace getColorSpace()
public ImageSource getImageSource()
public boolean hasLoadedImage()
Copyright © 2020–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.