Hi,

is it possible to change the text of a text overlay and update the
screen or you need to create a new TextOverlay2D instance any time
when you want to change the text.

I want to show the pixel intensities at the crosshair as an
annotation, but cannot update the text.

I tried these so far, with no success:

    for (int i = 0; i < 3; ++i)
    {
      mitk::BaseRenderer* renderer = m_RenderWindows[i]->GetRenderer();
      mitk::OverlayManager::Pointer overlayManager =
renderer->GetOverlayManager();

      mitk::TextOverlay2D::Pointer textOverlay = m_TextOverlays[i];
      textOverlay->SetText("hallo");
      textOverlay->Update(renderer);
      renderer->RequestUpdate();
      mitk::AbstractOverlayLayouter::Pointer layouter =
overlayManager->GetLayouter(renderer,
mitk::Overlay2DLayouter::STANDARD_2D_BOTTOMRIGHT());
      layouter->RemoveOverlay(textOverlay);
      layouter->AddOverlay(textOverlay);
      overlayManager->UpdateOverlays(renderer);
    }


The text was "hello" initially, and it does not change to "hallo".

Is it a bug or am I missing something?

Thanks,
Miklos

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to