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
 
 public class ActionChangeName extends ActionImageProcessorBase A script action which changes the name of an image.
- 
- 
Field SummaryFields Modifier and Type Field Description private static java.lang.StringIMAGE_NAME_ACTION_LABELThe label to use for the parameter indicating whether the image name should be replaced, prepended to, or appended to.private static java.lang.StringIMAGE_NAME_LABELThe label to use for the parameter indicating the new image name.static java.lang.StringNAME_ACTION_APPENDThe 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 java.lang.StringNAME_ACTION_PREPENDThe 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 java.lang.StringNAME_ACTION_REPLACEThe 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 java.lang.StringrecordingNewImageNameThe new name given to the image.private java.lang.StringrecordingOldImageNameThe old image name.- 
Fields inherited from class gov.nih.mipav.model.scripting.actions.ActionImageProcessorBaseINPUT_IMAGE_LABEL, recordingInputImage, recordingResultImage
 - 
Fields inherited from class gov.nih.mipav.model.scripting.actions.ActionBaseisScript
 
- 
 - 
Constructor SummaryConstructors Constructor Description ActionChangeName()Constructor for the dynamic instantiation and execution of the script action.ActionChangeName(ModelImage image, java.lang.String oldImageName, java.lang.String newImageName)Constructor used to record the ChangeName script action line.
 - 
Method SummaryAll 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.voidsetNewImageName(java.lang.String name)Changes the image name which should be recorded as given to the input image.voidsetOldImageName(java.lang.String name)Changes the old name of the input image.- 
Methods inherited from class gov.nih.mipav.model.scripting.actions.ActionImageProcessorBasecreateInputImageParameter, isImageStoredInRecorder, setInputImage, setResultImage, storeImageInRecorder, storeImageInRunner
 - 
Methods inherited from class gov.nih.mipav.model.scripting.actions.ActionBasegetActionName, getActionName, isScript, setIsScript
 
- 
 
- 
- 
- 
Field Detail- 
NAME_ACTION_REPLACEpublic static final java.lang.String 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:
- Constant Field Values
 
 - 
NAME_ACTION_PREPENDpublic static final java.lang.String 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:
- Constant Field Values
 
 - 
NAME_ACTION_APPENDpublic static final java.lang.String 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:
- Constant Field Values
 
 - 
IMAGE_NAME_LABELprivate static final java.lang.String IMAGE_NAME_LABEL The label to use for the parameter indicating the new image name.- See Also:
- Constant Field Values
 
 - 
IMAGE_NAME_ACTION_LABELprivate static final java.lang.String 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:
- Constant Field Values
 
 - 
recordingNewImageNameprivate java.lang.String recordingNewImageName The new name given to the image.
 - 
recordingOldImageNameprivate java.lang.String recordingOldImageName The old image name.
 
- 
 - 
Constructor Detail- 
ActionChangeNamepublic ActionChangeName() Constructor for the dynamic instantiation and execution of the script action.
 - 
ActionChangeNamepublic ActionChangeName(ModelImage image, java.lang.String oldImageName, java.lang.String newImageName) 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 Detail- 
insertScriptLinepublic void insertScriptLine() If a script is being recorded and the action (read: algorithm) is done, add an entry for this action.- Specified by:
- insertScriptLinein interface- ScriptableActionInterface
- Specified by:
- insertScriptLinein class- ActionImageProcessorBase
 
 - 
scriptRunpublic void scriptRun(ParameterTable parameters) Sets up the action dialog state and then executes it.- Specified by:
- scriptRunin interface- ScriptableActionInterface
- Specified by:
- scriptRunin class- ActionImageProcessorBase
- Parameters:
- parameters- Table of parameters for the script to use.
 
 - 
setNewImageNamepublic void setNewImageName(java.lang.String name) Changes the image name which should be recorded as given to the input image.- Parameters:
- name- The new name given to the input image.
 
 - 
setOldImageNamepublic void setOldImageName(java.lang.String name) Changes the old name of the input image.- Parameters:
- name- The old name of the input image.
 
 
- 
 
-