Hi,

did anyone of you receive the vtk error message "Invalid layer for
renderer: not rendered." before? This message appears after I call
renderer->GetOverlayManager() the first time in my mapper. The overlay
manager itself works perfectly. Everything is placed properly and
nothing is missing. The only ugly thing is the vtk pop up error message.

The error message is printed in the vtkRendererCollection.cxx in line 61.

  // Let the user know if they have put a renderer at an unused layer.
  for (this->InitTraversal(rsit); (ren = this->GetNextRenderer(rsit)); )
    {
    if (ren->GetLayer() < 0 || ren->GetLayer() >= numLayers)
      {
      vtkErrorMacro(<< "Invalid layer for renderer: not rendered.");
      }
    }

numLayers is 2 and ren->GetLayer() returns also 2. If I understand it
properly GetOverlayManager creates a second layer to have the normal
renderer plus a foreground renderer. But where does the third renderer
in my case come from? I am using a 2015.05 build under Windows and a
custom QML application (not the workbench).

After I read this note [1]:

In order to integrate an Overlay into an mitk::Mapper, it is advised not
to use the OverlayManager but to manually manage the Overlay.

I implemented the Overlay directly in my mapper which works without the
vtk error message. But I still do not understand why the previous
approach with the OverlayManager produce an error message and why it is
not recommended to use it.

I also had to implement a workaround to remove the overlay from the
renderer because ReleaseGraphicsResources is not called. This bug was
reported here http://bugs.mitk.org/show_bug.cgi?id=18910 . Are there any
news regarding this bug? Do you plan to fix it for the next release?


Thanks in advance.

Best

Martin

[1]
http://docs.mitk.org/nightly/OverlaysPage.html#OverlaysPage_ArchitectureSection

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to