I am interested in getting markup annotation in (MR) images. The markups would ideally be associated with descriptions. At the moment, unfortunately, it seems that any text added the description field is being lost upon the addition of a new markup on the image (not just adding the placeholder for it). Below is a visual example:
Decription field for markups is currently used for displaying measurement results, so any description that you manually set will be overwritten. However, you can specify any number of custom attributes (tag/value pairs) for a node. If you just need to categorize ROIs then you can create a folder in the subject hierarchy tree for each category and drag-and-drop the ROI into the appropriate category. A less elegant solution is to embed information into the node’s name.
@tvercaut alternatively, you can use the Description field in the control point. That will not get overwritten, but it will also not going to be displayed in the scene tree.
Thanks both! Much appreciated. We need free text but don’t need it to be displayed in the scene.
We have already discussed the workaround of using the “Node” name field to hold the text so I think we will stick to this for now. That works for us, I was just hoping to avoid twisting semantics
If the description field is expected to be overridden automatically, should it then not be user editable? This may avoid confusion for users.
It is up to the user and various modules to use the description field for something. For most nodes, the description is not used by any modules for any particular purpose, so the user is free to do anything with it. However, the markups module uses the description field for displaying measurement results. Markups module could be changed easily to leave the description unchanged when all measurements are disabled, but it would be a bit risky because some old measurement results could then remain in the description field. Probably a better solution would be to add a separate node property for storing measurement results. I think this will be implemented at some point, but since this requires a few days of work, it will need to wait for more people to ask for it or a project with funding for Slicer development to require it.
However, if you want to store structured information for an ROI node then custom attributes are probably a more suitable method than a simple description field. You can add/edit/remove attributes in Data module (near the bottom open the MRML node information section, in the Attributes table). You can also easily access it from Python via GetAttribute/SetAttribute methods. You can add a simple module to make it easier to set and view attributes to your ROIs.