Class CannyEdgeDetectionImageFilter

java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.CannyEdgeDetectionImageFilter

public class CannyEdgeDetectionImageFilter extends ImageFilter
This filter is an implementation of a Canny edge detector for scalar- valued images. Based on John Canny's paper "A Computational Approach to Edge Detection"(IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. PAMI-8, No.6, November 1986), there are four major steps used in the edge-detection scheme: (1) Smooth the input image with Gaussian filter. (2) Calculate the second directional derivatives of the smoothed image. (3) Non-Maximum Suppression: the zero-crossings of 2nd derivative are found, and the sign of third derivative is used to find the correct extrema. (4) The hysteresis thresholding is applied to the gradient magnitude (multiplied with zero-crossings) of the smoothed image to find and link edges. Inputs and Outputs The input to this filter should be a scalar, real-valued Itk image of arbitrary dimension. The output should also be a scalar, real-value Itk image of the same dimensionality. Parameters There are four parameters for this filter that control the sub-filters used by the algorithm. Variance and Maximum error are used in the Gaussian smoothing of the input image. See itkDiscreteGaussianImageFilter for information on these parameters. Threshold is the lowest allowed value in the output image. Its data type is the same as the data type of the output image. Any values below the Threshold level will be replaced with the OutsideValue parameter value, whose default is zero. TodoEdge-linking will be added when an itk connected component labeling algorithm is available. See: DiscreteGaussianImageFilter ZeroCrossingImageFilter ThresholdImageFilter itk::simple::CannyEdgeDetection for the procedural interface itk::CannyEdgeDetectionImageFilter for the Doxygen on the original ITK class. C++ includes: sitkCannyEdgeDetectionImageFilter.h
  • Constructor Details

    • CannyEdgeDetectionImageFilter

      protected CannyEdgeDetectionImageFilter(long cPtr, boolean cMemoryOwn)
    • CannyEdgeDetectionImageFilter

      public CannyEdgeDetectionImageFilter()
      itk::simple::CannyEdgeDetectionImageFilter::CannyEdgeDetectionImageFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(CannyEdgeDetectionImageFilter obj)
    • swigRelease

      protected static long swigRelease(CannyEdgeDetectionImageFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::CannyEdgeDetectionImageFilter::~CannyEdgeDetectionImageFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • setLowerThreshold

      public void setLowerThreshold(double LowerThreshold)
      Self& itk::simple::CannyEdgeDetectionImageFilter::SetLowerThreshold(double LowerThreshold) Set the lower threshold value for detected edges.
    • getLowerThreshold

      public double getLowerThreshold()
      double itk::simple::CannyEdgeDetectionImageFilter::GetLowerThreshold() const
    • setUpperThreshold

      public void setUpperThreshold(double UpperThreshold)
      Self& itk::simple::CannyEdgeDetectionImageFilter::SetUpperThreshold(double UpperThreshold) Set the upper threshold value for detected edges. TODO: Document in the ITKv4 migration guide that the SetThreshold member function was removed from the CannyEdgeDetectionImageFilter , and that both UpperThreshold and LowerThreshold need to be set. To get the same results as with the SetThreshold method change "myfilter->SetThrehsold" to "myfilter->SetUpperThreshold", and add "myfilter->SetLowerThreshold(GetUpperThreshold()/2.0)".
    • getUpperThreshold

      public double getUpperThreshold()
      double itk::simple::CannyEdgeDetectionImageFilter::GetUpperThreshold() const
    • setVariance

      public void setVariance(VectorDouble Variance)
      Self& itk::simple::CannyEdgeDetectionImageFilter::SetVariance(std::vector< double > Variance) Set/Get the variance of the Gaussian smoothing filter.
    • setVariance

      public void setVariance(double value)
      Self& itk::simple::CannyEdgeDetectionImageFilter::SetVariance(std::vector< double > Variance) Set/Get the variance of the Gaussian smoothing filter.
    • getVariance

      public VectorDouble getVariance()
      std::vector<double> itk::simple::CannyEdgeDetectionImageFilter::GetVariance() const Set/Get the variance of the Gaussian smoothing filter.
    • setMaximumError

      public void setMaximumError(VectorDouble MaximumError)
      Self& itk::simple::CannyEdgeDetectionImageFilter::SetMaximumError(std::vector< double > MaximumError) Set/Get the MaximumError parameter used by the Gaussian smoothing filter in this algorithm
    • setMaximumError

      public void setMaximumError(double value)
      Self& itk::simple::CannyEdgeDetectionImageFilter::SetMaximumError(std::vector< double > MaximumError) Set/Get the MaximumError parameter used by the Gaussian smoothing filter in this algorithm
    • getMaximumError

      public VectorDouble getMaximumError()
      std::vector<double> itk::simple::CannyEdgeDetectionImageFilter::GetMaximumError() const Set/Get the maximum error of the Gaussian smoothing kernel in each dimensional direction.
    • getName

      public String getName()
      std::string itk::simple::CannyEdgeDetectionImageFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::CannyEdgeDetectionImageFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image image1)
      Image itk::simple::CannyEdgeDetectionImageFilter::Execute(const Image &image1) Execute the filter on the input image