void MaskingItem::receive(mitk::DataNode::Pointer node) { if(!node) { setEnabled(false); emit this->setStatus(false); return; } bool isMasking = false; node->GetBoolProperty("masking", isMasking); mitk::LabelSetImage* labelSetImage = dynamic_cast<mitk::LabelSetImage*>(node->GetData()); if(isMasking && !labelSetImage) { setEnabled(true); this->m_node = node; this->createNewMask(node); emit this->setStatus(true); } else if(isMasking && labelSetImage) { setEnabled(true); this->m_node = node; this->initNode(node); emit this->setStatus(true); } else { setEnabled(false); deactivateTool(); emit this->setStatus(false); } }
void MaskingItem::deactivateTool(QString idx) { if(this->m_toolManager->GetActiveTool()->GetName() != idx) return; deactivateTool(); }
//------------------------------------------------------------------------------------ void FrameStatsConfigToolOperation::notifyEndDialog() { deactivateTool(); }