Class ActionChangeName
java.lang.Object
gov.nih.mipav.model.scripting.actions.ActionBase
gov.nih.mipav.model.scripting.actions.ActionImageProcessorBase
gov.nih.mipav.model.scripting.actions.ActionChangeName
- All Implemented Interfaces:
ScriptableActionInterface
A script action which changes the name of an image.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe label to use for the parameter indicating whether the image name should be replaced, prepended to, or appended to.private static final StringThe label to use for the parameter indicating the new image name.static final StringThe value that can be used with the 'image_name_action' parameter to indicate that the 'new_image_name' parameter should be appended to the current image name.static final StringThe value that can be used with the 'image_name_action' parameter to indicate that the 'new_image_name' parameter should be prepended to the current image name.static final StringThe value that can be used with the 'image_name_action' parameter to indicate that the current image name should be replaced with the 'new_image_name' parameter value.private StringThe new name given to the image.private StringThe old image name.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 script action.ActionChangeName(ModelImage image, String oldImageName, String newImageName) Constructor used to record the ChangeName 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.voidsetNewImageName(String name) Changes the image name which should be recorded as given to the input image.voidsetOldImageName(String name) Changes the old name of the input image.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
-
NAME_ACTION_REPLACE
The value that can be used with the 'image_name_action' parameter to indicate that the current image name should be replaced with the 'new_image_name' parameter value.- See Also:
-
NAME_ACTION_PREPEND
The value that can be used with the 'image_name_action' parameter to indicate that the 'new_image_name' parameter should be prepended to the current image name.- See Also:
-
NAME_ACTION_APPEND
The value that can be used with the 'image_name_action' parameter to indicate that the 'new_image_name' parameter should be appended to the current image name.- See Also:
-
IMAGE_NAME_LABEL
The label to use for the parameter indicating the new image name.- See Also:
-
IMAGE_NAME_ACTION_LABEL
The label to use for the parameter indicating whether the image name should be replaced, prepended to, or appended to.- See Also:
-
recordingNewImageName
The new name given to the image. -
recordingOldImageName
The old image name.
-
-
Constructor Details
-
ActionChangeName
public ActionChangeName()Constructor for the dynamic instantiation and execution of the script action. -
ActionChangeName
Constructor used to record the ChangeName script action line.- Parameters:
image- The image whose name was changed.oldImageName- The old name of the image.newImageName- The new name given to the image (the image's current name).
-
-
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.
-
setNewImageName
Changes the image name which should be recorded as given to the input image.- Parameters:
name- The new name given to the input image.
-
setOldImageName
Changes the old name of the input image.- Parameters:
name- The old name of the input image.
-