public class CannyEdgeDetectorAlgorithm extends JIPipeSimpleIteratingAlgorithm
This is a plugin version of Tom Gibara's implementation of the Canny edge detection algorithm in Java, available at:
http://www.tomgibara.com/computer-vision/canny-edge-detectorThis software has been released into the public domain. Please read the notes in this source file for additional information.
This class provides a configurable implementation of the Canny edge detection algorithm. This classic algorithm has a number of shortcomings, but remains an effective tool in many scenarios. This class is designed for single threaded use only.
For a more complete understanding of this edge detector's parameters consult an explanation of the algorithm.
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 |
---|
CannyEdgeDetectorAlgorithm(CannyEdgeDetectorAlgorithm other) |
CannyEdgeDetectorAlgorithm(JIPipeNodeInfo info)
Instantiates a new node type.
|
Modifier and Type | Method and Description |
---|---|
float |
getGaussianKernelRadius() |
int |
getGaussianKernelWidth() |
double |
getHighThreshold() |
double |
getLowThreshold() |
boolean |
isNormalizeContrast() |
protected void |
runIteration(JIPipeSingleIterationStep iterationStep,
JIPipeIterationContext iterationContext,
JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo)
Runs code on one data row
|
void |
setGaussianKernelRadius(float gaussianKernelRadius) |
void |
setGaussianKernelWidth(int gaussianKernelWidth) |
void |
setHighThreshold(double highThreshold) |
void |
setLowThreshold(double lowThreshold) |
void |
setNormalizeContrast(boolean normalizeContrast) |
boolean |
supportsParallelization()
Indicates to the algorithm base implementation if parallelization is supported.
|
createUIInputSlotIconDescriptionMenuItems, generateDataBatchesGenerationResult, getAdaptiveParameterSettings, getDataBatchGenerationSettings, getGenerationSettingsInterface, getParallelizationBatchSize, isAllowEmptyIterationStep, isParameterUIVisible, isParameterUIVisible, reportValidity, runParameterSet, runPassThrough
getDataInputSlotCount, getDataInputSlots, getFirstInputSlot, getNonParameterInputSlots, getParameterSlot, getParameterSlotAlgorithmSettings, getUIInputSlotIcon, getUIInputSlotIconBaseDimensions, onParameterChanged, run
canAutoPassThrough, canPassThrough, functionallyEquals, getDefaultCustomExpressionVariables, getRuntimePartition, isEnabled, isEnableDefaultCustomExpressionVariables, isPassThrough, isPostprocessor, isPreprocessor, isSkipped, loadExample, onDeserialized, 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 CannyEdgeDetectorAlgorithm(JIPipeNodeInfo info)
info
- the infopublic CannyEdgeDetectorAlgorithm(CannyEdgeDetectorAlgorithm other)
public float getGaussianKernelRadius()
public void setGaussianKernelRadius(float gaussianKernelRadius)
public int getGaussianKernelWidth()
public void setGaussianKernelWidth(int gaussianKernelWidth)
public double getLowThreshold()
public void setLowThreshold(double lowThreshold)
public double getHighThreshold()
public void setHighThreshold(double highThreshold)
public boolean isNormalizeContrast()
public void setNormalizeContrast(boolean normalizeContrast)
protected void runIteration(JIPipeSingleIterationStep iterationStep, JIPipeIterationContext iterationContext, JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo)
JIPipeSimpleIteratingAlgorithm
runIteration
in class JIPipeSimpleIteratingAlgorithm
iterationStep
- The data interfaceiterationContext
- the iteration contextrunContext
- the run contextprogressInfo
- the progress info from the runpublic boolean supportsParallelization()
JIPipeParallelizedAlgorithm
supportsParallelization
in interface JIPipeParallelizedAlgorithm
supportsParallelization
in class JIPipeSimpleIteratingAlgorithm
Copyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.