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
A script action which converts all paint within an image to some type of mask image (short, binary, ubyte).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIndicates that a binary mask should be generated from an image's paint.private static final StringThe label to use for the mask output image data type parameter.static final StringIndicates that a short mask should be generated from an image's paint.static final StringIndicates that a unsigned byte mask should be generated from an image's paint.private StringThe 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, recordingResultImageFields inherited from class gov.nih.mipav.model.scripting.actions.ActionBase
isScript -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the dynamic instantiation and execution of the PaintToMask script action.ActionPaintToMask(ModelImage inputImage, ModelImage resultImage, String maskType) Constructor used to record the PaintToMask script action line. -
Method Summary
Modifier and TypeMethodDescriptionvoidIf 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(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, storeImageInRunnerMethods inherited from class gov.nih.mipav.model.scripting.actions.ActionBase
getActionName, getActionName, isScript, setIsScript
-
Field Details
-
MASK_DATA_TYPE
The label to use for the mask output image data type parameter.- See Also:
-
MASK_BINARY
Indicates that a binary mask should be generated from an image's paint.- See Also:
-
MASK_SHORT
Indicates that a short mask should be generated from an image's paint.- See Also:
-
MASK_UBYTE
Indicates that a unsigned byte mask should be generated from an image's paint.- See Also:
-
recordingMaskType
The type of mask extracted from the paint (which should now be recorded).
-
-
Constructor Details
-
ActionPaintToMask
public ActionPaintToMask()Constructor for the dynamic instantiation and execution of the PaintToMask script action. -
ActionPaintToMask
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 Details
-
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
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
Changes the data type of the paint extraction we want to record.- Parameters:
maskType- The type of mask extracted from an image's paint.
-