Class ThumbnailsStorageFormat

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ThumbnailsStorageFormat

    public class ThumbnailsStorageFormat
    extends ch.systemsx.cisd.common.reflection.AbstractHashable
    implements java.io.Serializable
    Configuration parameters which describe how thumbnails should be generated.
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_THUMBNAIL_MAX_SIZE

        public static final int DEFAULT_THUMBNAIL_MAX_SIZE
        Maximum default width and height of a thumbnail
        See Also:
        Constant Field Values
      • DEFAULT_COMPRESS_THUMBNAILS

        public static final boolean DEFAULT_COMPRESS_THUMBNAILS
        Maximum default width and height of a thumbnail
        See Also:
        Constant Field Values
    • Constructor Detail

      • ThumbnailsStorageFormat

        public ThumbnailsStorageFormat()
        Creates empty object which instructs that the thumbnails should be generated with default settings. Use setters to change default behaviour (you will probably not have to).
    • Method Detail

      • getMaxWidth

        public int getMaxWidth()
      • getMaxHeight

        public int getMaxHeight()
      • isStoreCompressed

        public boolean isStoreCompressed()
      • getAllowedMachineLoadDuringGeneration

        public double getAllowedMachineLoadDuringGeneration()
      • isHighQuality

        public boolean isHighQuality()
      • isGenerateWithImageMagic

        public boolean isGenerateWithImageMagic()
      • getImageMagicParams

        public java.util.List<java.lang.String> getImageMagicParams()
      • isAllowEnlarging

        public boolean isAllowEnlarging()
      • setMaxWidth

        public void setMaxWidth​(int maxWidth)
        Sets the maximum width of a thumbnail.
      • setMaxHeight

        public void setMaxHeight​(int maxHeight)
        Sets the maximum height of a thumbnail.
      • setStoreCompressed

        public void setStoreCompressed​(boolean storeCompressed)
        Sets if each thumbnail should be additionally compressed (lostless) before it is stored.
      • setAllowEnlarging

        public void setAllowEnlarging​(boolean allowEnlarging)
        Specify if this image representation is allowed to be larger than the original image.
      • setAllowedMachineLoadDuringGeneration

        public void setAllowedMachineLoadDuringGeneration​(double machineLoad)
        The number of threads which will be used during thumbnails generation will be equal to number of processor cores * machineLoad.
      • setHighQuality

        public void setHighQuality​(boolean highQuality)
        Set to true if you want your thumbnails to be of higher quality. In such a case thumbnails generation during dataset registration will take longer. Recommended for overlay images.
      • setGenerateWithImageMagic

        public void setGenerateWithImageMagic​(boolean generateWithImageMagic)
        if true ImageMagic 'convert' utility should be installed and will be used to generate thumbnails.
        Note: if images should be handled with a specific image library, it will be ignored for thumbnails generation if 'convert' is supposed to be used. Make sure that 'convert' can deal with your images in such a case.
      • setImageMagicParams

        public void setImageMagicParams​(java.util.List<java.lang.String> imageMagicParams)
        Sets additional parameters which should be passed to ImageMagic 'convert' utility when it is used to generate thumbnails. Example: pass "-contrast-stretch 2%" to discard 2% of brightest and darkest pixels in the thumbnails.
      • getZoomLevel

        public java.lang.Double getZoomLevel()
      • setZoomLevel

        public void setZoomLevel​(java.lang.Double zoomLevel)
      • getThumbnailsFileName

        public java.lang.String getThumbnailsFileName()
      • setThumbnailsFileName

        public void setThumbnailsFileName​(java.lang.String thumbnailsFileName)
      • setFileFormat

        public void setFileFormat​(java.lang.String fileFormat)
      • setTransformations

        public void setTransformations​(java.util.Map<java.lang.String,​java.lang.String> transformations)
      • getTransformationCode

        public java.lang.String getTransformationCode​(java.lang.String channelCode)
      • getTransformations

        public java.util.Map<java.lang.String,​java.lang.String> getTransformations()