{"id":26015505,"url":"https://github.com/dron3flyv3r/nodesystem-mk2-opencv","last_synced_at":"2026-04-22T10:02:32.731Z","repository":{"id":280900403,"uuid":"936580368","full_name":"dron3flyv3r/NodeSystem-MK2-OpenCV","owner":"dron3flyv3r","description":"This is an updated version of my Node based editor. Using the new and improved Node editor.","archived":false,"fork":false,"pushed_at":"2025-03-05T22:16:40.000Z","size":2605,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T23:23:10.885Z","etag":null,"topics":["dear-pygui","node-editor","opencv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dron3flyv3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-21T10:27:47.000Z","updated_at":"2025-03-05T22:16:43.000Z","dependencies_parsed_at":"2025-03-05T23:23:21.480Z","dependency_job_id":"df253948-31d1-4e78-80ac-aa991c1e7013","html_url":"https://github.com/dron3flyv3r/NodeSystem-MK2-OpenCV","commit_stats":null,"previous_names":["dron3flyv3r/nodesystem-mk2-opencv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK2-OpenCV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK2-OpenCV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK2-OpenCV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dron3flyv3r%2FNodeSystem-MK2-OpenCV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dron3flyv3r","download_url":"https://codeload.github.com/dron3flyv3r/NodeSystem-MK2-OpenCV/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242138824,"owners_count":20078006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dear-pygui","node-editor","opencv"],"created_at":"2025-03-06T03:18:34.604Z","updated_at":"2026-04-22T10:02:32.655Z","avatar_url":"https://github.com/dron3flyv3r.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node System MK2\n\nThis project is a node-based editor built using Dear PyGui. It allows users to create, connect, and manage nodes that perform various operations. The system is designed to be extensible, allowing developers to create custom nodes with specific functionalities.\n\n## Features\n\n- Create and manage nodes\n- Connect nodes to pass data between them\n- Save and load workspace configurations\n- Customizable node operations\n- Copy/Past\n- A preview window to visualize the output of a node (control + left click on a node)\n- Type security for the nodes inputs and outputs\n- undo/redo\n\n## Installation\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/dron3flyv3r/NodeSystem-MK2.git\n    cd NodeSystem-MK2\n    ```\n\n2. Install the required dependencies:\n    ```sh\n    pip install dearpygui\n    ```\n\n## Usage\n\nTo start the node editor, run the following command:\n```sh\npython NodeEditor/NodeEditor.py\n```\n\nThis will open the main viewport where you can add, connect, and manage nodes.\n\n## Examples\n\n#### Basic usage with basic operations\nHere you can see a simple example of the basic operations that are included in the node system.\n\u003c!-- Open the images/operations.png --\u003e\n![operations](images/operations.png)\n\n#### Templateing example\nHere you can see a simple templating example, where you can create a template and use it to find where in a image the template is located.\n\n\u003c!-- Open the images/template.png --\u003e\n![template](images/template.png)\n\n## Creating a New Node\n\nTo create a new node, follow these steps:\n\n1. Create a new Python file in the `NodeEditor/Nodes` directory. For example, `MyNode.py`.\n\n2. Define a new class that inherits from `Node`. Implement the required methods.\n\n```python\n# filepath: /NodeSystem-MK2/NodeEditor/Nodes/MyNode.py\nimport dearpygui.dearpygui as dpg\nfrom NodeEditor.Core.Node import Node\nfrom NodeEditor.Core.NodePackage import NodePackage\n\nclass MyNode(Node):\n    def __init__(self):\n        super().__init__(\"MyNode\", \"Category\")\n        self.input_idx = self.add_input(\"Input\")\n        self.add_output(\"Output\")\n\n    def compose(self):\n        dpg.add_text(\"MyNode\")\n\n    def execute(self, inputs: list[NodePackage]) -\u003e list[NodePackage]:\n        input_package = inputs[self.input_idx]\n        output_package = NodePackage()\n        output_package.number = input_package.number * 2  # Example operation\n        return [output_package]\n\n    def view(self, output: NodePackage):\n        dpg.add_text(f\"Output: {output.number}\")\n```\n\n3. The new node will be automatically loaded and available in the node editor.\n\n## Creating a New Node Package\n\nTo create a custom node package, inherit from `NodePackage`:\n```python\nfrom NodeEditor.Core.NodePackage import NodePackage\n\nclass MyNodePackage(NodePackage):\n    # Define any attributes or methods you need.\n    pass\n```\n\nWhen working with a custom package, simply pass or return instances of it from node methods:\n```python\ndef execute(self, inputs: list[MyNodePackage]) -\u003e list[MyNodePackage]:\n    return [MyNodePackage()]\n```\n\n## Node Class Overview\n\n### Node\n\nThe base class for all nodes. It provides methods to add inputs, outputs, and define the node's behavior.\n\n- `__init__(self, label: str, catagory: str, max_width: int = 100)`: Initializes the node with a label and category.\n- `add_input(self, label: str = \"\") -\u003e int`: Adds an input to the node.\n- `add_output(self, label: str = \"\") -\u003e int`: Adds an output to the node.\n- `compose(self)`: Defines the node's UI components.\n- `execute(self, inputs: list[NodePackage]) -\u003e list[NodePackage]`: Defines the node's operation.\n- `view(self, output: NodePackage)`: Updates the node's view with the output data. (Need either `view` or `viewer`)\n- `viewer(self, outputs: list[NodePackage])`: Updates the node's view with the output data. (Need either `view` or `viewer`)\n\n### NodePackage\n\nA class to encapsulate data passed between nodes.\n\n- `number: int`: An example attribute.\n- `string: str`: An example attribute.\n- `text(self) -\u003e str`: Returns a string representation of the package.\n- `copy(self) -\u003e 'NodePackage'`: Returns a deep copy of the package.\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdron3flyv3r%2Fnodesystem-mk2-opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdron3flyv3r%2Fnodesystem-mk2-opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdron3flyv3r%2Fnodesystem-mk2-opencv/lists"}