

Public Member Functions | |
| berryObjectMacro (DqSelListener) | |
| DqSelListener (QmitkDiffusionQuantificationView *view) | |
| void | DoSelectionChanged (ISelection::ConstPointer selection) |
| void | SelectionChanged (IWorkbenchPart::Pointer part, ISelection::ConstPointer selection) |
Public Attributes | |
| QmitkDiffusionQuantificationView * | m_View |
Definition at line 51 of file QmitkDiffusionQuantificationView.cpp.
| DqSelListener::DqSelListener | ( | QmitkDiffusionQuantificationView * | view ) | [inline] |
Definition at line 56 of file QmitkDiffusionQuantificationView.cpp.
{
m_View = view;
}
| DqSelListener::berryObjectMacro | ( | DqSelListener | ) |
| void DqSelListener::DoSelectionChanged | ( | ISelection::ConstPointer | selection ) | [inline] |
Definition at line 61 of file QmitkDiffusionQuantificationView.cpp.
References berry::SmartPointer< TObjectType >::Cast(), and QmitkDiffusionQuantificationView::m_CurrentSelection.
{
// save current selection in member variable
m_View->m_CurrentSelection = selection.Cast<const IStructuredSelection>();
// do something with the selected items
if(m_View->m_CurrentSelection)
{
bool foundQBIVolume = false;
bool foundTensorVolume = false;
// iterate selection
for (IStructuredSelection::iterator i = m_View->m_CurrentSelection->Begin();
i != m_View->m_CurrentSelection->End(); ++i)
{
// extract datatree node
if (mitk::DataNodeObject::Pointer nodeObj = i->Cast<mitk::DataNodeObject>())
{
mitk::DataNode::Pointer node = nodeObj->GetDataNode();
// only look at interesting types
if(QString("QBallImage").compare(node->GetData()->GetNameOfClass())==0)
{
foundQBIVolume = true;
}
if(QString("TensorImage").compare(node->GetData()->GetNameOfClass())==0)
{
foundTensorVolume = true;
}
}
}
m_View->m_Controls->m_GFAButton->setEnabled(foundQBIVolume);
m_View->m_Controls->m_CurvatureButton->setEnabled(foundQBIVolume);
m_View->m_Controls->m_FAButton->setEnabled(foundTensorVolume);
m_View->m_Controls->m_RAButton->setEnabled(foundTensorVolume);
m_View->m_Controls->m_ADButton->setEnabled(foundTensorVolume);
m_View->m_Controls->m_RDButton->setEnabled(foundTensorVolume);
m_View->m_Controls->m_ClusteringAnisotropy->setEnabled(foundTensorVolume);
}
}
| void DqSelListener::SelectionChanged | ( | IWorkbenchPart::Pointer | part, |
| ISelection::ConstPointer | selection | ||
| ) | [inline, virtual] |
Implements berry::ISelectionListener.
Definition at line 106 of file QmitkDiffusionQuantificationView.cpp.
{
// check, if selection comes from datamanager
if (part)
{
QString partname(part->GetPartName().c_str());
if(partname.compare("Datamanager")==0)
{
// apply selection
DoSelectionChanged(selection);
}
}
}
Definition at line 122 of file QmitkDiffusionQuantificationView.cpp.
1.7.2