Hi all,
I have an application in which I have to set a seed point. I tried to
modify the Region Growing functionality by just changing PointSet to
PointData and PointSetInteractor to PointInteractor.
It compiles, but when executing the program finishes with "MITK
MainApp caught something like an exception".
If I change back to PointSet and PointSetInteractor there is no problem.
Why can that be? How could I restrict the number of possible seed
points to only one?
Thanks for your help in advance,
Xabier
void AirwaySegmentation::Activated()
{
QmitkFunctionality::Activated();
if (m_SeedNode.IsNull()) // only once create a new DataTreeNode
containing a PointSet with some interaction
{
// new node and data item
m_SeedNode = mitk::DataTreeNode::New();
m_SeedNode->GetPropertyList()->SetProperty("name",
mitk::StringProperty::New("Seedpoint for airway segmentation"));
m_Seed = mitk::PointData::New();
m_SeedNode->SetData( m_Seed );
std::cout << "New node and data item" << std::endl;
// new behaviour/interaction for the pointset node
m_Interactor = mitk::PointInteractor::New("pointsetinteractor",
m_SeedNode);
mitk::GlobalInteraction::GetInstance()->AddInteractor( m_Interactor );
std::cout << "Interactor added" << std::endl;
// add the pointset to the data tree (for rendering)
GetDataTreeIterator()->Add( m_SeedNode );
std::cout << "Point added to the data tree" << std::endl;
}
}
--
Xabier Artaechevarria
Cancer Imaging Laboratory
Centre for Applied Medical Research
www.cima.es
----------------------------------------------------------------
Este mensaje ha sido enviado desde https://webmail.unav.es
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users