Hi everybody,
I just experienced the same problem as Nil, also had to work around
current limitations using IDataStorageService and grabbing a
ctkPluginContext from some plugin (a plugin was not my intention). I
think that Nil's suggestion would be a quick and cheap solution. More
changes / cleanup would be welcome with more time available.
As a starting point for improvements on this problem I summarized what I
encountered in
http://bugs.mitk.org/show_bug.cgi?id=19752.
Feel free to add your point of view or anything that I missed. Thanks in
advance to anybody who improves on the current interface!
Regards,
Daniel
On 01.04.2016 17:37, Nil Goyette wrote:
Hi MITK,
I was creating a context menu action and I saw that SetDataStorage was
never called. I found in QmitkDataManagerView.cpp this snippet:
if(className == "QmitkCreatePolygonModelAction")
{
contextMenuAction->*SetDataStorage*(this->GetDataStorage());
if(smoothed == "false")
{
contextMenuAction->SetSmoothed(false);
}
else
{
contextMenuAction->SetSmoothed(true);
}
contextMenuAction->SetDecimated(m_SurfaceDecimation);
}
else if(className == "QmitkStatisticsAction")
{
contextMenuAction->SetFunctionality(this);
}
else if(className == "QmitkCreateSimulationAction")
{
contextMenuAction->*SetDataStorage*(this->GetDataStorage());
}
I don't understand this decision. Why not simply always set it? I know
that Smoothed, Decimated and Functionality are hacks useful only to a
single class, but DataStorage is useful in many cases. Well, I don't
know for the other programmers out there, but I often need the
DataStorage in my context menu actions.
Right now, I'm forced to use my plugin's context, getServiceReference,
IDataStorageService and include a lot of files to get it. This could
easily be avoided if SetDataStorage was always called. I just tried it
and it works perfectly. In fact, I don't see how it could break anything.
Nil
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
--
Dr. Daniel Maleike, Mint Medical GmbH
Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg
Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB 709351
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users