Class ActionVOIToMask
- java.lang.Object
-
- gov.nih.mipav.model.scripting.actions.ActionBase
-
- gov.nih.mipav.model.scripting.actions.ActionImageProcessorBase
-
- gov.nih.mipav.model.scripting.actions.ActionVOIToMask
-
- All Implemented Interfaces:
ScriptableActionInterface
public class ActionVOIToMask extends ActionImageProcessorBase
A script action which converts all VOIs within an image to some type of mask image (short, binary, ubyte).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MASK_BINARY
Indicates that a binary mask should be generated from an image's VOI(s).private static java.lang.String
MASK_DATA_TYPE
The label to use for the mask output image data type parameter.static java.lang.String
MASK_SHORT
Indicates that a short mask should be generated from an image's VOI(s).static java.lang.String
MASK_UBYTE
Indicates that a unsigned byte mask should be generated from an image's VOI(s).private java.lang.String
recordingMaskType
The type of mask extracted from the VOIs (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 ActionVOIToMask()
Constructor for the dynamic instantiation and execution of the VOIToMask script action.ActionVOIToMask(ModelImage inputImage, ModelImage resultImage, java.lang.String maskType)
Constructor used to record the VOIToMask script action line.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
insertScriptLine()
If a script is being recorded and the action (read: algorithm) is done, add an entry for this action.void
scriptRun(ParameterTable parameters)
Sets up the action dialog state and then executes it.void
setMaskType(java.lang.String maskType)
Changes the data type of the VOI 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 VOI(s).- 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 VOI(s).- 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 VOI(s).- See Also:
- Constant Field Values
-
recordingMaskType
private java.lang.String recordingMaskType
The type of mask extracted from the VOIs (which should now be recorded).
-
-
Constructor Detail
-
ActionVOIToMask
public ActionVOIToMask()
Constructor for the dynamic instantiation and execution of the VOIToMask script action.
-
ActionVOIToMask
public ActionVOIToMask(ModelImage inputImage, ModelImage resultImage, java.lang.String maskType)
Constructor used to record the VOIToMask script action line.- Parameters:
inputImage
- The image whose VOIs were 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:
insertScriptLine
in interfaceScriptableActionInterface
- Specified by:
insertScriptLine
in classActionImageProcessorBase
-
scriptRun
public void scriptRun(ParameterTable parameters)
Sets up the action dialog state and then executes it.- Specified by:
scriptRun
in interfaceScriptableActionInterface
- Specified by:
scriptRun
in 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 VOI extraction we want to record.- Parameters:
maskType
- The type of mask extracted from an image's VOIs.
-
-