Hi Felix,

have you set the mitkBinaryThresholdTool as the tool for the 
QmitkBinaryThresholdToolGUI like it is done in the QmitkThresholdAction?

Best Regards
Andreas

On 10.10.2012, at 22:17, Félix C. Morency wrote:

Hi,

I made my own binary threshold segmentation plugin reusing tools and
GUI from QmitkBinaryThresholdTool and QmitkBinaryThresholdToolGUI. My
own view is non-blocking compared to the MITK original binary
threshold dialog. The problem is that the overlay display doesn't
update itself when the tool is activated.

 void MyThreshold::Activated()
 {
   m_ToolManager->RegisterClient();
   m_ToolManager->SetReferenceData(m_SelectedNode);
   m_ToolManager->ActivateTool(
     m_ToolManager->GetToolIdByToolType<mitk::BinaryThresholdTool>());

   m_ToolManager->ActiveToolChanged += mitk::MessageDelegate<MyThreshold>(
     this, &MyThreshold::OnThresholdingToolManagerToolModified);
 }

 void MyThreshold::Deactivated()
 {
   m_ToolManager->ActiveToolChanged -= mitk::MessageDelegate<MyThreshold>(
     this, &MyThreshold::OnThresholdingToolManagerToolModified);
   m_ToolManager->SetReferenceData(0);
   m_ToolManager->ActivateTool(-1);
   m_ToolManager->UnregisterClient();
 }

I need to move the threshold slider to see the threshold preview. I
see no way of triggering an update programmatically. The only public
method accessible from QmitkBinaryThresholdToolGUI is

 void OnThresholdingValueChanged(double current);

but I can't access the current slider value.

Is there a way of achieving this without modifying MITK?

Thanks,
--
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to