# SPDX-FileCopyrightText: Copyright © 2024 Idiap Research Institute <contact@idiap.ch>
#
# SPDX-License-Identifier: GPL-3.0-or-later

digraph cli {

    fontname = "Helvetica";
    bgcolor = invis;
    node [shape = rectangle, style = filled, fontname = "Helvetica", fillcolor = gray90, color = white];
    graph [style = dotted, color = white, fontcolor = white];
    edge [color = white];
    rankdir = LR;

    subgraph data {
        cluster = true;
        rank = same;
        label = "datamodule";
        node [shape = cylinder, fillcolor = gold, fixed = true, width = 1.5, height = 0.7];
        test_data [
            label = "Test",
            href="../data-model.html",
            target="_top",
        ];
    }

    subgraph classify {
        cluster = true;
        label = "classify saliency (subcommand)";

        subgraph products {
            cluster = false;
            node [shape = note, fillcolor = aquamarine];
            model [label = "Model\nweights", fillcolor = coral];
            saliencies [label = "Saliency\nmaps"];
            saliency_completeness_analysis [label = "Completeness Analysis\nTable"];
            saliency_interpretability_analysis [label = "Interpretability Analysis\nTable"];
            saliency_images [label = "Saliency\nOverlay Images"];
        }

        subgraph commands {
            cluster = false;
            node [shape = rectangle, fillcolor = gray];
            saliency_generate [
                label = "generate",
                href="../cli.html#mednet-classify-saliency-generate",
                target="_top",
            ];
            saliency_completeness [
                label = "completeness",
                href="../cli.html#mednet-classify-saliency-completeness",
                target="_top",
            ];
            saliency_interpretability [
                label = "interpretability",
                href="../cli.html#mednet-classify-saliency-interpretability",
                target="_top",
            ];
            saliency_view [
                label = "view"
                href="../cli.html#mednet-classify-saliency-view",
                target="_top",
            ];
        }

        subgraph workflow {
            cluster = false;
            {test_data model} -> saliency_generate -> {saliencies};
            {test_data model} -> saliency_completeness -> {saliency_completeness_analysis};
            {test_data model saliencies} -> saliency_interpretability -> {saliency_interpretability_analysis};
            {test_data model saliencies} -> saliency_view -> {saliency_images};
        }
    }

}
