Class GradientBase
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
- Direct Known Subclasses:
GradientBaseAddSum
,Sobel
Base class to calculate the gradient of the voxels in a
Channel
.
If the existing channel has appropriate voxel data-type, its voxels are replaced, otherwise new voxels are assigned.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Channel
convertToOutputType
(Channel channelToConvert) Converts the input channel to the output type specified byoutputShort
.double
Scale factor applied to the gradient values.boolean
If true, outputs a short channel, otherwise byte channel.void
setOutputShort
(boolean outputShort) If true, outputs a short channel, otherwise byte channel.void
setScaleFactor
(double scaleFactor) Scale factor applied to the gradient values.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
createFromChannel, get, getChannel, setChannel
Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStack
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
GradientBase
public GradientBase()
-
-
Method Details
-
convertToOutputType
Converts the input channel to the output type specified byoutputShort
. -
getScaleFactor
public double getScaleFactor()Scale factor applied to the gradient values.Default value is 1.0.
-
setScaleFactor
public void setScaleFactor(double scaleFactor) Scale factor applied to the gradient values.Default value is 1.0.
-
isOutputShort
public boolean isOutputShort()If true, outputs a short channel, otherwise byte channel.Default value is false.
-
setOutputShort
public void setOutputShort(boolean outputShort) If true, outputs a short channel, otherwise byte channel.Default value is false.
-