From 5a8cc0e3ff6ee84cc37d487bf4543de1d99ca0d4 Mon Sep 17 00:00:00 2001 From: Otmane Lahlou <otmane.lahlou@c-s.fr> Date: Thu, 4 Oct 2012 16:27:58 +0200 Subject: [PATCH] ENH: add a method to change the RegionGlComponent color in the ImageView --- Code/Visualization/otbImageView.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Code/Visualization/otbImageView.h b/Code/Visualization/otbImageView.h index a3bf5a3a08..cb48731741 100644 --- a/Code/Visualization/otbImageView.h +++ b/Code/Visualization/otbImageView.h @@ -75,6 +75,8 @@ public: /** Region gl component typedef */ typedef RegionGlComponent RegionGlComponentType; + typedef typename RegionGlComponent::ColorType ColorType; + typedef typename RegionGlComponentType::Pointer RegionGlComponentPointerType; /** @@ -103,6 +105,19 @@ public: /** Clear the widgets buffers */ void ClearBuffer(); + /** Method to set the ExtractRegionGlComponent color */ + void SetExtractRegionGlComponentColor(const ColorType& color) + { + m_ExtractRegionGlComponent->SetColor(color); + } + + /** Method to set the ScaledExtractRegionGlComponent color */ + void SetScaledExtractRegionGlComponent(const ColorType& color) + { + m_ScaledExtractRegionGlComponent->SetColor(color); + } + + protected: /** Constructor */ ImageView(); -- GitLab