Class ActionCreateBlankImage
- java.lang.Object
-
- gov.nih.mipav.model.scripting.actions.ActionBase
-
- gov.nih.mipav.model.scripting.actions.ActionImageProcessorBase
-
- gov.nih.mipav.model.scripting.actions.ActionCreateBlankImage
-
- All Implemented Interfaces:
ScriptableActionInterface
public class ActionCreateBlankImage extends ActionImageProcessorBase
A script action which creates a new blank image with a set of characteristics.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
FILE_RAW_DATA_TYPE
Label of the parameter indicating the data type of the raw image.private static java.lang.String
FILE_RAW_ENDIANESS
Label of the parameter indicating whether the raw image is big endian.private static java.lang.String
FILE_RAW_EXTENTS
Label of the parameter indicating the extents of the raw image.private static java.lang.String
FILE_RAW_OFFSET
Label of the parameter indicating the file offset.private static java.lang.String
FILE_RAW_RESOLUTIONS
Label of the parameter indicating the resolutions of the raw image.private static java.lang.String
FILE_RAW_UNITS
Label of the parameter indicating the units of measure of the raw image.-
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 ActionCreateBlankImage()
Constructor for the dynamic instantiation and execution of the CreateBlankImage script action.ActionCreateBlankImage(ModelImage input)
Constructor used to record the CreateBlankImage script action line.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addRawOptionsToParameters(ParameterTable parameters, FileInfoBase fileInfo)
Adds parameters to a table, describing a raw image.static FileInfoBase
getRawFileInfo(ParameterTable parameters)
Reads in the necessary file info from a set of parameters to read a RAW file.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.-
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
-
FILE_RAW_DATA_TYPE
private static final java.lang.String FILE_RAW_DATA_TYPE
Label of the parameter indicating the data type of the raw image.- See Also:
- Constant Field Values
-
FILE_RAW_ENDIANESS
private static final java.lang.String FILE_RAW_ENDIANESS
Label of the parameter indicating whether the raw image is big endian.- See Also:
- Constant Field Values
-
FILE_RAW_OFFSET
private static final java.lang.String FILE_RAW_OFFSET
Label of the parameter indicating the file offset.- See Also:
- Constant Field Values
-
FILE_RAW_EXTENTS
private static final java.lang.String FILE_RAW_EXTENTS
Label of the parameter indicating the extents of the raw image.- See Also:
- Constant Field Values
-
FILE_RAW_RESOLUTIONS
private static final java.lang.String FILE_RAW_RESOLUTIONS
Label of the parameter indicating the resolutions of the raw image.- See Also:
- Constant Field Values
-
FILE_RAW_UNITS
private static final java.lang.String FILE_RAW_UNITS
Label of the parameter indicating the units of measure of the raw image.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ActionCreateBlankImage
public ActionCreateBlankImage()
Constructor for the dynamic instantiation and execution of the CreateBlankImage script action.
-
ActionCreateBlankImage
public ActionCreateBlankImage(ModelImage input)
Constructor used to record the CreateBlankImage script action line.- Parameters:
input
- The blank image which was created.
-
-
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.
-
addRawOptionsToParameters
public static final void addRawOptionsToParameters(ParameterTable parameters, FileInfoBase fileInfo) throws ParserException
Adds parameters to a table, describing a raw image.- Parameters:
parameters
- The table to add the parameters to.fileInfo
- The file info to get the raw image description from.- Throws:
ParserException
- If there is a problem encountered adding the parameters.
-
getRawFileInfo
public static final FileInfoBase getRawFileInfo(ParameterTable parameters)
Reads in the necessary file info from a set of parameters to read a RAW file.- Parameters:
parameters
- The action parameters.- Returns:
- The file info necessary to read in the RAW file.
-
-