Class AbstractDynamicFrame

All Implemented Interfaces:
MessageShower, PreferencesSettable, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public abstract class AbstractDynamicFrame extends MultiContrastAnalysisFrame
AbstractDynamicFrame - a GUI for performing general image dynamic analysis.
See Also:
  • Field Details

    • TIME_BETWEEN_IMAGES_PREFERENCE_NAME

      public static final String TIME_BETWEEN_IMAGES_PREFERENCE_NAME
      The Preference name for the time between images.
      See Also:
    • THRESHOLD_PREFERENCE_NAME

      public static final String THRESHOLD_PREFERENCE_NAME
      The Preference name for the intensity threshold.
      See Also:
    • REGISTRATION_PREFERENCE_NAME

      public static final String REGISTRATION_PREFERENCE_NAME
      The Preference name for whether to perform registration.
      See Also:
    • APPLY_SPATIAL_FILTER_PREFERENCE_NAME

      public static final String APPLY_SPATIAL_FILTER_PREFERENCE_NAME
      The Preference name for whether to apply a spatial smoothing filter.
      See Also:
    • SPATIAL_FILTER_FWHM_PREFERENCE_NAME

      public static final String SPATIAL_FILTER_FWHM_PREFERENCE_NAME
      The Preference name for smoothing filter FWHM in mm.
      See Also:
    • N_STEADY_STATES_PREFERENCE_NAME

      public static final String N_STEADY_STATES_PREFERENCE_NAME
      The Preference name for the number of steady-state images.
      See Also:
    • DEFAULT_N_STEADY_STATES

      public static final int DEFAULT_N_STEADY_STATES
      The default number of steady state images, if not set in user preferences.
      See Also:
    • outputImageSelectionPanel

      public final OutputImageSelectionPanel outputImageSelectionPanel
      ImageSelectionPanel used to select the output images basename.
  • Method Details

    • getUseBrainFinder

      public boolean getUseBrainFinder()
      Returns whether the Brain Finder option has been set in the GUI.
      Returns:
      true of the Brain Finder option has been set; false otherwise.
    • getBT

      public Float getBT() throws InvalidArgumentException
      Returns the threshold fraction to use with the Brain Finder, if this option has been set in the GUI.
      Returns:
      the threshold fraction to use with the Brain Finder, or null.
      Throws:
      InvalidArgumentException - if the bT value is outside the range (0..1) exclusive.
    • getBinaryMask

      public com.xinapse.apps.mask.BinaryMask getBinaryMask() throws InvalidArgumentException
      Returns the mask image if masking by an image has been selected.
      Returns:
      the mask image if masking by an image has been selected, or null if masking by an image has not been selected.
      Throws:
      InvalidArgumentException - if masking by an image has been selected, but the mask image has not been set or cannot be opened.
    • getMaskROIs

      public List<ROI> getMaskROIs() throws InvalidArgumentException
      Returns the mask ROIs if masking by a ROIs has been selected.
      Returns:
      the mask ROIs if masking by a ROIs has been selected, or null if masking by a ROIs has not been selected.
      Throws:
      InvalidArgumentException - if masking by ROIs has been selected, but the mask ROI File has not been set or cannot be opened.
    • getMaskROIFile

      public File getMaskROIFile() throws InvalidArgumentException
      Returns the mask ROI file if masking by a ROIs has been selected.
      Returns:
      the ROI File if masking by a ROIs has been selected, or null if masking by a ROIs has not been selected.
      Throws:
      InvalidArgumentException - if masking by ROIs has been selected, but the mask ROIs File has not been set or cannot be opened.
    • getThreshold

      public Double getThreshold() throws InvalidArgumentException
      Returns the intensity threshold for pixel processing.
      Returns:
      the intensity threshold or null if no threshold has been set.
      Throws:
      InvalidArgumentException - if the threshold value cannot be interpreset from what has been set in the GUI.
    • setThreshold

      public void setThreshold(Double thr)
      Sets the intensity threshold for pixel processing.
      Parameters:
      thr - the intensity threshold or null if no threshold is to be set.
    • getXStart

      public float getXStart()
      For the purposes of plotting data, returns the starting value of the independent variable.
      Specified by:
      getXStart in class MultiContrastAnalysisFrame
      Returns:
      1 which is the scan number of the first image.
    • getDeltaX

      public float getDeltaX() throws NumberFormatException
      For the purposes of plotting data, returns the step between values of the independent variable.
      Specified by:
      getDeltaX in class MultiContrastAnalysisFrame
      Returns:
      1 which is the step between scans.
      Throws:
      NumberFormatException - if the step between values cannot be determined.
    • getXAxisLabel

      public String getXAxisLabel()
      For the purposes of plotting data, returns the x-axis label.
      Specified by:
      getXAxisLabel in class MultiContrastAnalysisFrame
      Returns:
      "scan number".
    • getTimeBetweenImages

      public float getTimeBetweenImages() throws NumberFormatException
      Returns the time between images set in the GUI.
      Returns:
      the time (in seconds) between images.
      Throws:
      NumberFormatException - if the time between images has not been set by the user, or if the time between images cannot be interpreted, or is not positive.
    • setTimeBetweenImages

      public void setTimeBetweenImages(Float timeBetweenImages)
      Sets the time between images in the GUI.
      Parameters:
      timeBetweenImages - the time between images. If null, this method has not effect.
    • getSmoothingFWHMmm

      public float getSmoothingFWHMmm() throws InvalidArgumentException
      Returns the full-width-at-half-maximum for the smoothing filter.
      Returns:
      the full-width-at-half-maximum for the smoothing filter.
      Throws:
      InvalidArgumentException - if the FWHM has not been set by the user, or the FWHM cannot be interpreted, or is not positive.
    • getOutputImagesBaseName

      public String getOutputImagesBaseName() throws InvalidArgumentException
      Returns the basename for the output images.
      Returns:
      the basename for the output images.
      Throws:
      InvalidArgumentException - if the basename has not been set by the user.
    • getNSteadyStates

      public int getNSteadyStates()
      Returns the number of pre-steady-state images set in the GUI.
      Returns:
      the number of pre-steady-state images set in the GUI.
    • setDefaults

      public void setDefaults()
      Description copied from class: MultiContrastAnalysisFrame
      Put the default settings to this MultiContrastAnalysisFrame.
      Specified by:
      setDefaults in interface PreferencesSettable
      Overrides:
      setDefaults in class MultiContrastAnalysisFrame
    • savePreferences

      public void savePreferences(Preferences prefs) throws InvalidArgumentException
      Description copied from class: MultiContrastAnalysisFrame
      Save the current setting to the user preferences.
      Specified by:
      savePreferences in interface PreferencesSettable
      Overrides:
      savePreferences in class MultiContrastAnalysisFrame
      Parameters:
      prefs - the Preferences node to which to save the settings.
      Throws:
      InvalidArgumentException - if the current settings are not valid.
    • busyCursors

      public void busyCursors()
      Description copied from class: com.xinapse.util.ImageOrganiserFrame
      Call this method to indicate that the ImageOrganiserFrame is busy processing.
      Specified by:
      busyCursors in interface MessageShower
      Overrides:
      busyCursors in class MultiContrastAnalysisFrame
    • readyCursors

      public void readyCursors()
      Description copied from class: com.xinapse.util.ImageOrganiserFrame
      Call this method to indicate that the ImageOrganiserFrame is ready to do further processing.
      Specified by:
      readyCursors in interface MessageShower
      Overrides:
      readyCursors in class MultiContrastAnalysisFrame
    • setVisible

      public void setVisible(boolean b)
      Description copied from class: com.xinapse.util.ImageOrganiserFrame
      Shows or hides this ImageOrganiserFrame depending on the value of parameter b. If b is false, then the user will be asked if any Threads the were generated by this ImageOrganiserFrame should be stopped. If the user indicates to stop the Threads, then the threads are stopped at the next available opportunity. If, after these checks, no Threads are running, then this ImageOrganiserFrame is hidden. If the imageDisplayer is null (indicating a stand-alone app) then this ImageOrganiserFrame is also dispose()d.
      Overrides:
      setVisible in class MultiContrastAnalysisFrame
      Parameters:
      b - if true, shows this ImageOrganiserFrame; otherwise, hides this ImageOrganiserFrame.