Hi Sandy,
thank you for your answer. It wasn't related to the local storage, but I
managed to get it to work. I won't explain my solution because I did a
huge hack to get this problem and I would be surprised if someone does
the same.
This being said, I have a question for you, since you seem to know how
the mapper works. I have the kind of data that is exactly the same in
the 3 2D views. (The difference is the shader in each view.) Of course,
I would want to create only one OpenGL display list and reuse it for the
remaining 2D mapper. The problem is that the display list IDs don't seem
to be shared between the views.
this->ListId = glGenLists(1);
std::cout << this->ListId << std::endl;
always prints the same ID.
So, is there a way to reuse the same display list in all 2D views?
In fact, I have the same data in all views, so I might as well ask the
same question for all views :)
Le 2014-10-01 08:46, Engelhardt, Sandy a écrit :
Hi Nil,
you need to add a "LocalStorage", which derives from the
mitk::Mapper::BaseLocalStorage class to your mapper's header file.
This internal class is intended for including all rendering related
vtk member variables, such as mappers, actors etc.
To render transveral, coronal, and sagittal, each 2D mapper is called
three times. For performance reasons, the corresponding data for each
view is saved in the
internal helper class LocalStorage. This allows rendering n views with
just 1 mitkMapper using n vtkMapper.
Examples are provided in
Core/Code/Rendering/mitkImageVtkMapper2D.h
Core/Code/Rendering/mitkPointSetVtkMapper2D.h
The MapperSlotId is defined as enum in the mitk::BaseRenderer class:
enumStandardMapperSlot
{
Standard2D= 1, Standard3D= 2
};
Best,
Sandy
*Von:*Nil Goyette [mailto:[email protected]]
*Gesendet:* Donnerstag, 25. September 2014 19:35
*An:* [email protected]
*Betreff:* [mitk-users] 2D mapper
Hi all,
I created my own 2D and 3D mapper for the FiberBundle type. My 2D
mapper works as intended, but I can't get my 2D mapper to work for all
views. It works only in the axial view.
auto mapper2D = MyMapper::New();
...
node->SetMapper(1, mapper2D);
Do I need to write something special to apply my mapper to the
sagittal and frontal view?
Also, the first parameter of SetMaper (MapperSlotId) is the dimension
(-1) I target, right?
--
Logo Imeka <http://imeka.ca/>
Nil Goyette, M.Sc.
www.imeka.ca <http://imeka.ca/>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users