Package gov.nih.mipav.view.dialogs
Class DataProvenanceParameters
- java.lang.Object
-
- gov.nih.mipav.view.dialogs.AlgorithmParameters
-
- gov.nih.mipav.view.dialogs.DataProvenanceParameters
-
public class DataProvenanceParameters extends AlgorithmParameters
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:
JDialogGaussianBlur
-
-
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
Constructors Constructor Description DataProvenanceParameters()Creates a new DataProvenanceParameters object to be used to record the current parameters entered into the algorithm's GUI by the user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static booleanisImageStoredInRecorder(ModelImage image)Returns whether an image has been registered in the script recorder.java.lang.StringstoreImage(ModelImage image, java.lang.String paramLabel)Stores an input image in the list of parameters for the algorithm.java.lang.StringstoreImageInRecorder(ModelImage image)Store an image in the script recorder image variable table.java.lang.StringstoreInputImage(ModelImage inputImage)Stores an input image in the list of parameters for the algorithm.voidstoreNumIterations(int numIters)DOCUMENT ME!java.lang.StringstoreOutputImageParams(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
-
-
-
-
Method Detail
-
storeImageInRecorder
public java.lang.String storeImageInRecorder(ModelImage image)
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
public java.lang.String storeImage(ModelImage image, java.lang.String paramLabel) throws ParserException
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
public java.lang.String storeInputImage(ModelImage inputImage) throws ParserException
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
public void storeNumIterations(int numIters) throws ParserExceptionDOCUMENT ME!- Overrides:
storeNumIterationsin classAlgorithmParameters- Parameters:
numIters- DOCUMENT ME!- Throws:
ParserException- DOCUMENT ME!
-
storeOutputImageParams
public java.lang.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
protected static final boolean isImageStoredInRecorder(ModelImage image)
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.
-
-