Hi Michael,
you can also replace the default mapper with your own mapper on mapper slot 2.
If you have to use a new slot (3) you will also have to instanciate mappers on 
slot 3 for all other DataTreeNodes if you want the data to be drawn. But 
Interaction shouldn't be affected  by this.

Could you specify your system more clearly? OS, MITK / ITK / VTK version...

Best Regards,
Ingmar
-------------------------
Dr. Ingmar Wegner
German Cancer Research Center (Deutsches Krebsforschungszentrum, DKFZ)
Member of the Helmholtz Association
Division Medical and Biological Informatics E130
Im Neuenheimer Feld 280
D-69120 Heidelberg
Phone: 49-(0)6221-42-3543
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: Kelm, Michael [mailto:[email protected]]
Gesendet: Montag, 30. November 2009 09:41
An: Wegner Ingmar; [email protected]
Betreff: Re: [mitk-users] Mapper slots and interactors

Hi Ingmar,

thanks for your answer. Actually I am using my own mapper in slot 3 and since 
the other three widgets are supposed to use the standard 2D mapper I cannot 
just overwrite slot 2.

My actual problem, however, is that I cannot zoom/pan anymore as soon as I 
switch widget 4 to mapper slot 3. Do I have to setup something else, related to 
the interactors?

Thank you,
Michael.

________________________________
From: Wegner Ingmar [mailto:[email protected]]
Sent: Sunday, November 29, 2009 8:10 PM
To: Kelm, Michael; [email protected]
Subject: AW: Mapper slots and interactors
Hi Michael,
if you define a new mapper slot and set a special mapper on this slot for a 
specific DataTreeNode, then you willalso need to give all other DataTreeNodes a 
Mapper on this new slot. Cou can do this by iterating over the tree and setting 
the mapper on slot 3 eqqual to slot 2.

But if you want to visualize a special data in one widget only (widget1), you 
can also disable the visualization in all other widget by calling:

m_pSelectedNode->SetVisibility(false, 
mitk::BaseRenderer::GetInstance(m_pMultiWidget->mitkWidget2->GetRenderWindow()));
m_pSelectedNode->SetVisibility(false, 
mitk::BaseRenderer::GetInstance(m_pMultiWidget->mitkWidget3->GetRenderWindow()));
m_pSelectedNode->SetVisibility(false, 
mitk::BaseRenderer::GetInstance(m_pMultiWidget->mitkWidget4->GetRenderWindow()));

Best Regards,
Ingmar


Von: Kelm, Michael [mailto:[email protected]]
Gesendet: Freitag, 27. November 2009 17:17
An: [email protected]
Betreff: [mitk-users] Mapper slots and interactors


Hello,

I have written an own 2D mapper and would like to use it in only one of the 4 
render windows.
This works fine by setting the third mapper slot of my image data node and by 
telling the mapping renderer of the fourth window to switch to this slot. 
Unfortunately, all interactors (pan, zoom, etc.) don't seem to work then. The 
following code illustrates my problem:

mitk::BaseRenderer::Pointer pMappingRenderer = 
mitk::BaseRenderer::GetInstance(m_pMultiWidget->mitkWidget4->GetRenderWindow());

                        int nMapperSlot = 3;
                        if (m_pSelectedNode->GetMapper(nMapperSlot)==0)
                        {
                                typedef mitk::ImageMapper2D MapperType;
                                MapperType::Pointer pMapper = MapperType::New();
                                
MapperType::SetDefaultProperties(m_pSelectedNode);
                                m_pSelectedNode->SetMapper(nMapperSlot, 
pMapper);
                        }
                        pMappingRenderer->SetMapperID(nMapperSlot);

What do I have to do to make the 2D interactors work if the third mapper slot 
is activated?

Thank you,
Michael.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to