Class MaximumIntensityProjectionGenerationAlgorithm
- java.lang.Object
-
- ch.systemsx.cisd.openbis.dss.etl.dto.api.impl.MaximumIntensityProjectionGenerationAlgorithm
-
- All Implemented Interfaces:
IImageGenerationAlgorithm
,java.io.Serializable
public class MaximumIntensityProjectionGenerationAlgorithm extends java.lang.Object implements IImageGenerationAlgorithm, java.io.Serializable
Implementation ofIImageGenerationAlgorithm
which generates from a bunch of images a representative image where at each pixel the brightest pixel from the images are taken.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_FILE_NAME
-
Constructor Summary
Constructors Constructor Description MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode)
Creates an instance for the specified data set type.MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode, int width, int height)
Creates an instance for the specified data set type and specified image size.MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode, int width, int height, java.lang.String filename)
Creates an instance for the specified data set type, specified image size and specified file name.MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode, java.lang.String filename)
Creates an instance for the specified data set type and file name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.awt.image.BufferedImage>
generateImages(ImageDataSetInformation information, java.util.List<IDataSet> thumbnailDatasets, ch.systemsx.cisd.openbis.dss.etl.IImageProvider imageProvider)
Creates thumbnails for the specified data set info.java.lang.String
getDataSetTypeCode()
Returns the code of the data set to be registered containing these representative thumbnails.java.lang.String
getImageFileName(int index)
Returns the thumbnail file name for the specified index.protected boolean
imageToBeIgnored(ImageFileInfo image)
Returnstrue
if the specified image should be ignored.void
setContent(IHierarchicalContent content)
Sets content which is the source of images.MaximumIntensityProjectionGenerationAlgorithm
useThumbnails()
Uses thumbnails (if present) instead of original images.
-
-
-
Field Detail
-
DEFAULT_FILE_NAME
public static final java.lang.String DEFAULT_FILE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MaximumIntensityProjectionGenerationAlgorithm
public MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode)
Creates an instance for the specified data set type. The generated image will have the same size as the original images. The file name will bemaximum_intensity_projection.png
.
-
MaximumIntensityProjectionGenerationAlgorithm
public MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode, java.lang.String filename)
Creates an instance for the specified data set type and file name. The generated image will have the same size as the original images.
-
MaximumIntensityProjectionGenerationAlgorithm
public MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode, int width, int height)
Creates an instance for the specified data set type and specified image size. The file name will bemaximum_intensity_projection.png
.
-
MaximumIntensityProjectionGenerationAlgorithm
public MaximumIntensityProjectionGenerationAlgorithm(java.lang.String dataSetTypeCode, int width, int height, java.lang.String filename)
Creates an instance for the specified data set type, specified image size and specified file name.
-
-
Method Detail
-
useThumbnails
public MaximumIntensityProjectionGenerationAlgorithm useThumbnails()
Uses thumbnails (if present) instead of original images.
-
getDataSetTypeCode
public java.lang.String getDataSetTypeCode()
Description copied from interface:IImageGenerationAlgorithm
Returns the code of the data set to be registered containing these representative thumbnails.- Specified by:
getDataSetTypeCode
in interfaceIImageGenerationAlgorithm
-
generateImages
public java.util.List<java.awt.image.BufferedImage> generateImages(ImageDataSetInformation information, java.util.List<IDataSet> thumbnailDatasets, ch.systemsx.cisd.openbis.dss.etl.IImageProvider imageProvider)
Description copied from interface:IImageGenerationAlgorithm
Creates thumbnails for the specified data set info.- Specified by:
generateImages
in interfaceIImageGenerationAlgorithm
-
setContent
public void setContent(IHierarchicalContent content)
Description copied from interface:IImageGenerationAlgorithm
Sets content which is the source of images. If this isn't setImageDataSetInformation.getIncomingDirectory()
is used.- Specified by:
setContent
in interfaceIImageGenerationAlgorithm
-
imageToBeIgnored
protected boolean imageToBeIgnored(ImageFileInfo image)
Returnstrue
if the specified image should be ignored. Can be overridden.
-
getImageFileName
public java.lang.String getImageFileName(int index)
Description copied from interface:IImageGenerationAlgorithm
Returns the thumbnail file name for the specified index. The index specifies the corresponding image returned byIImageGenerationAlgorithm.generateImages(ImageDataSetInformation, List, IImageProvider)
. Note, all file names generated by this method have to be different.- Specified by:
getImageFileName
in interfaceIImageGenerationAlgorithm
-
-