KitwareMedical / otm-server

Apache License 2.0
0 stars 2 forks source link

Build needed data model for analysis results #113

Closed ebrahimebrahim closed 2 years ago

ebrahimebrahim commented 2 years ago

@AlmightyYakob What do you think of an organization like this? Let's iterate on this from here. Maybe AnalysisResult is redundant and could be merged into AnalysisBatch?

jjnesbitt commented 2 years ago

I think this design can be simplified a bit. Since analysis is treated as one unit (unlike preprocessing), I think we could probably do with just one model, AnalysisResult.

So AnalysisResult would contain the following:

I was thinking of placing all of the resulting images in the data field, in a JSON/dictionary structure. It would look like the following:

{
    "<variable> (e.g. Age)": {
        "allocation": {
            "correlation": "...",
            "pvalue": "..."
        },
        "transport": {
            "correlation": "...",
            "pvalue": "..."
        },
        "vbm": {
            "correlation": "...",
            "pvalue": "..."
        }
    },
}

This is the structure that made the most sense to me, since the image we display in the UI is the intersection of selected variable and selected analysis. This structure allows for easily indexing by these two values, and retrieval of both correlation and p-value images.

@ebrahimebrahim What do you think?

ebrahimebrahim commented 2 years ago

@AlmightyYakob This makes a lot of sense. I didn't realize you can stick a json/dictionary structure into one of these django data model things. This organization looks great!

jjnesbitt commented 2 years ago

It seems some revision of the preprocessed image models is needed. In short, the following will take place as a part of addressing this issue: