{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "When "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "decomposition"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is not None, each element of the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "footprint",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": null,
                "version": null,
                "kind": "local",
                "path": "footprint"
              },
              "kind": "local"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " tuple is a 2-tuple of the form "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "(ndarray, num_iter)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " that specifies a footprint array and the number of iterations it is to be applied."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The disk produced by the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "decomposition='sequence'"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " mode may not be identical to that with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "decomposition=None"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". A disk footprint can be approximated by applying a series of smaller footprints of extent 3 along each axis. Specific solutions for this are given in "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for the case of 2D disks with radius 2 through 10. Here, we numerically computed the number of repetitions of each element that gives the closest match to the disk computed with kwargs "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "strict_radius=False, decomposition=None"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Empirically, the series decomposition at large radius approaches a hexadecagon (a 16-sided polygon "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "). In "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "3"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", the authors demonstrate that a hexadecagon is the closest approximation to a disk that can be achieved for decomposition with footprints of shape (3, 3)."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The disk produced by the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "decomposition='crosses'"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is often but not always  identical to that with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "decomposition=None"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". It tends to give a closer approximation than "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "decomposition='sequence'"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", at a performance that is fairly comparable. The individual cross-shaped elements are not limited to extent (3, 3) in size. Unlike the 'seqeuence' decomposition, the 'crosses' decomposition can also accurately approximate the shape of disks with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "strict_radius=True"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". The method is based on an adaption of algorithm 1 given in "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "4"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "footprint",
              "annotation": "ndarray",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The footprint where elements of the neighborhood are 1 and 0 otherwise."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Generates a flat, disk-shaped footprint."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "radius",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The radius of the disk-shaped footprint."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A pixel is within the neighborhood if the Euclidean distance between it and the origin is no greater than radius (This is only approximately True, when "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "decomposition == 'sequence'",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ")."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "dtype",
              "annotation": "dtype-like, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The data type of the footprint."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "strict_radius",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If False, extend the radius by 0.5. This allows the circle to expand further within a cube that remains of size "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "2 * radius + 1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " along each axis. This parameter is ignored if decomposition is not None."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "decomposition",
              "annotation": "{None, 'sequence', 'crosses'}, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If None, a single array is returned. For 'sequence', a tuple of smaller footprints is returned. Applying this series of smaller footprints will given a result equivalent to a single, larger footprint, but with better computational performance. For disk footprints, the 'sequence' or 'crosses' decompositions are not always exactly equivalent to "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "decomposition=None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". See Notes for more details."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Returns",
    "Yields",
    "Receives",
    "Raises",
    "Warns",
    "Other Parameters",
    "Attributes",
    "Methods",
    "Notes",
    "Warnings"
  ],
  "item_file": "/dev/scikit-image/src/skimage/morphology/footprints.py",
  "item_line": 487,
  "item_type": "function",
  "aliases": [
    "skimage.morphology.disk"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "radius",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "dtype",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "<class 'numpy.uint8'>"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "strict_radius",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "True"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "decomposition",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "KEYWORD_ONLY",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "disk"
  },
  "references": [
    ".. [1] Park, H and Chin R.T. Decomposition of structuring elements for",
    "       optimal implementation of morphological operations. In Proceedings:",
    "       1997 IEEE Workshop on Nonlinear Signal and Image Processing, London,",
    "       UK.",
    "       https://www.iwaenc.org/proceedings/1997/nsip97/pdf/scan/ns970226.pdf",
    ".. [2] https://en.wikipedia.org/wiki/Hexadecagon",
    ".. [3] Vanrell, M and Vitrià, J. Optimal 3 × 3 decomposable disks for",
    "       morphological transformations. Image and Vision Computing, Vol. 15,",
    "       Issue 11, 1997.",
    "       :DOI:`10.1016/S0262-8856(97)00026-7`",
    ".. [4] Li, D. and Ritter, G.X. Decomposition of Separable and Symmetric",
    "       Convex Templates. Proc. SPIE 1350, Image Algebra and Morphological",
    "       Image Processing, (1 November 1990).",
    "       :DOI:`10.1117/12.23608`"
  ],
  "qa": "skimage.morphology.footprints:disk",
  "arbitrary": [],
  "local_refs": [
    "decomposition",
    "dtype",
    "footprint",
    "radius",
    "strict_radius"
  ]
}