public abstract class JIPipeMergingAlgorithm extends JIPipeParameterSlotAlgorithm implements JIPipeParallelizedAlgorithm, JIPipeIterationStepAlgorithm, JIPipeAdaptiveParametersAlgorithm
JIPipeAlgorithm
that applies a similar algorithm to JIPipeIteratingAlgorithm
, but does create JIPipeMultiIterationStep
instead.
This algorithm instead just groups the data based on the annotations and passes those groups to
the runIteration() function. This is useful for merging algorithms.
Please note that the single-input case will still group the data into multiple groups, or just one group if no grouping could be acquired.JIPipeGraphNode.BaseDirectoryChangedEvent, JIPipeGraphNode.BaseDirectoryChangedEventEmitter, JIPipeGraphNode.BaseDirectoryChangedEventListener, JIPipeGraphNode.NodeSlotsChangedEvent, JIPipeGraphNode.NodeSlotsChangedEventEmitter, JIPipeGraphNode.NodeSlotsChangedEventListener, JIPipeGraphNode.Serializer
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterChangedEventEmitter, JIPipeParameterCollection.ParameterChangedEventListener, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEventEmitter, JIPipeParameterCollection.ParameterStructureChangedEventListener, JIPipeParameterCollection.ParameterUIChangedEvent, JIPipeParameterCollection.ParameterUIChangedEventEmitter, JIPipeParameterCollection.ParameterUIChangedEventListener
SLOT_PARAMETERS
Constructor and Description |
---|
JIPipeMergingAlgorithm(JIPipeMergingAlgorithm other)
Copies the algorithm
|
JIPipeMergingAlgorithm(JIPipeNodeInfo info)
Creates a new instance
|
JIPipeMergingAlgorithm(JIPipeNodeInfo info,
JIPipeSlotConfiguration slotConfiguration)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
void |
createUIInputSlotIconDescriptionMenuItems(String slotName,
List<ViewOnlyMenuItem> target)
Explanations added to the slot menu
Can be null
|
JIPipeDataBatchGenerationResult |
generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots,
JIPipeProgressInfo progressInfo)
Generates iteration steps.
|
JIPipeAdaptiveParameterSettings |
getAdaptiveParameterSettings() |
JIPipeMergingAlgorithmIterationStepGenerationSettings |
getDataBatchGenerationSettings() |
JIPipeIterationStepGenerationSettings |
getGenerationSettingsInterface()
Returns the batch generation settings as interface
|
Set<String> |
getIgnoredAnnotationColumns()
Returns annotation types that should be ignored by the internal logic.
|
int |
getParallelizationBatchSize()
Returns how many threads the actual algorithm requires.
|
ImageIcon |
getUIInputSlotIcon(String slotName)
An icon that is displayed on the right-hand side of the input slot
Can be null
|
Dimension |
getUIInputSlotIconBaseDimensions(String slotName)
Size of the icon returned by getUIInputSlotIcon
Should be at most 16x16
Defaults to 12x12
|
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterCollection subParameter)
Allows to override the visibility of sub-parameters inside the UI
|
protected abstract void |
runIteration(JIPipeMultiIterationStep iterationStep,
JIPipeIterationContext iterationContext,
JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo)
Runs code on one data row
|
void |
runParameterSet(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo,
List<JIPipeTextAnnotation> parameterAnnotations)
Runs a parameter set iteration
|
protected void |
runPassThrough(JIPipeProgressInfo progressInfo,
JIPipeMultiIterationStep iterationStep)
A pass-through variant for merging algorithms.
|
boolean |
supportsParallelization()
Indicates to the algorithm base implementation if parallelization is supported.
|
getDataInputSlotCount, getDataInputSlots, getFirstInputSlot, getNonParameterInputSlots, getParameterSlot, getParameterSlotAlgorithmSettings, onParameterChanged, run
canAutoPassThrough, canPassThrough, functionallyEquals, getDefaultCustomExpressionVariables, getRuntimePartition, isEnabled, isEnableDefaultCustomExpressionVariables, isPassThrough, isPostprocessor, isPreprocessor, isSkipped, loadExample, onDeserialized, reportValidity, runPassThrough, setEnabled, setPassThrough, setRuntimePartition, setSkipped
archiveTo, canUserDelete, clearLocations, clearSlotData, copySlotConfiguration, duplicate, emitNodeSlotsChangedEvent, fromJson, getAliasIdInParentGraph, getBaseDirectory, getBaseDirectoryChangedEventEmitter, getCategory, getCompartmentDisplayName, getCompartmentUUIDInGraphAsString, getCompartmentUUIDInParentGraph, getCustomDescription, getCustomName, getDependencies, getDisplayName, getEnvironmentDependencies, getFirstOutputSlot, getInfo, getInputSlot, getInputSlotMap, getInputSlotOrder, getInputSlots, getInputSlotsWithRole, getInternalStoragePath, getLastInputSlot, getLastOutputSlot, getName, getNewScratch, getNodeSlotsChangedEventEmitter, getNodeUILocationPerViewModePerCompartment, getNodeUILocationWithin, getOpenInputSlots, getOutputSlot, getOutputSlotMap, getOutputSlots, getOutputSlotsWithRole, getParentGraph, getProject, getProjectCompartment, getProjectDataDirs, getProjectDirectory, getRuntimeProject, getScratchBaseDirectory, getSlotConfiguration, getStoragePath, getTextDescription, getUUIDInParentGraph, hasInputSlot, hasOutputSlot, isBookmarked, isUiLocked, isVisibleIn, onSlotConfigurationChanged, renderInputSlots, renderOutputSlots, setBaseDirectory, setBookmarked, setCustomDescription, setCustomName, setInfo, setInternalStoragePath, setNodeUILocationPerViewModePerCompartment, setNodeUILocationWithin, setNodeUILocationWithin, setParentGraph, setProjectDirectory, setRuntimeProject, setScratchBaseDirectory, setSlotConfiguration, setStoragePath, setUiLocked, toggleSlot, toJson, updateGraphNodeSlots
getParameterChangedEventEmitter, getParameterStructureChangedEventEmitter, getParameterUIChangedEventEmitter, onParameterStructureChanged, onParameterUIChanged, registerSubParameter, registerSubParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateDataBatchesDryRun
installUIOverrideParameterEditor, installUIParameterOptions
deserializeFromJsonNode, emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, getParameterChangedEventEmitter, getParameterStructureChangedEventEmitter, getParameterUIChangedEventEmitter, serializeToJsonFile, serializeToJsonGenerator, serializeToJsonString, setParameter
generateValidityReport
onParameterUIChanged
onParameterStructureChanged
public JIPipeMergingAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- Algorithm infoslotConfiguration
- Slot configuration overridepublic JIPipeMergingAlgorithm(JIPipeNodeInfo info)
info
- Algorithm infopublic JIPipeMergingAlgorithm(JIPipeMergingAlgorithm other)
other
- The originalpublic JIPipeIterationStepGenerationSettings getGenerationSettingsInterface()
JIPipeIterationStepAlgorithm
getGenerationSettingsInterface
in interface JIPipeIterationStepAlgorithm
public Set<String> getIgnoredAnnotationColumns()
public JIPipeDataBatchGenerationResult generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots, JIPipeProgressInfo progressInfo)
JIPipeIterationStepAlgorithm
generateDataBatchesGenerationResult
in interface JIPipeIterationStepAlgorithm
slots
- the data slotsprogressInfo
- the progressprotected void runPassThrough(JIPipeProgressInfo progressInfo, JIPipeMultiIterationStep iterationStep)
progressInfo
- progress infoiterationStep
- the iteration steppublic void runParameterSet(JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo, List<JIPipeTextAnnotation> parameterAnnotations)
JIPipeParameterSlotAlgorithm
runParameterSet
in class JIPipeParameterSlotAlgorithm
runContext
- the run contextprogressInfo
- progress info from the runparameterAnnotations
- parameter annotationspublic Dimension getUIInputSlotIconBaseDimensions(String slotName)
JIPipeGraphNode
getUIInputSlotIconBaseDimensions
in class JIPipeParameterSlotAlgorithm
slotName
- the slot namepublic ImageIcon getUIInputSlotIcon(String slotName)
JIPipeGraphNode
getUIInputSlotIcon
in class JIPipeParameterSlotAlgorithm
slotName
- the slot namepublic void createUIInputSlotIconDescriptionMenuItems(String slotName, List<ViewOnlyMenuItem> target)
JIPipeGraphNode
createUIInputSlotIconDescriptionMenuItems
in class JIPipeParameterSlotAlgorithm
slotName
- the slot nametarget
- the list of menu itemsprotected abstract void runIteration(JIPipeMultiIterationStep iterationStep, JIPipeIterationContext iterationContext, JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo)
iterationStep
- The data interfaceiterationContext
- The iteration contextrunContext
- the run contextprogressInfo
- the progress from the runpublic boolean supportsParallelization()
JIPipeParallelizedAlgorithm
supportsParallelization
in interface JIPipeParallelizedAlgorithm
public int getParallelizationBatchSize()
JIPipeParallelizedAlgorithm
getParallelizationBatchSize
in interface JIPipeParallelizedAlgorithm
public boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterCollection subParameter)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeParameterSlotAlgorithm
tree
- the parameter tree that is used to access this parametersubParameter
- a sub parameterpublic boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterAccess access)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeAlgorithm
tree
- the parameter tree that is used to access this parameteraccess
- the parameterpublic JIPipeMergingAlgorithmIterationStepGenerationSettings getDataBatchGenerationSettings()
public JIPipeAdaptiveParameterSettings getAdaptiveParameterSettings()
getAdaptiveParameterSettings
in interface JIPipeAdaptiveParametersAlgorithm
Copyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.