@JsonObject(value="LoadImageConfiguration")
public class LoadImageConfiguration
extends java.lang.Object
implements java.io.Serializable
The default configuration is to retrieve images in their original size and format (i.e., not converted to PNG), without the openBIS image transformation applied.
Providing a non-null desired size will instruct the image loader to return images that maintain the aspect ratio of the original and fit in the desired size.
Constructor and Description |
---|
LoadImageConfiguration() |
Modifier and Type | Method and Description |
---|---|
ImageSize |
getDesiredImageSize()
The desired size of the image.
|
java.lang.String |
getSingleChannelImageTransformationCode()
Code of the transformation, which should be applied to the image.
|
boolean |
isDesiredImageFormatPng()
Should the image be converted from its original format to PNG?
|
boolean |
isOpenBisImageTransformationApplied()
Should the image transformation stored in openBIS for a channel or merged channel be applied
to the image?
|
void |
setDesiredImageFormatPng(boolean desiredImageFormatPng)
Set whether the image should be converted from its original format to PNG.
|
void |
setDesiredImageSize(ImageSize desiredImageSizeOrNull)
Set the desired size of the image.
|
void |
setOpenBisImageTransformationApplied(boolean openBisImageTransformationApplied)
Set whether the image transformation stored in openBIS for a channel or merged channel should
be applied.
|
void |
setSingleChannelImageTransformationCode(java.lang.String transformationCodeOrNull)
Sets the code of the transformation, which should be applied to the image.
|
java.lang.String |
toString() |
public ImageSize getDesiredImageSize()
The actual size of the returned image will have the same aspect ratio as the original, and thus might not be exactly the same as the desired size, but will fit in the desired size.
public void setDesiredImageSize(ImageSize desiredImageSizeOrNull)
The actual size of the returned image will have the same aspect ratio as the original, and thus might not be exactly the same as the desired size, but will fit in the desired size.
desiredImageSizeOrNull
- Pass in the desired size or null if you want the image to have
its original size.public boolean isDesiredImageFormatPng()
public void setDesiredImageFormatPng(boolean desiredImageFormatPng)
desiredImageFormatPng
- Pass in true if the image should be converted to PNG; false if
it should be left in its original format.public boolean isOpenBisImageTransformationApplied()
public void setOpenBisImageTransformationApplied(boolean openBisImageTransformationApplied)
openBisImageTransformationApplied
- Pass in true if the transformation should be
applied; false otherwise.public java.lang.String getSingleChannelImageTransformationCode()
public void setSingleChannelImageTransformationCode(java.lang.String transformationCodeOrNull)
isOpenBisImageTransformationApplied()
is false. To keep backward
compatibility if isOpenBisImageTransformationApplied()
is true and no image
transformation code is specified, then the transformation defined by the Color Adjustment
tool will be applied.
Transformation has to be assigned (usually during dataset registration) to the channel which will be fetched. Note that such transformations can be channel-specific. If merged channels image will be requested or the transformation does not exist then untransformed image will be returned.
public java.lang.String toString()
toString
in class java.lang.Object