Hi,

I am trying to use the surface mappers as a base class for my own 
mapper. The idea is that my data is in solid modeling format, but I 
convert it to VTK polydata for rendering. In order not to reimplement 
the vtk surface mapper, I subclassed SurfaceGLMapper2D and 
SurfaceVtkMapper3D and supply them with a mitk::Surface when demanded. I 
figured that this is actually intended because both mappers have 
(different) mechanisms to supply a mitk::Surface and do not use 
GetDataNode()->GetData() directly. In 2D mapper it is a non-virtual 
function GetInput() which returns a protected member variable and in 3D 
mapper - it is a virtual function GetInput() [Which in itself is rather 
weird :)].

Anyway, after I supplied the correct surface, the SurfaceGLMapper2D 
crashed because in line 234 it called the deprecated function 
GetDataNode()->GetVtkTransform(timestep); which leaded to a crash. The 
actual reason for crash was that I didn't initialize the geometry in my 
data object, however, I believe that substituting this with 
GetInput()->GetGeometry(timestep)->GetVtkTransform(); is the correct way.

So basically, I have two questions:
  1) Is this subclassing a correct use of the surface mappers in this case?
  2) Should I file a bug for this?

Thanks,
   Rostislav.


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to