Class ViewJComponentAnimateClip

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class ViewJComponentAnimateClip extends ViewJComponentBase
DOCUMENT ME!
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • OPACITY

      public float OPACITY
      Opacity value used by the paint brush. value = 1.0 - opaque value = 0.25 - default (mostly see through)
    • alphaBlend

      protected float alphaBlend
      alphaBlending values for compositing two images.
    • alphaPrime

      protected float alphaPrime
      DOCUMENT ME!
    • img

      protected Image[] img
      DOCUMENT ME!
    • interpMode

      protected int interpMode
      DOCUMENT ME!
    • mode

      protected int mode
      mode - used to describe the cursor mode.
    • slice

      protected int slice
      DOCUMENT ME!
    • string

      protected String string
      DOCUMENT ME!
    • time

      protected long time
      DOCUMENT ME!
    • timeSlice

      protected int timeSlice
      DOCUMENT ME!
    • copy

      private BufferedImage copy
      DOCUMENT ME!
    • ignoreSlice

      private boolean[] ignoreSlice
      DOCUMENT ME!
    • mt

      private MediaTracker mt
      DOCUMENT ME!
    • nRow

      private int nRow
      DOCUMENT ME!
    • nColumn

      private int nColumn
      DOCUMENT ME!
    • originalZDim

      private int originalZDim
      DOCUMENT ME!
    • red

      private int red
      DOCUMENT ME!
    • green

      private int green
      DOCUMENT ME!
    • blue

      private int blue
      DOCUMENT ME!
    • resX

      private float resX
      DOCUMENT ME!
    • resY

      private float resY
      DOCUMENT ME!
    • showNumbers

      private boolean showNumbers
      DOCUMENT ME!
    • showSliceNumber

      private boolean showSliceNumber
      DOCUMENT ME!
    • xDim

      private int xDim
      DOCUMENT ME!
    • yDim

      private int yDim
      DOCUMENT ME!
    • zDim

      private int zDim
      DOCUMENT ME!
    • xLabel

      private int[] xLabel
      DOCUMENT ME!
    • yLabel

      private int[] yLabel
      DOCUMENT ME!
    • zoomX

      private float zoomX
      DOCUMENT ME!
    • zoomY

      private float zoomY
      DOCUMENT ME!
    • zString

      private String[] zString
      DOCUMENT ME!
  • Constructor Details

    • ViewJComponentAnimateClip

      public ViewJComponentAnimateClip(float zoom, int nRow, int nColumn, int nImage)
      Constructor: ImageA and ImageB are expected to be of the same dimensionality !!
      Parameters:
      zoom - initial magnification of image
      nRow - frame where the controls are obtained
      nColumn - Model of the image that will be displayed
      nImage - LUT used to display imageA
  • Method Details

    • buildImageObject

      public boolean buildImageObject(int zSlice, String dir)
      For generating the display of 1 or 2 RGB images.
      Parameters:
      zSlice - z slice to show
      dir - t (time) slice to show
      Returns:
      boolean to indicate if the show was successful
    • displayNumbers

      public void displayNumbers(boolean showNumbers)
      In 4D whether to show numbers for each z slice.
      Parameters:
      showNumbers - if true display numbers for each z slice in 4D
    • dispose

      public void dispose(boolean gcFlag)
      Sets all variables to null, disposes, and garbage collects.
      Overrides:
      dispose in class ViewJComponentBase
      Parameters:
      gcFlag - if true garbage collector should be called.
    • finalizeLocal

      public void finalizeLocal()
      Clean up some resources!
    • getblue

      public int getblue()
      Accessor that returns int blue.
      Returns:
      blue
    • getgreen

      public int getgreen()
      Accessor that returns int green.
      Returns:
      green
    • getImage

      public Image getImage()
      Gets Java image.
      Overrides:
      getImage in class ViewJComponentBase
      Returns:
      Java image
      See Also:
    • getImageA

      public ModelImage getImageA()
      Accessor that returns the imageA.
      Returns:
      imageA
    • getImageArray

      public Image[] getImageArray()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getInterpMode

      public int getInterpMode()
      Gets the interpolation mode.
      Overrides:
      getInterpMode in class ViewJComponentBase
      Returns:
      returns the interpolation mode
    • getOPACITY

      public float getOPACITY()
      Accessor that returns float OPACITY.
      Returns:
      OPACITY
    • getPreferredSize

      public Dimension getPreferredSize()
      Size set to object size.
      Overrides:
      getPreferredSize in class ViewJComponentBase
      Returns:
      dimension with the size
    • getred

      public int getred()
      Accessor that returns int red.
      Returns:
      red
    • getSize

      public Dimension getSize(Dimension wh)
      Gets the size of the object taking into account the zoom.
      Overrides:
      getSize in class ViewJComponentBase
      Parameters:
      wh - dimension
      Returns:
      dimension with the size
    • getZoomX

      public float getZoomX()
      Magnification in the x - dimension.
      Overrides:
      getZoomX in class ViewJComponentBase
      Returns:
      magnificaiton in the x - dimension
    • getZoomY

      public float getZoomY()
      Magnification in the y - dimension.
      Overrides:
      getZoomY in class ViewJComponentBase
      Returns:
      magnificaiton in the y - dimension
    • ignoreSlice

      public void ignoreSlice()
      Method to ensure img[slice] is not displayed.
    • importImage

      public void importImage(String fileName)
      Creates a Image object form an array of ints that have been formatted (packed) properly (i.e. aRGB)
      Parameters:
      fileName - Data (image) to be displayed that has been formatted (packed) properly (i.e. aRGB)
    • paintComponent

      public void paintComponent(Graphics g)
      Paints the image and border.
      Overrides:
      paintComponent in class ViewJComponentBase
      Parameters:
      g - Graphics handle
    • set4DSpecs

      public void set4DSpecs(int originalZDim, int nColumn, int nRow)
      Specifications that are only relevant to 4D images.
      Parameters:
      originalZDim - number of z slices
      nColumn - the number of columns of z slices
      nRow - the number of rows of z slices
    • setAlphaBlend

      public void setAlphaBlend(int value)
      Sets the alpha blending of parameter for two image displaying.
      Parameters:
      value - amount [0,100] that is the percentage of Image A to be displayed
    • setInterpMode

      public void setInterpMode(int mode)
      Sets the interpolation mode.
      Parameters:
      mode - mode to set it to
    • setLabelXY

      public void setLabelXY()
      For 4D sets the numbering string of each z slice and its x and y positions.
    • setLabelZ

      public void setLabelZ()
      setlabelZ - For 3D sets the numbering string of each frame.
    • setShowSliceNumber

      public void setShowSliceNumber(boolean flag)
      In 3D whether to show number for complete frame.
      Overrides:
      setShowSliceNumber in class ViewJComponentBase
      Parameters:
      flag - if true show number for complete frame
    • setSlice

      public void setSlice(int _slice)
      Accessor that sets the slice of the image.
      Parameters:
      _slice - image slice to be displayed
    • setZoom

      public void setZoom(float zX, float zY)
      Sets the magnification in both x and y directions.
      Overrides:
      setZoom in class ViewJComponentBase
      Parameters:
      zX - zoom in the x direction
      zY - zoom in the y direction
    • update

      public void update()
      Method to call paint without erasing background this reduces flicker!
    • update

      public void update(Graphics g)
      Method to call paint without erasing background this reduces flicker!
      Overrides:
      update in class ViewJComponentBase
      Parameters:
      g - Graphics handle