ImageMagick.MagickScript.ExecuteSegment C# (CSharp) Метод

ExecuteSegment() приватный Метод

private ExecuteSegment ( XmlElement element, MagickImage image ) : void
element XmlElement
image MagickImage
Результат void
    private void ExecuteSegment(XmlElement element, MagickImage image)
    {
      Hashtable arguments = new Hashtable();
      foreach (XmlAttribute attribute in element.Attributes)
      {
        if (attribute.Name == "clusterThreshold")
          arguments["clusterThreshold"] = Variables.GetValue<double>(attribute);
        else if (attribute.Name == "quantizeColorSpace")
          arguments["quantizeColorSpace"] = Variables.GetValue<ColorSpace>(attribute);
        else if (attribute.Name == "smoothingThreshold")
          arguments["smoothingThreshold"] = Variables.GetValue<double>(attribute);
      }
      if (arguments.Count == 0)
        image.Segment();
      else if (OnlyContains(arguments, "quantizeColorSpace", "clusterThreshold", "smoothingThreshold"))
        image.Segment((ColorSpace)arguments["quantizeColorSpace"], (double)arguments["clusterThreshold"], (double)arguments["smoothingThreshold"]);
      else
        throw new ArgumentException("Invalid argument combination for 'segment', allowed combinations are: [] [quantizeColorSpace, clusterThreshold, smoothingThreshold]");
    }
    private void ExecuteSelectiveBlur(XmlElement element, MagickImage image)
MagickScript