Page MenuHomePhabricator

Department logo not shown in 3d render window
Closed, ResolvedPublic

Description

There used to be a department logo in the lower right corner of the 3d render window. It is missing now.

Wasn't there also supposed to be a preference in the GUI for showing it?

Event Timeline

So far there is no preference in the GUI for showing the MBI Logo.

The reason why the logo is not displayed is that the variable m_ForceShowMBIDepartmentLogo is set to false in mitkManufacturereLogo.cpp.

I will have a look next week.

Correction: The reason why the logo was not shown, was due to the first if-command in method OnPreferencesChanged of QmitkStdMultiWidgetEditor. Here we access to the preference "Department Logo" which has not been set before. Consequently, the logo is disabled.

std::string departmentLogoLocation = prefs->Get("DepartmentLogo", "");

if( departmentLogoLocation != "MBILogo" )
{

if (departmentLogoLocation.empty())
{
  d->m_StdMultiWidget->DisableDepartmentLogo();
}
else
{
   d->m_StdMultiWidget->SetDepartmentLogoPath(departmentLogoLocation.c_str());
    d->m_StdMultiWidget->EnableDepartmentLogo();
}

}

Possible solutions:

  1. Set default string to "MBILogo" and if string is not changed, step over the first if-command in OnPreferencesChanged

std::string departmentLogoLocation = prefs->Get("DepartmentLogo", "MBILogo");

  1. Check if preference "Department Logo" exists anf if not, step over the if-command as well

    std::vector<std::string> keys = prefs->Keys(); bool found = false; for( int i = 0; i < keys.size(); ++i ) { if( keys[i] == "DepartmentLogo") { found = true; break; } }
  1. CMake solution

[a5df7c]: Merge branch 'bug-12182-DepartmentLogoNotShownIn3D'

Merged commits:

2012-07-04 15:20:41 Diana Wald [0e2746]
Enable MBI Logo in 3D render window

Solution number 2 was implemented. I think this was the most cleanest way to solve this bug.