public abstract class JIPipeAlgorithm extends JIPipeGraphNode
JIPipeGraphNode
that contains a non-empty workload.
This class contains additional parameters to control the workload behavior.
Please prefer to use this class or its derivatives if you write your algorithms.JIPipeGraphNode.BaseDirectoryChangedEvent, JIPipeGraphNode.Serializer
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterUIChangedEvent
Constructor and Description |
---|
JIPipeAlgorithm(JIPipeAlgorithm other)
Creates a copy
|
JIPipeAlgorithm(JIPipeNodeInfo info)
Initializes a new node type instance
|
JIPipeAlgorithm(JIPipeNodeInfo info,
JIPipeSlotConfiguration slotConfiguration)
Initializes a new node type instance and sets a custom slot configuration
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canAutoPassThrough()
Returns true if the algorithm can automatically apply pass-through
This is only possible if there is at most one input and at most one output.
|
protected boolean |
canPassThrough()
Returns true if the algorithm can apply pass-through.
|
boolean |
functionallyEquals(Object other)
Returns true if this node and the other node are functionally equal (i.e. they have the same functional parameters).
|
JIPipeFixedThreadPool |
getThreadPool() |
boolean |
isEnabled() |
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
boolean |
isPassThrough() |
boolean |
isPostprocessor()
Indicates if the node should be run after all other nodes.
|
boolean |
isPreprocessor()
Indicates if the node should be run before all other nodes.
|
void |
loadExample(JIPipeNodeExample example)
Loads an example.
|
void |
reportValidity(JIPipeIssueReport report)
Generates a validity report
|
void |
run(JIPipeProgressInfo progressInfo)
Runs the workload
|
protected void |
runPassThrough(JIPipeProgressInfo progressInfo)
Runs the pass through.
|
void |
setEnabled(boolean enabled) |
void |
setPassThrough(boolean passThrough) |
void |
setThreadPool(JIPipeFixedThreadPool threadPool)
Sets the thread pool.
|
archiveTo, canUserDelete, clearLocations, clearSlotData, copySlotConfiguration, createUIInputSlotIconDescriptionMenuItems, duplicate, fromJson, fromJsonNode, getAliasIdInParentGraph, getBaseDirectory, getCategory, getCompartmentDisplayName, getCompartmentUUIDInGraphAsString, getCompartmentUUIDInParentGraph, getCustomDescription, getDataInputSlots, getDependencies, getDisplayName, getEventBus, getFirstInputSlot, getFirstOutputSlot, getInfo, getInputSlot, getInputSlotMap, getInputSlotOrder, getInputSlots, getInputSlotsWithRole, getInternalStoragePath, getLastInputSlot, getLastOutputSlot, getLocations, getLocationWithin, getName, getNewScratch, getOpenInputSlots, getOutputSlot, getOutputSlotMap, getOutputSlots, getOutputSlotsWithRole, getParentGraph, getProjectCompartment, getProjectDirectory, getScratchBaseDirectory, getSlotConfiguration, getStoragePath, getUIInputSlotIcon, getUIInputSlotIconBaseDimensions, getUUIDInParentGraph, hasInputSlot, hasOutputSlot, isBookmarked, isVisibleIn, onDeserialized, onParameterChanged, onParameterStructureChanged, onParameterUIChanged, onSlotConfigurationChanged, registerSubParameter, renderInputSlots, renderOutputSlots, setBaseDirectory, setBookmarked, setCustomDescription, setCustomName, setInfo, setInternalStoragePath, setLocations, setLocationWithin, setLocationWithin, setParentGraph, setProjectDirectory, setScratchBaseDirectory, setSlotConfiguration, setStoragePath, toggleSlot, toJson, triggerSlotsChangedEvent, updateGraphNodeSlots
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateValidityReport
addParameterChangeListener, addParameterChangeListener, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, isParameterUIVisible, setParameter, triggerParameterChange, triggerParameterStructureChange, triggerParameterUIChange
public JIPipeAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- The algorithm infoslotConfiguration
- The slot configurationpublic JIPipeAlgorithm(JIPipeNodeInfo info)
info
- The algorithm infopublic JIPipeAlgorithm(JIPipeAlgorithm other)
other
- the originalpublic void run(JIPipeProgressInfo progressInfo)
JIPipeGraphNode
run
in class JIPipeGraphNode
progressInfo
- progress passed from the runnerpublic void reportValidity(JIPipeIssueReport report)
JIPipeValidatable
report
- the report to be added toprotected void runPassThrough(JIPipeProgressInfo progressInfo)
progressInfo
- the progressprotected boolean canAutoPassThrough()
protected boolean canPassThrough()
public boolean isEnabled()
public void setEnabled(boolean enabled)
public boolean isPassThrough()
public void setPassThrough(boolean passThrough)
public boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterAccess access)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeGraphNode
tree
- the parameter tree that is used to access this parameteraccess
- the parameterpublic boolean functionallyEquals(Object other)
JIPipeGraphNode
JIPipeNodeInfo
is equalfunctionallyEquals
in interface JIPipeFunctionallyComparable
functionallyEquals
in class JIPipeGraphNode
other
- the other nodepublic boolean isPreprocessor()
public boolean isPostprocessor()
public JIPipeFixedThreadPool getThreadPool()
public void setThreadPool(JIPipeFixedThreadPool threadPool)
threadPool
- can be null (forces single-threaded run)public void loadExample(JIPipeNodeExample example)
example
- the exampleCopyright © 2020–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.