Page MenuHomePhabricator

Setting arbitrary label names to a LabelSetImage can be more straightforward
Closed, ResolvedPublic

Description

Segmentation mask in an LabelSetImage is named Object-1, Object-2 by default. There is no straightforward opportunity to set developer-desired label names. This can be definitely accomplished by:

for (auto const &[id, labelName] : LabelMap)
{
    mitk::Label *labelptr = LabelSetImageObject->GetLabel(key, 0);
    labelptr->SetName(labelName);
}

Maybe, its better to get this code into the LabelSetImage class as a function eg.
void SetNewLabelNames(std::map&, int activeLayerId)

Event Timeline

a178n added a subscriber: s434n.
a178n added a subscriber: kalali.
kislinsk triaged this task as Wishlist priority.Feb 13 2023, 10:35 AM

I am not sure I would put it a member function. This can be done without the need of accessing any internals.

kislinsk claimed this task.
kislinsk added a project: Moved to git.dkfz.de.

This task was closed here on Phabricator since it was migrated to GitLab. Please continue on GitLab.