Page MenuHomePhabricator

No notification on LUTProperty change
Closed, WontfixPublic


This is a kind of followup from this shameful bug report. I opened another report because I filled the last one with so much false information as to make it useless. Now that this is out of the way, here's the real problem.

This condition in LookupTableProperty::SetLookupTable can't work:

if ((m_LookupTable != aLookupTable) || (*m_LookupTable != *aLookupTable))
    m_LookupTable = aLookupTable;

because aLookupTable is always the same pointer as m_LookupTable. I verified in QmitkDataManagerView::ColormapActionToggled and, indeed, we never create a new object, we re-use the old one. That's why the "useless" Modified() in my last report was actually doing something.

The condition above was probably there to avoid useless work but I think the solution is to remove it completely, or to create a new LUT instead of re-using it. What do you think?

Event Timeline

If I see it correctly removing the condition would not actually help, as the lookupTableProperty->SetValue(lookupTable) call in QmitkDataManagerView::ColormapActionToggled could be removed without changing the result.
Indeed if it is only that section of code you need, we could probably replace the SetValue call with a lookupTableProperty->Modified() to achieve what you want.

Alternatively we could make sure that the Modified() of the mitk::LookupTable is called correctly and check for it in the LookupTableProperty, but this assumes that SetValue is called.

kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

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