Page MenuHomePhabricator

org.mitk.gui.qt.segmentation should not ask for organ type, but for a name/color combination
Closed, ResolvedPublic

Description

Currently org.mitk.gui.qt.segmentation asks for a name and organ type when creating a new manual segmentation. This should be changed:

  • the user should be presented with a plain one-line-and-one-color-input dialog for a segmentation name and a color
  • the dialog should make suggestions as known from the search box in firefox
  • all user entries should be remembered accross application restarts, probably using the openCherry memento classes
  • the dialog should come with a reasonable list of default segmentation names
  • the color should be suggested by the dialog according to the selected organ (unless changed manually by the user)
  • the color chooser should not dominate the name input because the focus should be on a sensible name, not a nice color

The dialog should be implemented as a plain Qt widget just like QmitkNewSegmentationDialog (can be replaced). The dialog should be called from QmitkSegmentationView (search the .cpp file for QmitkNewSegmentationDialog).

Event Timeline

[SVN revision 19671]
FIX (#2700): first version of a Qt-dialog as described in T2700.

r19671: first version of a very basic dialog. The chosen color is not used as segmentation color right now.

[SVN revision 19720]
FIX (#2700): basic functionalities and a clearer look are added

I just noticed the default color is a dark gray. Could this be changed to red?

Hi Anja, what is the status of this? Can you please comment?

[SVN revision 19811]
FIX (#2700): added properties:

  • default color is red
  • color button shows either the default color or the color just selected
  • function GetColorProperty() returns mitk::Color instead of QColor as before
  • dialog widget now has fixed size

If you need a preference page for any kind of options: I committed one in rev. 19851.

Anja, are you still working on this? Any progress? Do you need help?

I'm now working on it again. I was quite busy last week and out of office for some days.

Where to put the list of organtype and colors?:

In mitkOrganTypeProperty all organtypes are listed, in mitkDataTreeNodeFactory the links between organtypes and colors are listed.

Should both remain there, should both (or one) be moved/copied to somewhere else?

(In reply to comment #10)

Where to put the list of organtype and colors?:

In mitkOrganTypeProperty all organtypes are listed, in mitkDataTreeNodeFactory
the links between organtypes and colors are listed.

mitk::OrganTypeProperty can be removed from SVN. The methods in DataTreeNodeFactory can also be removed. I know no relevant use case.

Should both remain there, should both (or one) be moved/copied to somewhere
else?

Management of suggested segmentation names should be moved completely to the dialog. Storage of name lists can be handled through the preferences facility of the views

[SVN revision 20109]
FIX (#2700): added organ-list in QmitkSegmentationView, which is then proposed in QmitkNewSegmentationDialog, when choosing an organ-name

Hey, this works nicely. Would it be possible to ignore case and suggest Liver for both 'l' and 'L'?

[SVN revision 20166]
FIX (#2700):

  • default color of a new segmentation after selecting an organ from suggestion-list is the color, linked to this organ by ORGAN_COLOR_STRING in QmitkSegmentationView.cpp
  • the user can still change the suggestion of color
  • the colorbutton changes its color, everytime the user clicks on an organ-suggestion
  • the organ-color-list is extended to all organs from mitkOrganTypeProperty
  • the completion of suggestions is case insensitive

[SVN revision 20267]
FIX (#2700):

  • organ-color-list is saved in preferences for segmentation view
  • suggestion for organ and color: when user edit a new organname, which is not yet in organ-list, the list is extended and the new list is again stored in the preferences.
  • suggestions for organs now start with an uppercase letter
  • some colors in organ-color-list are changed

Reopened because of red dashboard

[SVN revision 20269]
COMP (#2700): wrong conversion between QString and std::string is solved