Page MenuHomePhabricator

BaseData in DataNode as ConstPointer
Closed, WontfixPublic

Description

I wonder if there is a reason that the data in DataNode is stored as BaseData::Pointer instead of BaseData::ConstPointer.
The data should not be modified anyway.
As we aim to use the maximum const strategy, we have to de-const our ConstPointer if want to add it to a dataNode in our code.

mitk::Image::ConstPointer someImage;
node->SetData(someImage) //doesn't compile: SetData only takes mitk::BaseData*

Event Timeline

If the data node only has a const pointer to the data it only can return a const pointer to that data, but there are bound to be several places where algorithms want to edit the data in place and only have access to the node initially.

kislinsk claimed this task.
kislinsk added a project: Auto-closed.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.