Class PixelSelector

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, InteractiveActor, OutputProducer, StopModeSupporter, Serializable, Comparable

    public class PixelSelector
    extends AbstractInteractiveTransformerDialog
    Allows the user to select pixels. How the pixels are interpreted depends on the actions selected.
    In addition, overlays that visualize the information stored in the image's report can be selected as well. The overlays offer information on what actions generate the data that is required for proper visualization.

    Input/output:
    - accepts:
       adams.data.image.AbstractImage
    - generates:
       adams.data.image.AbstractImage


    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: PixelSelector
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
     
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
     
    -width <int> (property: width)
        The width of the dialog.
        default: 800
        minimum: 1
     
    -height <int> (property: height)
        The height of the dialog.
        default: 600
        minimum: 1
     
    -x <int> (property: x)
        The X position of the dialog (>=0: absolute, -1: left, -2: center, -3: right
        ).
        default: -1
        minimum: -3
     
    -y <int> (property: y)
        The Y position of the dialog (>=0: absolute, -1: top, -2: center, -3: bottom
        ).
        default: -1
        minimum: -3
     
    -stop-if-canceled (property: stopFlowIfCanceled)
        If enabled, the flow gets stopped in case the user cancels the dialog.
     
    -custom-stop-message <java.lang.String> (property: customStopMessage)
        The custom stop message to use in case a user cancelation stops the flow 
        (default is the full name of the actor)
        default: 
     
    -action <adams.flow.transformer.pixelselector.AbstractPixelSelectorAction> [-action ...] (property: actions)
        The overlays available to the user from the popup menu of the viewer.
        default: 
     
    -overlay <adams.flow.transformer.pixelselector.AbstractPixelSelectorOverlay> [-overlay ...] (property: overlays)
        The image overlays to use in the viewer.
        default: 
     
    -splitter-pos <int> (property: splitterPosition)
        The initial position of the splitter in the viewer panel.
        default: 500
        minimum: 1
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_SplitterPosition

        protected int m_SplitterPosition
        the position of the splitter.
      • m_Approved

        protected Boolean m_Approved
        whether the user approved (or canceled) the dialog.
    • Constructor Detail

      • PixelSelector

        public PixelSelector()
    • Method Detail

      • setActions

        public void setActions​(AbstractPixelSelectorAction[] value)
        Sets the available popup actions.
        Parameters:
        value - the actions
      • actionsTipText

        public String actionsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOverlays

        public void setOverlays​(AbstractPixelSelectorOverlay[] value)
        Sets the available image overlays.
        Parameters:
        value - the overlays
      • overlaysTipText

        public String overlaysTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getDefaultSplitterPosition

        protected int getDefaultSplitterPosition()
        Returns the default position for the splitter.
      • setSplitterPosition

        public void setSplitterPosition​(int value)
        Sets the initial position of the splitter in the viewer panel.
        Parameters:
        value - the position
      • getSplitterPosition

        public int getSplitterPosition()
        Returns the initial position of the splitter in the viewer panel.
        Returns:
        the position
      • splitterPositionTipText

        public String splitterPositionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        the Class of objects that can be processed
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        adams.data.image.AbstractImage.class