Class ActionPaintToMask
- java.lang.Object
-
- gov.nih.mipav.model.scripting.actions.ActionBase
-
- gov.nih.mipav.model.scripting.actions.ActionImageProcessorBase
-
- gov.nih.mipav.model.scripting.actions.ActionPaintToMask
-
- All Implemented Interfaces:
ScriptableActionInterface
public class ActionPaintToMask extends ActionImageProcessorBase
A script action which converts all paint within an image to some type of mask image (short, binary, ubyte).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMASK_BINARYIndicates that a binary mask should be generated from an image's paint.private static java.lang.StringMASK_DATA_TYPEThe label to use for the mask output image data type parameter.static java.lang.StringMASK_SHORTIndicates that a short mask should be generated from an image's paint.static java.lang.StringMASK_UBYTEIndicates that a unsigned byte mask should be generated from an image's paint.private java.lang.StringrecordingMaskTypeThe type of mask extracted from the paint (which should now be recorded).-
Fields inherited from class gov.nih.mipav.model.scripting.actions.ActionImageProcessorBase
INPUT_IMAGE_LABEL, recordingInputImage, recordingResultImage
-
Fields inherited from class gov.nih.mipav.model.scripting.actions.ActionBase
isScript
-
-
Constructor Summary
Constructors Constructor Description ActionPaintToMask()Constructor for the dynamic instantiation and execution of the PaintToMask script action.ActionPaintToMask(ModelImage inputImage, ModelImage resultImage, java.lang.String maskType)Constructor used to record the PaintToMask script action line.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinsertScriptLine()If a script is being recorded and the action (read: algorithm) is done, add an entry for this action.voidscriptRun(ParameterTable parameters)Sets up the action dialog state and then executes it.voidsetMaskType(java.lang.String maskType)Changes the data type of the paint extraction we want to record.-
Methods inherited from class gov.nih.mipav.model.scripting.actions.ActionImageProcessorBase
createInputImageParameter, isImageStoredInRecorder, setInputImage, setResultImage, storeImageInRecorder, storeImageInRunner
-
Methods inherited from class gov.nih.mipav.model.scripting.actions.ActionBase
getActionName, getActionName, isScript, setIsScript
-
-
-
-
Field Detail
-
MASK_DATA_TYPE
private static final java.lang.String MASK_DATA_TYPE
The label to use for the mask output image data type parameter.- See Also:
- Constant Field Values
-
MASK_BINARY
public static final java.lang.String MASK_BINARY
Indicates that a binary mask should be generated from an image's paint.- See Also:
- Constant Field Values
-
MASK_SHORT
public static final java.lang.String MASK_SHORT
Indicates that a short mask should be generated from an image's paint.- See Also:
- Constant Field Values
-
MASK_UBYTE
public static final java.lang.String MASK_UBYTE
Indicates that a unsigned byte mask should be generated from an image's paint.- See Also:
- Constant Field Values
-
recordingMaskType
private java.lang.String recordingMaskType
The type of mask extracted from the paint (which should now be recorded).
-
-
Constructor Detail
-
ActionPaintToMask
public ActionPaintToMask()
Constructor for the dynamic instantiation and execution of the PaintToMask script action.
-
ActionPaintToMask
public ActionPaintToMask(ModelImage inputImage, ModelImage resultImage, java.lang.String maskType)
Constructor used to record the PaintToMask script action line.- Parameters:
inputImage- The image whose paint was extracted to a mask image.resultImage- The result image generated.maskType- The type of the extracted mask image.
-
-
Method Detail
-
insertScriptLine
public void insertScriptLine()
If a script is being recorded and the action (read: algorithm) is done, add an entry for this action.- Specified by:
insertScriptLinein interfaceScriptableActionInterface- Specified by:
insertScriptLinein classActionImageProcessorBase
-
scriptRun
public void scriptRun(ParameterTable parameters)
Sets up the action dialog state and then executes it.- Specified by:
scriptRunin interfaceScriptableActionInterface- Specified by:
scriptRunin classActionImageProcessorBase- Parameters:
parameters- Table of parameters for the script to use.
-
setMaskType
public void setMaskType(java.lang.String maskType)
Changes the data type of the paint extraction we want to record.- Parameters:
maskType- The type of mask extracted from an image's paint.
-
-