Hi,

loading an image in a QmitSliceWidget don't work. The problem is, that 
the image is not visible and the application crashes, when adding the 
imagenode to the datastorage.

Code is like following:

mitk::DataNode::Pointer selectedNode = 
m_Controls->m_SelectorR->GetSelectedNode();
         if( selectedNode.IsNull() ) {
             std::cerr << "Selected Node is Null" << std::endl;
             return;
         }
         mitk::BaseData* data = selectedNode->GetData();
         if(data == 0 ) {
             return;
         }
         mitk::Image* image = dynamic_cast<mitk::Image*>(data);
         if( image == 0 ) {
             return;
         }
         if( image->GetDimension() != 2){
             return;
         }

         std::cout << "We have image with Dim 2" << std::endl;

         m_Controls->m_SliceWidgetR->SetData(selectedNode,  
mitk::SliceNavigationController::Transversal);

         // 
GetDefaultDataStorage()->Add(m_Controls->m_SliceWidgetR->GetRenderer()->GetCurrentWorldGeometry2DNode());
 
// application crashes

         m_Controls->m_SliceWidgetR->GetRenderer()->RequestUpdate();
         mitk::RenderingManager::GetInstance()->RequestUpdateAll();


How can you store data from the DefaultDataStorage in a 
StandaloneDataStorage, because in tutorial Step4, they use a 
StandaloneDataStorage? Or are there other possibilities, too?

Ijaz





------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to