Hello Martin,

 

MITK supports implicit handling of time in various situations. Many datasets 
(such as mitk::Image, mitk::PointSet, mitk::Surface, and others) can be time 
resolved, and their visualization classes (e.g. mitk::SurfaceVtkMapper3D) 
automatically choose the data to be rendered at the current system time step. 
The time concept is also supported by several file readers and writers.

 

In MITK, time is regarded as an separate dimension. A 3D+t image is not merely 
saved and processed as an image of four dimensions, but as a series of 
individual 3D images. This is implemented through the concept of Geometry 
objects, which describe the spatial and temporal geometry of datasets and 
scenes in MITK. Each 3D part of a 3D+t dataset has a defined beginning and end 
time point, which is described by its Geometry3D.

 

The control over the currently selected time step is handled via 
mitk::SliceNavigationController. This class is both responsible for selecting 
individual slices from a 3D image (to display 2D slices), and for selecting a 
time step. In the Qmitk implementation of MITK, the Qt class 
QmitkStdMultiWidget holds an instance of SliceNavigationController for temporal 
control of the current scene. The global time step can be selected via this 
controller class. This is for example done in QmitkSliderDialogBar, a helper 
widget which can be used to select the current time step in the application. In 
the MITK MainApp application, this can be activated by pressing a toggle in the 
main menu bar.

 

 

In your implementation, Image::SetVolume() needs to be passed the time 
parameter for the given volume: 

 

mitk::Image::Pointer image3DT = mitk::Image::New();
image3DT->Initialize(image1, 2, 3); 
image3DT ->SetVolume(image1->GetScalarPointer(), 0);   // time step 0
image3DT ->SetVolume(image2->GetScalarPointer(), 1);   // time step 1
image3DT ->SetVolume(image3->GetScalarPointer(), 2);   // time step 2

 

 

Using the concepts briefly described above, it is then not necessary to 
implement time handling via ImageTimeSelector and the DataTree manually, but 
will be handled automatically by MITK.

 

 

Please let us know if you face any further issues with making your application 
time supportive!

 

 

Regards,

Mathias

 

 

From: Martín Bianculli [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 15, 2008 10:17 AM
To: [email protected]
Subject: [mitk-users] Setting the time step for 3D+t data

 

Hello everybody,

I'm dealing with 3D+t data.

By the moment, I created a 4D data:

vtkStructuredPoints* image1;
vtkStructuredPoints* image2;
vtkStructuredPoints* image3;

mitk::Image::Pointer image3DT = mitk::Image::New();
image3DT->Initialize(image1, 2, 3); 
image3DT ->SetVolume(image1->GetScalarPointer(), 0);
image3DT ->SetVolume(image2->GetScalarPointer(), 0);
image3DT ->SetVolume(image3->GetScalarPointer(), 0); 


Now, I want to set the volume image to be rendered.

I did it using the the mitk::ImageTimeSelector:

mitk::ImageTimeSelector::Pointer timeSelector = mitk::ImageTimeSelector::New();
timeSelector->SetInput( dynamic_cast<mitk::Image*>(image3DT );
timeSelector->SetTimeNr( num ); // num is the volume image number
timeSelector->UpdateLargestPossibleRegion();

mitk::DataTreeNode::Pointer timeSliceNode = mitk::DataTreeNode::New();  
timeSliceNode->SetData(m_ImageTimeSelector->GetOutput() );

It seems like a low level way of displaying an image. 


Is there any way of telling the data tree to render all the 3D+t nodes at a 
certain time step?

Something like:
mitk::DataTree::Pointer dataTree = mitk::DataTree::New();
Then create 3D+t data tree nodes, add the nodes to the data tree, and then ask 
the data tree to render (set) all the 3D+t nodes at time step t.
mitk::DataTree->SetTimeStep(timeStep t = 2), in order to set all the 3D+t nodes 
in the tree to display the same volume image time step.


Thanks in advance,

-- 
Martín Bianculli
Computational Imaging Lab, Pompeu Fabra University

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to