Hi Urban,

you can use the MITK/VTK overlays for displaying a colorbar. 
Just include mitkColorBarOverlay.h and modify the code below for a simple 
example (using for example the renderer of the 3D render window):

  mitk::OverlayManager::Pointer OverlayManagerInstance = 
renderer->GetOverlayManager();
  mitk::ColorBarOverlay::Pointer colorBarOverlay = mitk::ColorBarOverlay::New();
  colorBarOverlay->SetProperty("ColorBarOverlay.LookupTable",prop.GetPointer());
  colorBarOverlay->SetNumberOfLabels(9);
  colorBarOverlay->SetAnnotationTextScaling(true);
  colorBarOverlay->SetDrawAnnotations(true);
  colorBarOverlay->SetDrawTickLabels(false);
  OverlayManagerInstance->AddOverlay( colorBarOverlay.GetPointer(), renderer );

Don't forget to set the lookup table property of your image.

Best,
Michael


-----Ursprüngliche Nachricht-----
Von: Urban Simoncic [mailto:[email protected]] 
Gesendet: Dienstag, 20. Oktober 2015 09:48
An: [email protected]
Betreff: [mitk-users] Colorbar showing color scale

Dear all,

is there a way to display a colorbar on (or near) the image that is displayed 
in MITK? Is there any other way to indicate how particular color (or grey 
scale) on the image maps into the number?

Best,
Urban

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

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

Reply via email to