Class ScaleToSize


public class ScaleToSize extends ThumbnailFromStack
Create a thumbnail by scales an image to a particular size.

The aspect ratio between width and height is not preserved.

If it's a z-stack, a maximum intensity projection is first applied.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    StackDisplayer
    How to convert an image to be displayed to the user.
    Interpolator
     
    SizeXY
     
    void
    setDisplayer(StackDisplayer displayer)
    How to convert an image to be displayed to the user.
    void
    setInterpolator(Interpolator interpolator)
     
    void
    setSize(SizeXY size)
     
    void
    Initializes the thumbnail creation process.
    DisplayStack
    thumbnailFor(Stack stack)
    Creates a thumbnail for a stack.

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ScaleToSize

      public ScaleToSize()
  • Method Details

    • start

      public void start()
      Description copied from class: ThumbnailFromStack
      Initializes the thumbnail creation process.

      Should always be called once before any calls to ThumbnailFromStack.thumbnailFor(org.anchoranalysis.image.core.stack.Stack).

      Specified by:
      start in class ThumbnailFromStack
    • thumbnailFor

      public DisplayStack thumbnailFor(Stack stack) throws CreateException
      Description copied from class: ThumbnailFromStack
      Creates a thumbnail for a stack.
      Specified by:
      thumbnailFor in class ThumbnailFromStack
      Parameters:
      stack - the Stack to create a thumbnail from
      Returns:
      a DisplayStack representing the thumbnail
      Throws:
      CreateException - if the thumbnail creation fails
    • getSize

      public SizeXY getSize()
    • setSize

      public void setSize(SizeXY size)
    • getInterpolator

      public Interpolator getInterpolator()
    • setInterpolator

      public void setInterpolator(Interpolator interpolator)
    • getDisplayer

      public StackDisplayer getDisplayer()
      How to convert an image to be displayed to the user.
    • setDisplayer

      public void setDisplayer(StackDisplayer displayer)
      How to convert an image to be displayed to the user.