populse / populse_mia

Multiparametric Image Analysis
Other
10 stars 9 forks source link

[data browser] cannot change tag of type "List" when adding a new document without a default value for this tag #305

Closed manuegrx closed 1 year ago

manuegrx commented 1 year ago

If a tag of type "List" is already in the data browser for some documents, when we add a new document which does not have this tag, it is not possible to add a value for this tag using the data browser gui.

We have the same issue if we add the document via the "Add a document" green cross or via mriconv.

For the new document the tag is set to "Not defined" and when we click on the tag cell an error message appears in the standard output : invalid syntax (<unknown>, line 1).

If we try to change the value, it is interpreted as a string an not a List and the value is not saved.

For example, in the following case the tag RepetitionTime (type list_float) was already defined for 2 documents and the document "swralej_func.nii" was added via "Add a document" image

If we try to change the value for "swralej_func.nii" : image

The value remains in italics and is not saved

It seems to not be an issue with a tag of type "String" or "Int" or "Float"

servoz commented 1 year ago

after 54bd5a3 and e914302, the issue now seems to have been fixed.

These changes also add the possibility of increasing or decreasing the number of elements in the list. I'm not sure whether this is really desirable, as it may allow the user to make changes with side-effects that I can't fully assess. It remains to be seen whether this should be changed. There are two buttons ("+" and "-") for this purpose. If necessary, we could also make these buttons more intuitive (but that's a cosmetic maybe with less of a priority, although not to be overlooked).

manuegrx commented 1 year ago

It woks fine, thank you !