mobie / mobie.github.io

1 stars 3 forks source link

Multi-well plate transform, aka "grid" ?! #29

Closed tischi closed 3 years ago

tischi commented 3 years ago

@constantinpape

I think for the multi-well plate transforms we may have to use something else but autoGrid, because it can be that certain wells are missing (i.e. have not been acquired). We thus probably have to explicitly specify to which row and column the respective images have to go. Probably we should look at what the currently proposal for NGFF is and maybe lean on that.

Posting here what the NGFF currently has:

{
  "collections": [
    {
      "name": "HCS plate 01",
      "images": {
        "2020-10-10/A/1": {
          "row_index": 0,
          "column_index": 0
        },
        "2020-10-10_run2/A/1": {
          "row_index": 0,
          "column_index": 0
        },
        "2020-10-10/A/2": {
          "row_index": 0,
          "column_index": 1
        },
        "2020-10-10/A/3": {
          "row_index": 0,
          "column_index": 2
        },

Maybe we should do something similar, e.g., calling it grid (without the auto):

{
  "sourceTransformations": {
     "grid":  {  
          "sourcesToGridPosition": { ["A1"]:  [ 0, 0 ], ["A3"], [ 0, 2 ] }  
      }
} 

or

{
  "sourceTransformations": {
     "grid":  {  
          "sources": [ ["A1"], ["A3"] ]
          "positions": [ [0, 0], [0, 2] ] 
      }
} 

The latter approach has the advantage that it fits better the structure of the other transformations that we currently have.

For the situation where there are multiple sites per well, we could do a similar nested grouping of grids as discussed in the autoGrid: https://github.com/mobie/mobie.github.io/issues/24

constantinpape commented 3 years ago

The latter approach has the advantage that it fits better the structure of the other transformations that we currently have.

Yes, I like the second approach.

constantinpape commented 3 years ago

From discussion with @tischi: We will just have a grid transformation with position as optional field. If position is given, the sources will be arranged accordingly. If not, they will be arranged automatically, as in the previous autoGrid.

tischi commented 3 years ago

@constantinpape

In general, to ease the discussions: sourceDisplay = imageDisplay | segmentationDisplay.

The grid views in the current example don't contain a sourceDisplay, but I realized that they MUST (or at least SHOULD), because only sources mentioned in the sourceDisplay are shown (in the grid).

That also means that the source names given in the sourceTransformations MUST occur in an sourceDisplay. We could alleviate this to SHOULD and then ignore the ones that are not to be displayed during the process of source transformation.

constantinpape commented 3 years ago

The grid views in the current example don't contain a sourceDisplay, but I realized that they MUST (or at least SHOULD), because only sources mentioned in the sourceDisplay are shown (in the grid).

That also means that the source names given in the sourceTransformations MUST occur in an sourceDisplay. We could alleviate this to SHOULD and then ignore the ones that are not to be displayed during the process of source transformation.

I think we should leave it at MUST, I will update the grid views in the example to also include the correct sourceDisplay.

constantinpape commented 3 years ago

I have updated the example accodingly.