{
    "version": "20250623.14",
    "nodes": [
        {
            "style": "experimental",
            "name": "Filesystem-base",
            "abstract": true,
            "layer": "filesystem",
            "category": "Filesystem",
            "properties": [
                {"name": "filename", "type": "text", "default": ""}
            ]
        },
        {
            "style": "labeled",
            "name": "LoadVideo",
            "extends": ["Filesystem-base"],
            "interfaces": [{"name": "frames_out", "type": "Image", "direction": "output"}],
            "description": "### Information \n\n Node used to load a video and parametrize the *filename*.\n\nAdditionally the video can be passed to another node."
        },
        {
            "style": "labeled",
            "name": "SaveVideo",
            "extends": ["Filesystem-base"],
            "interfaces": [
                {"name": "frames_in", "type": ["Image", "BinaryImage"], "direction": "input"}
            ]
        },
        {
            "style": "experimental",
            "name": "SaveFrames",
            "layer": "filesystem",
            "category": "Filesystem",
            "properties": [
                {"name": "Folder name", "type": "text", "default": ""},
                {"name": "Name prefix", "type": "text", "default": ""}
            ],
            "interfaces": [
                {"name": "color", "type": "Image", "direction": "input"},
                {"name": "binary", "type": "BinaryImage", "direction": "input"}
            ],
            "color": "#007dc3"
        },
        {
            "style": "experimental",
            "name": "SaveFrame",
            "extends": ["Filesystem-base"],
            "properties": [
                {"name": "Frame number", "type": "integer", "default": 0, "hideOnDefault": true}
            ],
            "interfaces": [
                {"name": "color", "type": "Image", "direction": "input"},
                {"name": "binary", "type": "BinaryImage", "direction": "input"}
            ],
            "color": "#0093e5"
        },
        {
            "style": "experimental",
            "name": "GaussianKernel",
            "layer": "kernel",
            "category": "Generators",
            "properties": [
                {"name": "size", "type": "integer", "default": 5},
                {"name": "sigma", "type": "number", "default": 1.0},
                {"name": "tags", "type": "list", "dtype": "string", "default": []}
            ],
            "interfaces": [{"name": "kernel", "type": "Image", "direction": "output"}],
            "color": "#6f091a"
        },
        {
            "style": "experimental",
            "name": "SobelKernel",
            "layer": "kernel",
            "category": "Generators",
            "properties": [
                {"name": "size", "type": "integer", "default": 3}
            ],
            "interfaces": [
                {"name": "Horizontal edge kernel", "type": "Image", "direction": "output"},
                {"name": "Vertical edge kernel", "type": "Image", "direction": "output"}
            ],
            "color": "#900b22"
        },
        {
            "style": "experimental",
            "name": "StructuringElement",
            "layer": "kernel",
            "category": "Generators",
            "properties": [
                {"name": "size", "type": "integer", "default": 5},
                {
                    "name": "shape",
                    "type": "select",
                    "values": ["Rectangle", "Cross", "Ellipse"],
                    "default": "Cross"
                }
            ],
            "interfaces": [{"name": "kernel", "type": "BinaryImage", "direction": "output"}],
            "color": "#bd0e2d"
        },
        {
            "style": "experimental",
            "category": "Processing/Color images",
            "isCategory": true,
            "interfaces": [
                {"name": "input 1", "type": "Image", "direction": "input"},
                {"name": "output 1", "type": "Image", "direction": "output"}
            ]
        },
        {
            "style": "experimental",
            "category": "Processing/Binary images",
            "isCategory": true,
            "interfaces": [
                {"name": "input 1", "type": "BinaryImage", "direction": "input"},
                {"name": "output 1", "type": "BinaryImage", "direction": "output"}
            ]
        },
        {
            "style": "experimental",
            "name": "Filter2D",
            "extends": ["Color images"],
            "description": "Node that applies a *2D* filter.",
            "properties": [
                {"name": "iterations", "type": "integer", "default": 1},
                {
                    "name": "border type",
                    "type": "select",
                    "values": ["constant", "replicate", "wrap", "reflect"],
                    "default": "constant"
                },
                {
                    "name": "Wiki",
                    "type": "button-url",
                    "default": "https://en.wikipedia.org/wiki/Two-dimensional_filter"
                }
            ],
            "interfaces": [
                {"name": "kernel", "type": "Image", "direction": "input"}
            ],
            "color": "#4e096f"
        },
        {
            "style": "experimental",
            "name": "Threshold",
            "extends": ["Binary images"],
            "interfaces": [
                {"name": "input 1", "type": "Image", "direction": "input", "override": true}
            ],
            "properties": [
                {"name": "threshold_value", "type": "integer", "default": 1},
                {
                    "name": "threshold_type",
                    "type": "select",
                    "values": ["Binary", "Truncate", "Otsu"],
                    "default": "constant"
                }
            ],
            "color": "#073400"
        },
        {
            "style": "experimental",
            "name": "CannyEdgeDetection",
            "extends": ["Color images"],
            "category": "Processing/Color images",
            "properties": [
                {"name": "sigma", "type": "text", "default": "1.4"},
                {"name": "kernel size", "type": "integer", "default": 3}
            ],
            "color": "#9e1fda"
        },
        {
            "style": "experimental",
            "name": "Scale",
            "extends": ["Color images"],
            "category": "Processing/Color images",
            "properties": [
                {"name": "Scaling factor", "type": "text", "default": "1.75"}
            ],
            "color": "#650b90"
        },
        {
            "style": "experimental",
            "name": "Logical AND",
            "extends": ["Binary images"],
            "category": "Processing/Binary images",
            "interfaces": [
                {"name": "input 2", "type": "BinaryImage", "direction": "input"}
            ],
            "color": "#99bb22"
        },
        {
            "style": "experimental",
            "name": "Logical OR",
            "extends": ["Binary images"],
            "category": "Processing/Binary images",
            "interfaces": [
                {"name": "input 2", "type": "BinaryImage", "direction": "input"}
            ],
            "color": "#127f00"
        },
        {
            "style": "experimental",
            "name": "Logical NOT",
            "extends": ["Binary images"],
            "category": "Processing/Binary images",
            "color": "#159500"
        },
        {
            "style": "experimental",
            "name": "Logical XOR",
            "extends": ["Binary images"],
            "category": "Processing/Binary images",
            "interfaces": [
                {"name": "input 2", "type": "BinaryImage", "direction": "input"}
            ],
            "color": "#38a526"
        },
        {
            "style": "experimental",
            "name": "Morphological operation",
            "extends": ["Binary images"],
            "category": "Processing/Binary images",
            "properties": [
                {
                    "name": "Enable operations", "type": "bool", "default": true, "group": [
                        {"name": "iterations", "type": "integer", "default": 1},
                        {
                            "name": "border type",
                            "type": "select",
                            "values": ["constant", "replicate", "wrap", "reflect"],
                            "default": "constant"
                        },
                        {
                            "name": "operation type",
                            "type": "select",
                            "values": ["dilation", "erosion", "closing", "opening"],
                            "default": "dilation"
                        }
                    ]
                }
            ],
            "interfaces": [
                {"name": "kernel", "type": "BinaryImage", "direction": "input"}
            ],
            "color": "#50af40"
        },
        {
            "style": "experimental",
            "name": "RemoveColor",
            "extends": ["Color images"],
            "category": "Processing/Color images",
            "properties": [
                {"name": "color", "type": "hex", "default": "0xFFFF", "min": "0xFF"}
            ],
            "color": "#850ebd"
        },
        {
            "style": "experimental",
            "name": "Comment",
            "category": "Other",
            "properties": [
                {"name": "comment", "type": "multiline", "default": "Write a comment here in Markdown format"}
            ]
        }
    ],
    "metadata": {
        "editableTypes": true,
        "toggleableEditableTypes": false,
        "twoColumn": true,
        "newGraphNode": false,
        "interfaces": {
            "BinaryImage": {
                "interfaceColor": "#FFFFFF"
            },
            "Image": {
                "interfaceColor": "#FFFFFF"
            }
        },
        "styles": {
            "labeled":{
                "shape": "svgs/label.svg",
                "positions": {
                    "frames_out": {
                        "x": 150,
                        "y": 30
                    },
                    "frames_in": {
                        "x": 0,
                        "y": 30
                    }
                },
                "properties": {
                    "*": {
                        "display": "none"
                    }
                },
                "nodes": {
                    "title": {
                        "display": "flex",
                        "justify-content": "center",
                        "margin-bottom": "calc(var(--kpm-node-title-height) * -1 - 20px)",
                        "color": "#FFFFFF",
                        "background-color": "transparent"
                    }
                }
            },
            "experimental": {
                "interfaces": {
                    "*": {
                        "--baklava-control-color-foreground": "transparent"
                    }
                },
                "properties": {
                    "multiline": {
                        "--baklava-control-color-hover": "#443E48",
                        "--baklava-control-color-background": "#332D37",
                        "--baklava-control-color-foreground": "#FFFFFF",
                        "--kpm-property-display-label": "none"
                    },
                    "*": {
                        "display": "none"
                    }
                },
                "nodes": {
                    "title": {
                        "justify-content": "center",
                        "margin-bottom": "calc(var(--kpm-node-title-height) * -1)",
                        "color": "#FFFFFF",
                        "background-color": "transparent"
                    },
                    "content": {
                        "border": "2px",
                        "border-style": "solid",
                        "border-color": "#FFFFFF",
                        "border-radius": "10px"
                    },
                    "body": {
                        "min-width": "150px",
                        "width": "auto",
                        "--baklava-node-color-background": "#332D37",
                        "background-color": "#332D37"
                    }
                }
            }
        },
        "backgroundSize": 0,
        "backgroundColor": "#332D37",
        "connectionStyle": "orthogonal",
        "layers": [
            {
                "name": "IOs",
                "nodeLayers": ["filesystem"]
            },
            {
                "name": "Binary imaging",
                "nodeInterfaces": ["BinaryImage"]
            },
            {
                "name": "Both",
                "nodeLayers": ["processing"],
                "nodeInterfaces": ["BinaryImage"]
            }
        ]
    }
}
