Package gov.nih.mipav.view.dialogs
Class DataProvenanceParameters
java.lang.Object
gov.nih.mipav.view.dialogs.AlgorithmParameters
gov.nih.mipav.view.dialogs.DataProvenanceParameters
This class standardizes the parameter names given to many common parameters used in algorithms. It also provides helper methods to store/retrieve those common parameters.
- See Also:
-
Field Summary
Fields inherited from class gov.nih.mipav.view.dialogs.AlgorithmParameters
currentInputImageLabelNumber, DO_OUTPUT_NEW_IMAGE, DO_PROCESS_3D_AS_25D, DO_PROCESS_RGB, DO_PROCESS_SEPARABLE, DO_PROCESS_WHOLE_IMAGE, INPUT_IMAGE_LABEL_BASE, NUM_ITERATIONS, params, RESULT_IMAGE, SIGMA_DO_Z_RES_CORRECTION, SIGMAS, USE_OPENCL -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DataProvenanceParameters object to be used to record the current parameters entered into the algorithm's GUI by the user. -
Method Summary
Modifier and TypeMethodDescriptionprotected static final booleanReturns whether an image has been registered in the script recorder.storeImage(ModelImage image, String paramLabel) Stores an input image in the list of parameters for the algorithm.storeImageInRecorder(ModelImage image) Store an image in the script recorder image variable table.storeInputImage(ModelImage inputImage) Stores an input image in the list of parameters for the algorithm.voidstoreNumIterations(int numIters) DOCUMENT ME!storeOutputImageParams(ModelImage outputImage, boolean isNewImage) Stores information about the output of images for this algorithm in the parameter table.Methods inherited from class gov.nih.mipav.view.dialogs.AlgorithmParameters
doOutputNewImage, doProcess3DAs25D, doProcessRGB, doProcessSeparable, doProcessWholeImage, doSigmaResolutionCorrection, getInputImageLabel, getNumIterations, getParams, getUnnormalizedSigmas, retrieveImage, retrieveInputImage, retrieveInputImage, setColorOptionsGUI, setOutputOptionsGUI, setSigmasGUI, storeColorOptions, storeColorOptions, storeImageInRunner, storeProcess3DAs25D, storeProcessingOptions, storeProcessSeparable, storeProcessWholeImage, storeSigmas, storeSigmas, storeWaterShed, tryToStoreResultImageInRunner
-
Constructor Details
-
DataProvenanceParameters
public DataProvenanceParameters()Creates a new DataProvenanceParameters object to be used to record the current parameters entered into the algorithm's GUI by the user.
-
-
Method Details
-
storeImageInRecorder
Store an image in the script recorder image variable table. Used to store input/output images while recording a script. Should not be used while running a script.- Overrides:
storeImageInRecorderin classAlgorithmParameters- Parameters:
image- The image to store in the variable table.- Returns:
- The image placeholder variable assigned to the image by the variable table.
-
storeImage
Stores an input image in the list of parameters for the algorithm.- Overrides:
storeImagein classAlgorithmParameters- Parameters:
image- The image to store.paramLabel- The label to give to the new image parameter.- Returns:
- The image placeholder variable assigned to the image by the variable table.
- Throws:
ParserException- If there is a problem creating one of the new parameters.
-
storeInputImage
Stores an input image in the list of parameters for the algorithm. This image is stored with a new parameter label incremented with each new call to this method.- Overrides:
storeInputImagein classAlgorithmParameters- Parameters:
inputImage- The input image to store.- Returns:
- The image placeholder variable assigned to the image by the variable table.
- Throws:
ParserException- If there is a problem creating one of the new parameters.
-
storeNumIterations
DOCUMENT ME!- Overrides:
storeNumIterationsin classAlgorithmParameters- Parameters:
numIters- DOCUMENT ME!- Throws:
ParserException- DOCUMENT ME!
-
storeOutputImageParams
public String storeOutputImageParams(ModelImage outputImage, boolean isNewImage) throws ParserException Stores information about the output of images for this algorithm in the parameter table. It first stores whether a new output image should be generated by the algorithm, and then (if a new image should be generated) stores the new output image in the variable table.- Overrides:
storeOutputImageParamsin classAlgorithmParameters- Parameters:
outputImage- The result image generated by the algorithm (may benullifisNewImageisfalse.isNewImage- Whether the algorithm should output a new image when it is executed.- Returns:
- The new image placeholder variable assigned to the result image (or
nullif no output image should be generated). - Throws:
ParserException- If there is a problem creating one of the new parameters.
-
isImageStoredInRecorder
Returns whether an image has been registered in the script recorder. If it has not been used, it must be specified externally when this script is run later.- Parameters:
image- The image to look for in the recorder's image table.- Returns:
Trueif the image has been stored in the recorder's image table,falseotherwise.
-