Class mask

java.lang.Object
  |
  +--operator
        |
        +--operator1DInt
              |
              +--mask

public class mask
extends operator1DInt


Inner Class Summary
 class mask.maskCanvas
          Canvas used for displaying the mask with axes and scale.
 class mask.MaskHistory
           
 class mask.MaskHistoryItem
          Class containing method to save the history of a set of frequency filters
 
Fields inherited from class operator
box, name, panel, parameters, type
 
Constructor Summary
mask(javax.swing.JPanel panel, linkData links)
          Constructor taking the parent panel (for the UI) and information about the links in the system
 
Method Summary
 void actual_keep(int x1, int x2, int y1, int y2)
           
 void actual_remove(int x1, int x2, int y1, int y2)
           
 void apply_freq()
          Adds frequency filter to the current mask.
 void apply_gauss()
          Adds gauss filter to the current mask.
 void apply_keep()
          Keeps only a determined area from the mask.
 void apply_notch()
          Adds notch filter to the current mask.
 void apply_remove()
          Removes a determined area from the mask.
 void apply()
          Sends the mask created to the output.
 void clear()
          Resets the mask and creates a full white image
 int getNumber()
          Returns the number of this operator.
 void go()
          Runs the operator and propagates the image to all the operators that it links to.
 void loadParameters(java.io.StreamTokenizer tokenizer)
          Loads the required parameters (number of iterations) from the input stream, so the operator can be recreated in an identical state to when it was saved.
 java.lang.String saveParameters()
          Returns a String representing all the parameters for this operator for the purpose of saving the system setup (and being able to load it again at a future date).
 void updatedisplay()
          Updates the display of the mask in the parameters popup.
 
Methods inherited from class operator1DInt
getOutput1, getOutput2, link1To1, link1To2, link2To1, link2To2, setInput1, setInput2
 
Methods inherited from class operator
getBox, getName, getParameters, getType, propagate, propagateSingleLink, saveOperator, setBox, setName, setType, showParameters, updateParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

mask

public mask(javax.swing.JPanel panel,
            linkData links)
Constructor taking the parent panel (for the UI) and information about the links in the system
Parameters:
panel - the panel that the UI for the operators is based around
links - the information about the system's links
Method Detail

getNumber

public int getNumber()
Returns the number of this operator.
Returns:
the number of the operator

loadParameters

public void loadParameters(java.io.StreamTokenizer tokenizer)
                    throws java.io.IOException
Loads the required parameters (number of iterations) from the input stream, so the operator can be recreated in an identical state to when it was saved.
Parameters:
tokenizer - the input stream split into tokens
Throws:
java.io.IOException - if error occurs during token retrieval
Overrides:
loadParameters in class operator

saveParameters

public java.lang.String saveParameters()
Returns a String representing all the parameters for this operator for the purpose of saving the system setup (and being able to load it again at a future date).
Overrides:
saveParameters in class operator

go

public void go()
Runs the operator and propagates the image to all the operators that it links to.
Overrides:
go in class operator

clear

public void clear()
Resets the mask and creates a full white image

apply

public void apply()
Sends the mask created to the output.

apply_notch

public void apply_notch()
Adds notch filter to the current mask.

apply_gauss

public void apply_gauss()
Adds gauss filter to the current mask.

apply_freq

public void apply_freq()
Adds frequency filter to the current mask.

apply_remove

public void apply_remove()
Removes a determined area from the mask.

actual_remove

public void actual_remove(int x1,
                          int x2,
                          int y1,
                          int y2)

apply_keep

public void apply_keep()
Keeps only a determined area from the mask.

actual_keep

public void actual_keep(int x1,
                        int x2,
                        int y1,
                        int y2)

updatedisplay

public void updatedisplay()
Updates the display of the mask in the parameters popup.