Hi list,

my goal is to set up an arbitrary plane in space with an image on it 
(image in space). This is what can be done in VTK with the vtkImageActor.

As you can see in the attached discussion, I tried to use 
mitk::Geometry2DData, mitk::Geometry2DDataVtkMapper3D and 
mitk::ImageMapper2D to get something like the vtkImageActor in MITK. 
That still does not work for me. It seems like the ImageMapper2D 
extracts an empty image. But that is another story.

So I was wondering if it is possible to integrate an vktImageActor into 
the DataTree? Can you please tell me how to do that?

I appreciate every help!

Cheers, Marcel






Marcel Schenderlein schrieb:
> Hi Juan,
> 
> sorry for the newbie questions to come. I have not cared about the 
> renderers in MITK since this is done mostly by MITK itself(?). So far I 
> just put data into the DataTree and manipulated geometries and properties.
> 
>  > Try using imageMapper2D->SetDefaultProperties()
>  > And pass it the same renderer as argument
> 
> Which renderer shall I pass and where would I get it?
> 
> It is not clear to me why I need to care about the renderer at all, 
> since all I want to do is setup a plane in space with a texture as an 
> object in the DataTree. To my understanding the rendering process in 
> MITK traverses the DataTree and looks for displayable data and cares for 
> the rendering according to which data type it founds.
> 
> I am a bit stuck here :-/
> 
> Cheers, Marcel
> 
> 
> 
> 
> Juan A. Moya schrieb:
>> Hi,
>>
>> What you say looks ok to me
>>
>> Try using imageMapper2D->SetDefaultProperties()
>> And pass it the same renderer as argument
>>
>>
>>
>>              Juan Antonio Moya
>> Scientific developer
>> Computational Imaging Lab, Pompeu Fabra University
>> Networking Research Center on Bioengineering, Biomaterials and Nanomedicine
>> (CIBER-BBN)
>>
>> Information & Communication Technologies Department - D. 313 
>> Pompeu Fabra University, Pg. Circumval·lació 8 
>> 08003 Barcelona - Spain 
>> Phone +34 935 421350         
>> -----Mensaje original-----
>> De: Marcel Schenderlein [mailto:[EMAIL PROTECTED] 
>> Enviado el: miércoles, 05 de marzo de 2008 11:08
>> Para: Juan A. Moya; [email protected]
>> Asunto: Re: [mitk-users] Create an arbitrary plane with a texture
>> (Geometry2DDataVtkMapper3D, ImageMapper2D)
>>
>> Hi Juan,
>>
>> the plane is a child of my image node (do you mean child in the sense 
>> that the plane is a child node of the image node in the DataTree?). When 
>> I run the debugger I can see that the ImageMapper2D of my image node 
>> gets evaluated but it seems like the image that gets extracted as 
>> texture is invalid (just my impression from the member values of all the 
>> classes involved, I might have got that wrong). So I reckon I got a 
>> problem with the mitk::ImageMapper2D.
>>
>> I set the default properties for the image node like this:
>> imageMapper2D->SetDefaultProperties(imageNode);
>> This did not change anything. The image node was set to visible 
>> beforehand anyway.
>>
>> Just to make sure if I get that right. I set up an ordinary mitk::Image 
>> as data in an ordinary mitk::DataTreeNode. Then I set up an 
>> mitk::ImageMapper2D for the image node which kind of gets me a 2D view 
>> of my mitk::Image. This view will be used as texture for a plane 
>> (mitk::Geometry2DData) which has the mapper 
>> mitk::Geometry2DDataVtkMapper3D. Right?
>>
>> Cheers, Marcel
>>
>>
>>
>>
>> Juan A. Moya schrieb:
>>> Hi Marcel,
>>> Check that the standard plane is child of your image node.
>>> Check that the image node has the default properties (like visible true)
>>>
>>>
>>>             Juan Antonio Moya
>>> Scientific developer
>>> Computational Imaging Lab, Pompeu Fabra University
>>> Networking Research Center on Bioengineering, Biomaterials and
>> Nanomedicine
>>> (CIBER-BBN)
>>>
>>> Information & Communication Technologies Department - D. 313 
>>> Pompeu Fabra University, Pg. Circumval·lació 8 
>>> 08003 Barcelona - Spain 
>>> Phone +34 935 421350        
>>> -----Mensaje original-----
>>> De: [EMAIL PROTECTED]
>>> [mailto:[EMAIL PROTECTED] En nombre de Marcel
>>> Schenderlein
>>> Enviado el: martes, 04 de marzo de 2008 17:23
>>> Para: [email protected]
>>> Asunto: [mitk-users] Create an arbitrary plane with a texture
>>> (Geometry2DDataVtkMapper3D, ImageMapper2D)
>>>
>>> Hi list,
>>>
>>> what I want to do is the following: get a plane in space which I can 
>>> place wherever I like and which shows an image which is a slice from an 
>>> mitk::Image.
>>>
>>> So far I can see the plane but not the image/texture on it.
>>>
>>>
>>> I did the following:
>>>
>>> nodeIt =
>>>    mitk::DataTreeHelper::FindIteratorToNode(m_TreeIterator,currentNode);
>>>
>>> planeGeometry = mitk::PlaneGeometry::New();
>>> planeGeometry->InitializeStandardPlane(someRightVector,someDownVector);
>>> planeGeometry->SetBounds(someBounds);
>>>
>>> planeData = mitk::Geometry2DData::New();
>>> planeData->SetGeometry2D(planeGeometry);
>>>
>>> mapper = mitk::Geometry2DDataVtkMapper3D::New();
>>> mapper->SetDataIteratorForTexture(
>>>                           nodeIt.GetPointer() ); // -- is that correct?
>>>
>>> planeNode = mitk::DataTreeNode::New();
>>> planeNode->SetData(planeData);
>>> planeNode->SetMapper(mitk::BaseRenderer::Standard3D, mapper);
>>>
>>> imageMapper2D = mitk::ImageMapper2D::New();
>>> currentNode->SetMapper(mitk::BaseRenderer::Standard2D, imageMapper2D);
>>>
>>> nodeIt->Add(planeNode);
>>>
>>>
>>>
>>>
>>> Any ideas what goes wrong? Do I have to use Geometry2DDataVtkMapper3D in 
>>> another way? Do I have to initialize the ImageMapper2D and how would I 
>>> do that?
>>>
>>> Thanks in advance for every help!
>>>
>>> Cheers, Marcel
>>>
>>>
>>>
> 

-- 
---------------------------------------------
Dipl.-Ing. Marcel Schenderlein
Institute of Measurement, Control and Microtechnology
Ulm University
Albert Einstein Allee 41
89081 Ulm, Germany

Phone:  +49 (0) 731 50 26338
FAX:    +49 (0) 731 50 26301
Mobile: +49 (0) 176 217 33668

Email: [EMAIL PROTECTED]
web:   http://www.uni-ulm.de/in/mrm

Room: 41.2.230


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to