ok, another problem:
First i have about 10 3D images in the data manager, then i create a 3D+T
object out of them and add it to the data node. The proble is that the time
slider only works if i delete all other 3D data nodes.... isnt it possible to
mix 3D and 3D+T objects?
any suggestions?
________________________________
Von: Lodron, Gerald [mailto:[email protected]]
Gesendet: Donnerstag, 7. Oktober 2010 14:27
An: '[email protected]'
Betreff: [mitk-users] WG: Time navigation, GUI time slider cannot be moved
Ok, it seems that i made something in the initialization wrong, now the slider
works! Is there any better way to initialize the mitk::Image?
Here my current code:
mitk::Image::Pointer oVideoImage = mitk::Image::New();
for(unsigned int nFrame = 0; nFrame < 10; nFrame++)
{
mitk::Image* poImage =
dynamic_cast<mitk::Image*>(oMyVectorOfImageNodes.at(nFrame)->GetData());
if(nFrame==0)
{
//fist convert to vtk image, that stuff is needed because the
GetVtkImageData function wrongly calculates the origin
vtkSmartPointer<vtkImageData> oInitImage = vtkImageData::New();
oInitImage->DeepCopy(poImage->GetVtkImageData());
oInitImage->SetOrigin(poImage->GetTimeSlicedGeometry()->GetOrigin()[0],
poImage->GetTimeSlicedGeometry()->GetOrigin()[1],
poImage->GetTimeSlicedGeometry()->GetOrigin()[2]);
oVideoImage->Initialize(oInitImage,2,10);
//does not work, got exception after this->GetDataStorage()->Add(oNode);
//oVideoImage->Initialize(*poImage->GetPixelType().GetTypeId(),
*poImage->GetTimeSlicedGeometry(),2,5);
oInitImage->Delete();
}
oVideoImage->SetVolume(poImage->GetVolumeData()->GetData(),nFrame);
}
mitk::DataNode::Pointer oNode = mitk::DataNode::New();
oNode->SetData(oVideoImage);
mitk::CoreObjectFactory::GetInstance()->SetDefaultProperties(oNode);
oNode->SetName("Video");
this->GetDataStorage()->Add(oNode);
________________________________
Von: Lodron, Gerald [mailto:[email protected]]
Gesendet: Donnerstag, 7. Oktober 2010 09:56
An: '[email protected]'
Betreff: [mitk-users] Time navigation, GUI time slider cannot be moved
Hi
I made a plugin for the mitk GUI which takes some 3D images and merges them to
one single 3D + Time image, therefore i used this code:
mitk::Image::Pointer oVideoImage = mitk::Image::New();
for(unsigned int nFrame = 0; nFrame < 10; nFrame++)
{
mitk::Image* poImage =
dynamic_cast<mitk::Image*>(oMyVectorOfImageNodes.at(nFrame)->GetData());
if(nFrame==0)
{
oVideoImage->Initialize(poImage);
}
oVideoImage->SetVolume(poImage->GetVolumeData()->GetData(),nFrame);
}
mitk::DataNode::Pointer oNode = mitk::DataNode::New();
oNode->SetData(oVideoImage);
mitk::CoreObjectFactory::GetInstance()->SetDefaultProperties(oNode);
oNode->SetName("Video");
this->GetDataStorage()->Add(oNode);
The code works and the Video object appears in the data manager. But i cannot
move the time slider in the image navigator window, why?
Gerald Lodron
Human-Centered Image Processing
Machine Vision Applications
DIGITAL - Institute of Information and Communication Technologies
JOANNEUM RESEARCH Forschungsgesellschaft mbH
Steyrergasse 17, 8010 Graz, AUSTRIA
phone: +43-316-876-1751 fax: +43-316-876-1751
web: http://www.joanneum.at/digital
e-mail: [email protected]<mailto:[email protected]>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users