Hi Mathias,
My problem was actually very different. The reason I could not get the planar
lines rendered was because I did not have the planarfigure class registered...
I have it working now and I will try your suggestion asap.
Thanks!
-Keshav
Keshav Chintamani,
Systems Engineer
Space Applications Services NV
Leuvensesteenweg 325
1932 Zaventem
Belgium
Tel: +32 2 721 54 84 Fax: +32 2 721 54 44
URL: http://www.spaceapplications.com
From: "Seitel Mathias" <[email protected]>
To: "Keshav Chintamani" <[email protected]>, "mitk-users"
<[email protected]>
Sent: Monday, 13 September, 2010 9:40:45 AM
Subject: AW: [mitk-users] Implementing PlanarLine
Hi Keshav,
To use an Interactor in MITK, it must be associated with the DataNode of the
data object that is interacted with (the PlanarFigure in your case).
In your code, you have an image DataNode (“node”) and create the
PlanarFigureInteractor for this node. Instead, try initializing the Interactor
with the DataNode you created newly for the PlanarFigure (“interactorNode” in
your code).
It may also be helpful to create the PlanarFigure nodes as child-nodes of the
images they apply to (this is not necessary but would help keep an overview
over your figures):
This->GetDataStorage()->Add( interactorNode, node );
Regards,
Mathias
--
Dr. Mathias Seitel
German Cancer Research Center (Deutsches Krebsforschungszentrum) Member of the
Helmholtz Association Div. Medical and Biological Informatics E130
Im Neuenheimer Feld 280
D-69120 Heidelberg
Phone: +49-(0)6221-42-2328
Fax: +49-(0)6221-42-2345
E-Mail: [email protected]
Web: www.dkfz.de
Confidentiality Note: This message is intended only for the use of the named
recipient(s) and may obtain confidential and/or privileged information. If you
are not the intended recipient, please contact the sender and delete the
message. Any unauthorized use of the information contained in this message is
prohibited.
Von: Keshav Chintamani [mailto:[email protected]]
Gesendet: Freitag, 10. September 2010 10:26
An: mitk-users
Betreff: [mitk-users] Implementing PlanarLine
Hello,
I am trying to use mitk::PlanarLine to get line drawing on an image, but am
having issues with the implementation. Does the following code seem right? I
know I am missing something, but not exactly sure what.
******************************************************************************************
std::string refName("Pic3D");
for (mitk::DataStorage::SetOfObjects::ConstIterator
it=_NodeSetinDS->Begin();it!=_NodeSetinDS->End();it++){
node=const_cast<mitk::DataNode*>(it->Value().GetPointer());
std::string nodeName=node->GetName();
if(nodeName==refName)
{
break;
}
}
if(figureInteractor.IsNull()){
if(node){
//node is a specific image, in this case Pic3D.pic
mitk::PlanarFigureInteractor::Pointer myPlanarLineInteractor =
mitk::PlanarFigureInteractor::New("PlanarFigureInteractor", node);
mitk::PlanarLine::Pointer myPlanarLine = mitk::PlanarLine::New();
mitk::GlobalInteraction::GetInstance()->AddInteractor(myPlanarLineInteractor);
mitk::DataNode::Pointer interactorNode=mitk::DataNode::New();
interactorNode->SetName("PlanarLineInteractor");
interactorNode->SetData( myPlanarLine);
this->GetDataStorage()->Add(interactorNode);
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
}
}
******************************************************************************************
Any help is greatly appreciated!
-Keshav
Keshav Chintamani,
Systems Engineer
Space Applications Services NV
Leuvensesteenweg 325
1932 Zaventem
Belgium
Tel: +32 2 721 54 84 Fax: +32 2 721 54 44
URL: http://www.spaceapplications.com
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users