diff --git a/Core/Code/Rendering/mitkOverlay.cpp b/Core/Code/Rendering/mitkOverlay.cpp index f827c6eb26..af37cfa631 100644 --- a/Core/Code/Rendering/mitkOverlay.cpp +++ b/Core/Code/Rendering/mitkOverlay.cpp @@ -1,293 +1,305 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkOverlay.h" mitk::Overlay::Overlay() : m_LayoutedBy(NULL) { m_PropertyList = mitk::PropertyList::New(); } mitk::Overlay::~Overlay() { } void mitk::Overlay::SetProperty(const std::string& propertyKey, const BaseProperty::Pointer& propertyValue, const mitk::BaseRenderer* renderer) { GetPropertyList(renderer)->SetProperty(propertyKey, propertyValue); this->Modified(); } void mitk::Overlay::ReplaceProperty(const std::string& propertyKey, const BaseProperty::Pointer& propertyValue, const mitk::BaseRenderer* renderer) { GetPropertyList(renderer)->ReplaceProperty(propertyKey, propertyValue); } void mitk::Overlay::AddProperty(const std::string& propertyKey, const BaseProperty::Pointer& propertyValue, const mitk::BaseRenderer* renderer, bool overwrite) { if((overwrite) || (GetProperty(propertyKey, renderer) == NULL)) { SetProperty(propertyKey, propertyValue, renderer); } } void mitk::Overlay::ConcatenatePropertyList(PropertyList *pList, bool replace) { m_PropertyList->ConcatenatePropertyList(pList, replace); } mitk::BaseProperty* mitk::Overlay::GetProperty(const std::string& propertyKey, const mitk::BaseRenderer* renderer) const { //renderer specified? if (renderer) { std::map::const_iterator it; //check for the renderer specific property it=m_MapOfPropertyLists.find(renderer); if(it!=m_MapOfPropertyLists.end()) //found { mitk::BaseProperty::Pointer property; property=it->second->GetProperty(propertyKey); if(property.IsNotNull())//found an enabled property in the render specific list return property; else //found a renderer specific list, but not the desired property return m_PropertyList->GetProperty(propertyKey); //return renderer unspecific property } else //didn't find the property list of the given renderer { //return the renderer unspecific property if there is one return m_PropertyList->GetProperty(propertyKey); } } else //no specific renderer given; use the renderer independent one { mitk::BaseProperty::Pointer property; property=m_PropertyList->GetProperty(propertyKey); if(property.IsNotNull()) return property; } //only to satisfy compiler! return NULL; } bool mitk::Overlay::GetBoolProperty(const std::string& propertyKey, bool& boolValue, mitk::BaseRenderer* renderer) const { mitk::BoolProperty::Pointer boolprop = dynamic_cast(GetProperty(propertyKey, renderer)); if(boolprop.IsNull()) return false; boolValue = boolprop->GetValue(); return true; } bool mitk::Overlay::GetIntProperty(const std::string& propertyKey, int &intValue, mitk::BaseRenderer* renderer) const { mitk::IntProperty::Pointer intprop = dynamic_cast(GetProperty(propertyKey, renderer)); if(intprop.IsNull()) return false; intValue = intprop->GetValue(); return true; } bool mitk::Overlay::GetFloatProperty(const std::string& propertyKey, float &floatValue, mitk::BaseRenderer* renderer) const { mitk::FloatProperty::Pointer floatprop = dynamic_cast(GetProperty(propertyKey, renderer)); if(floatprop.IsNull()) return false; floatValue = floatprop->GetValue(); return true; } bool mitk::Overlay::GetStringProperty(const std::string& propertyKey, std::string& string, mitk::BaseRenderer* renderer) const { mitk::StringProperty::Pointer stringProp = dynamic_cast(GetProperty(propertyKey, renderer)); if(stringProp.IsNull()) { return false; } else { //memcpy((void*)string, stringProp->GetValue(), strlen(stringProp->GetValue()) + 1 ); // looks dangerous string = stringProp->GetValue(); return true; } } void mitk::Overlay::SetIntProperty(const std::string& propertyKey, int intValue, mitk::BaseRenderer* renderer) { GetPropertyList(renderer)->SetProperty(propertyKey, mitk::IntProperty::New(intValue)); } void mitk::Overlay::SetBoolProperty( const std::string& propertyKey, bool boolValue, mitk::BaseRenderer* renderer/*=NULL*/ ) { GetPropertyList(renderer)->SetProperty(propertyKey, mitk::BoolProperty::New(boolValue)); } void mitk::Overlay::SetFloatProperty( const std::string& propertyKey, float floatValue, mitk::BaseRenderer* renderer/*=NULL*/ ) { GetPropertyList(renderer)->SetProperty(propertyKey, mitk::FloatProperty::New(floatValue)); } void mitk::Overlay::SetStringProperty( const std::string& propertyKey, const std::string& stringValue, mitk::BaseRenderer* renderer/*=NULL*/ ) { GetPropertyList(renderer)->SetProperty(propertyKey, mitk::StringProperty::New(stringValue)); } std::string mitk::Overlay::GetName() const { mitk::StringProperty* sp = dynamic_cast(this->GetProperty("name")); if (sp == NULL) return ""; return sp->GetValue(); } void mitk::Overlay::SetName(const std::string& name) { this->SetStringProperty("name", name); } bool mitk::Overlay::GetName(std::string& nodeName, mitk::BaseRenderer* renderer, const std::string& propertyKey) const { return GetStringProperty(propertyKey, nodeName, renderer); } void mitk::Overlay::SetText(std::string text) { SetStringProperty("Overlay.Text", text.c_str()); } std::string mitk::Overlay::GetText() const { std::string text; GetPropertyList()->GetStringProperty("Overlay.Text", text); return text; } void mitk::Overlay::SetFontSize(int fontSize) { SetIntProperty("Overlay.FontSize",fontSize); } int mitk::Overlay::GetFontSize() const { int fontSize = 1; GetPropertyList()->GetIntProperty("Overlay.FontSize", fontSize); return fontSize; } bool mitk::Overlay::GetVisibility(bool& visible, mitk::BaseRenderer* renderer, const std::string& propertyKey) const { return GetBoolProperty(propertyKey, visible, renderer); } bool mitk::Overlay::IsVisible(mitk::BaseRenderer* renderer, const std::string& propertyKey, bool defaultIsOn) const { return IsOn(propertyKey, renderer, defaultIsOn); } bool mitk::Overlay::GetColor(float rgb[], mitk::BaseRenderer* renderer, const std::string& propertyKey) const { mitk::ColorProperty::Pointer colorprop = dynamic_cast(GetProperty(propertyKey, renderer)); if(colorprop.IsNull()) return false; memcpy(rgb, colorprop->GetColor().GetDataPointer(), 3*sizeof(float)); return true; } void mitk::Overlay::SetColor(const mitk::Color &color, mitk::BaseRenderer* renderer, const std::string& propertyKey) { mitk::ColorProperty::Pointer prop; prop = mitk::ColorProperty::New(color); GetPropertyList(renderer)->SetProperty(propertyKey, prop); } void mitk::Overlay::SetColor(float red, float green, float blue, mitk::BaseRenderer* renderer, const std::string& propertyKey) { float color[3]; color[0]=red; color[1]=green; color[2]=blue; SetColor(color, renderer, propertyKey); } void mitk::Overlay::SetColor(const float rgb[], mitk::BaseRenderer* renderer, const std::string& propertyKey) { mitk::ColorProperty::Pointer prop; prop = mitk::ColorProperty::New(rgb); GetPropertyList(renderer)->SetProperty(propertyKey, prop); } bool mitk::Overlay::GetOpacity(float &opacity, mitk::BaseRenderer* renderer, const std::string& propertyKey) const { mitk::FloatProperty::Pointer opacityprop = dynamic_cast(GetProperty(propertyKey, renderer)); if(opacityprop.IsNull()) return false; opacity=opacityprop->GetValue(); return true; } void mitk::Overlay::SetOpacity(float opacity, mitk::BaseRenderer* renderer, const std::string& propertyKey) { mitk::FloatProperty::Pointer prop; prop = mitk::FloatProperty::New(opacity); GetPropertyList(renderer)->SetProperty(propertyKey, prop); } void mitk::Overlay::SetVisibility(bool visible, mitk::BaseRenderer *renderer, const std::string& propertyKey) { mitk::BoolProperty::Pointer prop; prop = mitk::BoolProperty::New(visible); GetPropertyList(renderer)->SetProperty(propertyKey, prop); } mitk::PropertyList* mitk::Overlay::GetPropertyList(const mitk::BaseRenderer* renderer) const { if(renderer==NULL) return m_PropertyList; mitk::PropertyList::Pointer & propertyList = m_MapOfPropertyLists[renderer]; if(propertyList.IsNull()) propertyList = mitk::PropertyList::New(); assert(m_MapOfPropertyLists[renderer].IsNotNull()); return propertyList; } bool mitk::Overlay::BaseLocalStorage::IsGenerateDataRequired(mitk::BaseRenderer *renderer, mitk::Overlay *overlay) { if( m_LastGenerateDataTime < overlay -> GetMTime () ) return true; if( renderer && m_LastGenerateDataTime < renderer -> GetTimeStepUpdateTime ( ) ) return true; return false; } + +mitk::Overlay::Bounds mitk::Overlay::GetBoundsOnDisplay(mitk::BaseRenderer*) const +{ + mitk::Overlay::Bounds bounds; + bounds.Position[0] = bounds.Position[1] = bounds.Size[0] = bounds.Size[1] = 0; + return bounds; +} + +void mitk::Overlay::SetBoundsOnDisplay(mitk::BaseRenderer*, const mitk::Overlay::Bounds&) +{ +} + diff --git a/Core/Code/Rendering/mitkOverlay.h b/Core/Code/Rendering/mitkOverlay.h index 026b6b3bfe..8c93ccdde7 100644 --- a/Core/Code/Rendering/mitkOverlay.h +++ b/Core/Code/Rendering/mitkOverlay.h @@ -1,427 +1,427 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef OVERLAY_H #define OVERLAY_H #include #include #include namespace mitk { class AbstractOverlayLayouter; /** \brief Base class for all overlays */ /** This class is to be implemented in order to create overlays which are managed by the OverlayManager and can be placed by a AbstractOverlayLayouter. This class contains an internal Propertylist, and another PropertyList for each BaseRenderer. A property that is specified for a specific renderer always overrides the general internal property of the same name. AddOverlay, RemoveOverlay and UpdateOverlay methods have to be implemented.*/ class MITK_CORE_EXPORT Overlay : public itk::Object { friend class AbstractOverlayLayouter; public: /** \brief Container for position and size on the display.*/ struct Bounds { itk::Point Position; itk::Point Size; }; typedef std::map MapOfPropertyLists; /** \brief Base class for mapper specific rendering ressources. */ class MITK_CORE_EXPORT BaseLocalStorage { public: bool IsGenerateDataRequired(mitk::BaseRenderer *renderer,mitk::Overlay *overlay); inline void UpdateGenerateDataTime() { m_LastGenerateDataTime.Modified(); } inline itk::TimeStamp & GetLastGenerateDataTime() { return m_LastGenerateDataTime; } protected: /** \brief timestamp of last update of stored data */ itk::TimeStamp m_LastGenerateDataTime; }; /** * @brief Set the property (instance of BaseProperty) with key @a propertyKey in the PropertyList * of the @a renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-value. * * @warning Change in semantics since Aug 25th 2006. Check your usage of this method if you do * more with properties than just call SetProperty( "key", new SomeProperty("value") ). * * @sa GetProperty * @sa m_PropertyList * @sa m_MapOfPropertyLists */ void SetProperty(const std::string& propertyKey, const BaseProperty::Pointer& property, const mitk::BaseRenderer* renderer = NULL); /** * @brief Replace the property (instance of BaseProperty) with key @a propertyKey in the PropertyList * of the @a renderer (if NULL, use BaseRenderer-independent PropertyList). This is set-by-reference. * * If @a renderer is @a NULL the property is set in the BaseRenderer-independent * PropertyList of this Overlay. * @sa GetProperty * @sa m_PropertyList * @sa m_MapOfPropertyLists */ void ReplaceProperty(const std::string& propertyKey, const BaseProperty::Pointer& property, const mitk::BaseRenderer* renderer = NULL); /** * @brief Add the property (instance of BaseProperty) if it does * not exist (or always if \a overwrite is \a true) * with key @a propertyKey in the PropertyList * of the @a renderer (if NULL, use BaseRenderer-independent * PropertyList). This is set-by-value. * * For \a overwrite == \a false the property is \em not changed * if it already exists. For \a overwrite == \a true the method * is identical to SetProperty. * * @sa SetProperty * @sa GetProperty * @sa m_PropertyList * @sa m_MapOfPropertyLists */ void AddProperty(const std::string& propertyKey, const BaseProperty::Pointer& property, const mitk::BaseRenderer* renderer = NULL, bool overwrite = false); /** * @brief Get the PropertyList of the @a renderer. If @a renderer is @a * NULL, the BaseRenderer-independent PropertyList of this Overlay * is returned. * @sa GetProperty * @sa m_PropertyList * @sa m_MapOfPropertyLists */ mitk::PropertyList* GetPropertyList(const mitk::BaseRenderer* renderer = NULL) const; /** * @brief Add values from another PropertyList. * * Overwrites values in m_PropertyList only when possible (i.e. when types are compatible). * If you want to allow for object type changes (replacing a "visible":BoolProperty with "visible":IntProperty, * set the @param replace. * * @param replace true: if @param pList contains a property "visible" of type ColorProperty and our m_PropertyList also has a "visible" property of a different type (e.g. BoolProperty), change the type, i.e. replace the objects behind the pointer. * * @sa SetProperty * @sa ReplaceProperty * @sa m_PropertyList */ void ConcatenatePropertyList(PropertyList* pList, bool replace = false); /** * @brief Get the property (instance of BaseProperty) with key @a propertyKey from the PropertyList * of the @a renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. * * If @a renderer is @a NULL or the @a propertyKey cannot be found * in the PropertyList specific to @a renderer or is disabled there, the BaseRenderer-independent * PropertyList of this Overlay is queried. * @sa GetPropertyList * @sa m_PropertyList * @sa m_MapOfPropertyLists */ mitk::BaseProperty* GetProperty(const std::string& propertyKey, const mitk::BaseRenderer* renderer = NULL) const; /** * @brief Get the property of type T with key @a propertyKey from the PropertyList * of the @a renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. * * If @a renderer is @a NULL or the @a propertyKey cannot be found * in the PropertyList specific to @a renderer or is disabled there, the BaseRenderer-independent * PropertyList of this Overlay is queried. * @sa GetPropertyList * @sa m_PropertyList * @sa m_MapOfPropertyLists */ template bool GetProperty(itk::SmartPointer &property, const std::string& propertyKey, const mitk::BaseRenderer* renderer = NULL) const { property = dynamic_cast(GetProperty(propertyKey, renderer)); return property.IsNotNull(); } /** * @brief Get the property of type T with key @a propertyKey from the PropertyList * of the @a renderer, if available there, otherwise use the BaseRenderer-independent PropertyList. * * If @a renderer is @a NULL or the @a propertyKey cannot be found * in the PropertyList specific to @a renderer or is disabled there, the BaseRenderer-independent * PropertyList of this Overlay is queried. * @sa GetPropertyList * @sa m_PropertyList * @sa m_MapOfPropertyLists */ template bool GetProperty(T* &property, const std::string& propertyKey, const mitk::BaseRenderer* renderer = NULL) const { property = dynamic_cast(GetProperty(propertyKey, renderer)); return property!=NULL; } /** * @brief Convenience access method for GenericProperty properties * (T being the type of the second parameter) * @return @a true property was found */ template bool GetPropertyValue(const std::string& propertyKey, T & value, mitk::BaseRenderer* renderer=NULL) const { GenericProperty* gp= dynamic_cast*>(GetProperty(propertyKey, renderer)); if ( gp != NULL ) { value = gp->GetValue(); return true; } return false; } /** * @brief Convenience access method for bool properties (instances of * BoolProperty) * @return @a true property was found */ bool GetBoolProperty(const std::string& propertyKey, bool &boolValue, mitk::BaseRenderer* renderer = NULL) const; /** * @brief Convenience access method for int properties (instances of * IntProperty) * @return @a true property was found */ bool GetIntProperty(const std::string& propertyKey, int &intValue, mitk::BaseRenderer* renderer=NULL) const; /** * @brief Convenience access method for float properties (instances of * FloatProperty) * @return @a true property was found */ bool GetFloatProperty(const std::string& propertyKey, float &floatValue, mitk::BaseRenderer* renderer = NULL) const; /** * @brief Convenience access method for string properties (instances of * StringProperty) * @return @a true property was found */ bool GetStringProperty(const std::string& propertyKey, std::string& string, mitk::BaseRenderer* renderer = NULL) const; /** * @brief Convenience method for setting int properties (instances of * IntProperty) */ void SetIntProperty(const std::string& propertyKey, int intValue, mitk::BaseRenderer* renderer=NULL); /** * @brief Convenience method for setting int properties (instances of * IntProperty) */ void SetBoolProperty(const std::string& propertyKey, bool boolValue, mitk::BaseRenderer* renderer=NULL); /** * @brief Convenience method for setting int properties (instances of * IntProperty) */ void SetFloatProperty(const std::string& propertyKey, float floatValue, mitk::BaseRenderer* renderer=NULL); /** * @brief Convenience method for setting int properties (instances of * IntProperty) */ void SetStringProperty(const std::string& propertyKey, const std::string& string, mitk::BaseRenderer* renderer=NULL); /** * @brief Convenience access method for boolean properties (instances * of BoolProperty). Return value is the value of the property. If the property is * not found, the value of @a defaultIsOn is returned. * * Thus, the return value has a different meaning than in the * GetBoolProperty method! * @sa GetBoolProperty */ bool IsOn(const std::string& propertyKey, mitk::BaseRenderer* renderer, bool defaultIsOn = true) const { GetBoolProperty(propertyKey, defaultIsOn, renderer); return defaultIsOn; } /** * @brief Convenience access method for accessing the name of an object (instance of * StringProperty with property-key "name") * @return @a true property was found */ bool GetName(std::string& nodeName, mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "name") const; /** * @brief Extra convenience access method for accessing the name of an object (instance of * StringProperty with property-key "name"). * * This method does not take the renderer specific * propertylists into account, because the name of an object should never be renderer specific. * @returns a std::string with the name of the object (content of "name" Property). * If there is no "name" Property, an empty string will be returned. */ virtual std::string GetName() const; /** * @brief Extra convenience access method to set the name of an object. * * The name will be stored in the non-renderer-specific PropertyList in a StringProperty named "name". */ virtual void SetName( const std::string& name); /** * @brief Convenience access method for color properties (instances of * ColorProperty) * @return @a true property was found */ bool GetColor(float rgb[], mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "color") const; /** * @brief Convenience method for setting color properties (instances of * ColorProperty) */ void SetColor(const mitk::Color &color, mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "color"); /** * @brief Convenience method for setting color properties (instances of * ColorProperty) */ void SetColor(float red, float green, float blue, mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "color"); /** * @brief Convenience method for setting color properties (instances of * ColorProperty) */ void SetColor(const float rgb[], mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "color"); /** * @brief Convenience access method for opacity properties (instances of * FloatProperty) * @return @a true property was found */ bool GetOpacity(float &opacity, mitk::BaseRenderer* renderer, const std::string& propertyKey = "opacity") const; /** * @brief Convenience method for setting opacity properties (instances of * FloatProperty) */ void SetOpacity(float opacity, mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "opacity"); void SetText(std::string text); std::string GetText() const; void SetFontSize(int fontSize); int GetFontSize() const; /** * @brief Convenience access method for visibility properties (instances * of BoolProperty with property-key "visible") * @return @a true property was found * @sa IsVisible */ bool GetVisibility(bool &visible, mitk::BaseRenderer* renderer, const std::string& propertyKey = "visible") const; /** * @brief Convenience access method for visibility properties (instances * of BoolProperty). Return value is the visibility. Default is * visible==true, i.e., true is returned even if the property (@a * propertyKey) is not found. * * Thus, the return value has a different meaning than in the * GetVisibility method! * @sa GetVisibility * @sa IsOn */ bool IsVisible(mitk::BaseRenderer* renderer, const std::string& propertyKey = "visible", bool defaultIsOn = true) const; /** * @brief Convenience method for setting visibility properties (instances * of BoolProperty) * @param visible If set to true, the data will be rendered. If false, the render will skip this data. * @param renderer Specify a renderer if the visibility shall be specific to a renderer * @param propertykey Can be used to specify a user defined name of the visibility propery. */ void SetVisibility(bool visible, mitk::BaseRenderer* renderer = NULL, const std::string& propertyKey = "visible"); /** \brief Adds the overlay to the specified renderer. Update Overlay should be called soon in order to apply all properties*/ virtual void AddToBaseRenderer(BaseRenderer *renderer) = 0; /** \brief Removes the overlay from the specified renderer. It is not visible anymore then.*/ virtual void RemoveFromBaseRenderer(BaseRenderer *renderer) = 0; /** \brief Applies all properties and should be called before the rendering procedure.*/ virtual void Update(BaseRenderer *renderer) = 0; /** \brief Returns position and size of the overlay on the display.*/ - virtual Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const = 0; + virtual Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const; /** \brief Sets position and size of the overlay on the display.*/ - virtual void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds&) = 0; + virtual void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds&); mitkClassMacro(Overlay, itk::Object); protected: /** \brief explicit constructor which disallows implicit conversions */ explicit Overlay(); /** \brief virtual destructor in order to derive from this class */ virtual ~Overlay(); /** * @brief BaseRenderer-independent PropertyList * * Properties herein can be overwritten specifically for each BaseRenderer * by the BaseRenderer-specific properties defined in m_MapOfPropertyLists. */ PropertyList::Pointer m_PropertyList; /** * @brief Map associating each BaseRenderer with its own PropertyList */ mutable MapOfPropertyLists m_MapOfPropertyLists; /** * @brief Timestamp of the last change of m_Data */ itk::TimeStamp m_DataReferenceChangedTime; private: /** \brief copy constructor */ Overlay( const Overlay &); /** \brief assignment operator */ Overlay &operator=(const Overlay &); /** \brief Reference to the layouter in which this overlay is managed. */ AbstractOverlayLayouter* m_LayoutedBy; }; } // namespace mitk #endif // OVERLAY_H diff --git a/Core/Code/Rendering/mitkScaleLegendOverlay.cpp b/Core/Code/Rendering/mitkScaleLegendOverlay.cpp new file mode 100644 index 0000000000..c7b2ef0cec --- /dev/null +++ b/Core/Code/Rendering/mitkScaleLegendOverlay.cpp @@ -0,0 +1,156 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "mitkScaleLegendOverlay.h" +#include + +mitk::ScaleLegendOverlay::ScaleLegendOverlay() +{ + SetRightAxisVisibility(true); + + SetLeftAxisVisibility(false); + + SetTopAxisVisibility(false); + + SetBottomAxisVisibility(false); + + SetLegendVisibility(false); + + SetRightBorderOffset(30); + + SetCornerOffsetFactor(2.0); +} + + +mitk::ScaleLegendOverlay::~ScaleLegendOverlay() +{ +} + +mitk::ScaleLegendOverlay::LocalStorage::~LocalStorage() +{ +} + +mitk::ScaleLegendOverlay::LocalStorage::LocalStorage() +{ + m_legendScaleActor = vtkSmartPointer::New(); +} + +void mitk::ScaleLegendOverlay::UpdateVtkOverlay(mitk::BaseRenderer *renderer) +{ + LocalStorage* ls = this->m_LSH.GetLocalStorage(renderer); + + if(ls->IsGenerateDataRequired(renderer,this)) + { + ls->m_legendScaleActor->SetRightAxisVisibility(this->GetRightAxisVisibility()); + ls->m_legendScaleActor->SetTopAxisVisibility(this->GetTopAxisVisibility()); + ls->m_legendScaleActor->SetLeftAxisVisibility(this->GetLeftAxisVisibility()); + ls->m_legendScaleActor->SetBottomAxisVisibility(this->GetBottomAxisVisibility()); + ls->m_legendScaleActor->SetLegendVisibility(this->GetLegendVisibility()); + ls->m_legendScaleActor->SetRightBorderOffset(this->GetRightBorderOffset()); + ls->m_legendScaleActor->SetCornerOffsetFactor (this->GetCornerOffsetFactor()); + } + +} + +vtkProp* mitk::ScaleLegendOverlay::GetVtkProp(BaseRenderer *renderer) const +{ + LocalStorage* ls = this->m_LSH.GetLocalStorage(renderer); + return ls->m_legendScaleActor; +} + +void mitk::ScaleLegendOverlay::SetRightAxisVisibility(bool visibility) +{ + SetBoolProperty("ScaleLegendOverlay.RightAxisVisibility", visibility); +} + +bool mitk::ScaleLegendOverlay::GetRightAxisVisibility() const +{ + bool visibility; + GetPropertyList()->GetBoolProperty("ScaleLegendOverlay.RightAxisVisibility", visibility); + return visibility; +} + +void mitk::ScaleLegendOverlay::SetLeftAxisVisibility(bool visibility) +{ + SetBoolProperty("ScaleLegendOverlay.LeftAxisVisibility", visibility); +} + +bool mitk::ScaleLegendOverlay::GetLeftAxisVisibility() const +{ + bool visibility; + GetPropertyList()->GetBoolProperty("ScaleLegendOverlay.LeftAxisVisibility", visibility); + return visibility; +} + +void mitk::ScaleLegendOverlay::SetTopAxisVisibility(bool visibility) +{ + SetBoolProperty("ScaleLegendOverlay.TopAxisVisibility", visibility); +} + +bool mitk::ScaleLegendOverlay::GetTopAxisVisibility() const +{ + bool visibility; + GetPropertyList()->GetBoolProperty("ScaleLegendOverlay.TopAxisVisibility", visibility); + return visibility; +} + +void mitk::ScaleLegendOverlay::SetBottomAxisVisibility(bool visibility) +{ + SetBoolProperty("ScaleLegendOverlay.BottomAxisVisibility", visibility); +} + +bool mitk::ScaleLegendOverlay::GetBottomAxisVisibility() const +{ + bool visibility; + GetPropertyList()->GetBoolProperty("ScaleLegendOverlay.BottomAxisVisibility", visibility); + return visibility; +} + +void mitk::ScaleLegendOverlay::SetLegendVisibility(bool visibility) +{ + SetBoolProperty("ScaleLegendOverlay.SetLegendVisibility", visibility); +} + +bool mitk::ScaleLegendOverlay::GetLegendVisibility() const +{ + bool visibility; + GetPropertyList()->GetBoolProperty("ScaleLegendOverlay.SetLegendVisibility", visibility); + return visibility; +} + +void mitk::ScaleLegendOverlay::SetRightBorderOffset(int offset) +{ + SetIntProperty("ScaleLegendOverlay.RightBorderOffset", offset); +} + +int mitk::ScaleLegendOverlay::GetRightBorderOffset() const +{ + int offset; + GetPropertyList()->GetIntProperty("ScaleLegendOverlay.RightBorderOffset", offset); + return offset; +} + +void mitk::ScaleLegendOverlay::SetCornerOffsetFactor(float offsetFactor) +{ + SetFloatProperty("ScaleLegendOverlay.CornerOffsetFactor", offsetFactor); +} + +float mitk::ScaleLegendOverlay::GetCornerOffsetFactor() const +{ + float offsetFactor; + GetPropertyList()->GetFloatProperty("ScaleLegendOverlay.CornerOffsetFactor", offsetFactor); + return offsetFactor; +} diff --git a/Core/Code/Rendering/mitkScaleLegendOverlay.h b/Core/Code/Rendering/mitkScaleLegendOverlay.h new file mode 100644 index 0000000000..34a429c8d8 --- /dev/null +++ b/Core/Code/Rendering/mitkScaleLegendOverlay.h @@ -0,0 +1,99 @@ +/*=================================================================== + + The Medical Imaging Interaction Toolkit (MITK) + + Copyright (c) German Cancer Research Center, + Division of Medical and Biological Informatics. + All rights reserved. + + This software is distributed WITHOUT ANY WARRANTY; without + even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. + + See LICENSE.txt or http://www.mitk.org for details. + + ===================================================================*/ + +#ifndef SCALELEGENDOVERLAY_H +#define SCALELEGENDOVERLAY_H + +#include +#include +#include +#include "MitkExports.h" + +class vtkLegendScaleActor; + +namespace mitk { + +/** \brief Displays configurable scales on the renderwindow. The scale is determined by the image spacing. */ +class MITK_CORE_EXPORT ScaleLegendOverlay : public mitk::VtkOverlay { +public: + + class LocalStorage : public mitk::Overlay::BaseLocalStorage + { + public: + /** \brief Actor of a 2D render window. */ + vtkSmartPointer m_legendScaleActor; + + /** \brief Timestamp of last update of stored data. */ + itk::TimeStamp m_LastUpdateTime; + + /** \brief Default constructor of the local storage. */ + LocalStorage(); + /** \brief Default deconstructor of the local storage. */ + ~LocalStorage(); + }; + + mitkClassMacro(ScaleLegendOverlay, mitk::VtkOverlay); + itkNewMacro(ScaleLegendOverlay); + + void SetRightAxisVisibility(bool visibility); + bool GetRightAxisVisibility() const; + + void SetLeftAxisVisibility(bool visibility); + bool GetLeftAxisVisibility() const; + + void SetTopAxisVisibility(bool visibility); + bool GetTopAxisVisibility() const; + + void SetBottomAxisVisibility(bool visibility); + bool GetBottomAxisVisibility() const; + + void SetLegendVisibility(bool visibility); + bool GetLegendVisibility() const; + + void SetRightBorderOffset(int offset); + int GetRightBorderOffset() const; + + void SetCornerOffsetFactor(float offsetFactor); + float GetCornerOffsetFactor() const; + +protected: + + /** \brief The LocalStorageHandler holds all LocalStorages for the render windows. */ + mutable mitk::LocalStorageHandler m_LSH; + + virtual vtkProp* GetVtkProp(BaseRenderer *renderer) const; + virtual void UpdateVtkOverlay(BaseRenderer *renderer); + + /** \brief explicit constructor which disallows implicit conversions */ + explicit ScaleLegendOverlay(); + + /** \brief virtual destructor in order to derive from this class */ + virtual ~ScaleLegendOverlay(); + +private: + + /** \brief copy constructor */ + ScaleLegendOverlay( const ScaleLegendOverlay &); + + /** \brief assignment operator */ + ScaleLegendOverlay &operator=(const ScaleLegendOverlay &); + +}; + +} // namespace mitk +#endif // SCALELEGENDOVERLAY_H + + diff --git a/Core/Code/Rendering/mitkVtkOverlay3D.cpp b/Core/Code/Rendering/mitkVtkOverlay3D.cpp index 8629054be1..3ecf2be530 100644 --- a/Core/Code/Rendering/mitkVtkOverlay3D.cpp +++ b/Core/Code/Rendering/mitkVtkOverlay3D.cpp @@ -1,69 +1,57 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkVtkOverlay3D.h" mitk::VtkOverlay3D::VtkOverlay3D() { mitk::Point3D offsetVector; offsetVector.Fill(0); SetOffsetVector(offsetVector); } mitk::VtkOverlay3D::~VtkOverlay3D() { } - -mitk::Overlay::Bounds mitk::VtkOverlay3D::GetBoundsOnDisplay(mitk::BaseRenderer*) const -{ - mitk::Overlay::Bounds bounds; - bounds.Position[0] = bounds.Position[1] = bounds.Size[0] = bounds.Size[1] = 0; - return bounds; -} - -void mitk::VtkOverlay3D::SetBoundsOnDisplay(mitk::BaseRenderer*, const mitk::Overlay::Bounds&) -{ -} - void mitk::VtkOverlay3D::SetPosition3D(const Point3D& position3D, mitk::BaseRenderer *renderer) { mitk::Point3dProperty::Pointer position3dProperty = mitk::Point3dProperty::New(position3D); SetProperty("VtkOverlay3D.Position3D", position3dProperty.GetPointer(),renderer); } mitk::Point3D mitk::VtkOverlay3D::GetPosition3D(mitk::BaseRenderer *renderer) const { mitk::Point3D position3D; position3D.Fill(0); GetPropertyValue("VtkOverlay3D.Position3D", position3D, renderer); return position3D; } void mitk::VtkOverlay3D::SetOffsetVector(const Point3D& OffsetVector, mitk::BaseRenderer *renderer) { mitk::Point3dProperty::Pointer OffsetVectorProperty = mitk::Point3dProperty::New(OffsetVector); SetProperty("VtkOverlay3D.OffsetVector", OffsetVectorProperty.GetPointer(),renderer); } mitk::Point3D mitk::VtkOverlay3D::GetOffsetVector(mitk::BaseRenderer *renderer) const { mitk::Point3D OffsetVector; OffsetVector.Fill(0); GetPropertyValue("VtkOverlay3D.OffsetVector", OffsetVector, renderer); return OffsetVector; } diff --git a/Core/Code/Rendering/mitkVtkOverlay3D.h b/Core/Code/Rendering/mitkVtkOverlay3D.h index 6f3efc447d..50a8d617e3 100644 --- a/Core/Code/Rendering/mitkVtkOverlay3D.h +++ b/Core/Code/Rendering/mitkVtkOverlay3D.h @@ -1,70 +1,67 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef VTKOVERLAY3D_H #define VTKOVERLAY3D_H #include #include "mitkVtkOverlay.h" #include namespace mitk { /** * @brief The VtkOverlay3D class is the basis for all VTK based Overlays which create * any 3D element as a vtkProp that will be drawn on the renderer. */ class MITK_CORE_EXPORT VtkOverlay3D : public VtkOverlay { public: void SetPosition3D(const Point3D& position3D, mitk::BaseRenderer* renderer = NULL); Point3D GetPosition3D(mitk::BaseRenderer* renderer = NULL) const; void SetOffsetVector(const Point3D& OffsetVector, mitk::BaseRenderer* renderer = NULL); Point3D GetOffsetVector(mitk::BaseRenderer* renderer = NULL) const; - Overlay::Bounds GetBoundsOnDisplay(BaseRenderer*) const; - void SetBoundsOnDisplay(BaseRenderer*, const Bounds&); - mitkClassMacro(VtkOverlay3D, VtkOverlay); protected: virtual void UpdateVtkOverlay(BaseRenderer *renderer) = 0; /** \brief explicit constructor which disallows implicit conversions */ explicit VtkOverlay3D(); /** \brief virtual destructor in order to derive from this class */ virtual ~VtkOverlay3D(); private: /** \brief copy constructor */ VtkOverlay3D( const VtkOverlay3D &); /** \brief assignment operator */ VtkOverlay3D &operator=(const VtkOverlay3D &); }; } // namespace mitk #endif // OVERLAY_H diff --git a/Core/Code/files.cmake b/Core/Code/files.cmake index dadcbcf3d6..5ab5124ae4 100644 --- a/Core/Code/files.cmake +++ b/Core/Code/files.cmake @@ -1,413 +1,414 @@ set(H_FILES Algorithms/itkImportMitkImageContainer.h Algorithms/itkImportMitkImageContainer.txx Algorithms/itkLocalVariationImageFilter.h Algorithms/itkLocalVariationImageFilter.txx Algorithms/itkMITKScalarImageToHistogramGenerator.h Algorithms/itkMITKScalarImageToHistogramGenerator.txx Algorithms/itkTotalVariationDenoisingImageFilter.h Algorithms/itkTotalVariationDenoisingImageFilter.txx Algorithms/itkTotalVariationSingleIterationImageFilter.h Algorithms/itkTotalVariationSingleIterationImageFilter.txx Algorithms/mitkBilateralFilter.h Algorithms/mitkBilateralFilter.cpp Algorithms/mitkInstantiateAccessFunctions.h Algorithms/mitkPixelTypeList.h Algorithms/mitkPPArithmeticDec.h Algorithms/mitkPPArgCount.h Algorithms/mitkPPCat.h Algorithms/mitkPPConfig.h Algorithms/mitkPPControlExprIIf.h Algorithms/mitkPPControlIf.h Algorithms/mitkPPControlIIf.h Algorithms/mitkPPDebugError.h Algorithms/mitkPPDetailAutoRec.h Algorithms/mitkPPDetailDMCAutoRec.h Algorithms/mitkPPExpand.h Algorithms/mitkPPFacilitiesEmpty.h Algorithms/mitkPPFacilitiesExpand.h Algorithms/mitkPPLogicalBool.h Algorithms/mitkPPRepetitionDetailDMCFor.h Algorithms/mitkPPRepetitionDetailEDGFor.h Algorithms/mitkPPRepetitionDetailFor.h Algorithms/mitkPPRepetitionDetailMSVCFor.h Algorithms/mitkPPRepetitionFor.h Algorithms/mitkPPSeqElem.h Algorithms/mitkPPSeqForEach.h Algorithms/mitkPPSeqForEachProduct.h Algorithms/mitkPPSeq.h Algorithms/mitkPPSeqEnum.h Algorithms/mitkPPSeqSize.h Algorithms/mitkPPSeqToTuple.h Algorithms/mitkPPStringize.h Algorithms/mitkPPTupleEat.h Algorithms/mitkPPTupleElem.h Algorithms/mitkPPTupleRem.h Algorithms/mitkClippedSurfaceBoundsCalculator.h Algorithms/mitkExtractSliceFilter.h Algorithms/mitkConvert2Dto3DImageFilter.h Algorithms/mitkPlaneClipping.h Common/mitkCommon.h Common/mitkExceptionMacro.h Common/mitkServiceBaseObject.h Common/mitkTestCaller.h Common/mitkTestFixture.h Common/mitkTesting.h Common/mitkTestingMacros.h DataManagement/mitkProportionalTimeGeometry.h DataManagement/mitkTimeGeometry.h DataManagement/mitkImageAccessByItk.h DataManagement/mitkImageCast.h DataManagement/mitkImagePixelAccessor.h DataManagement/mitkImagePixelReadAccessor.h DataManagement/mitkImagePixelWriteAccessor.h DataManagement/mitkImageReadAccessor.h DataManagement/mitkImageWriteAccessor.h DataManagement/mitkITKImageImport.h DataManagement/mitkITKImageImport.txx DataManagement/mitkImageToItk.h DataManagement/mitkImageToItk.txx DataManagement/mitkTimeSlicedGeometry.h # Deprecated, empty for compatibilty reasons. Interactions/mitkEventMapperAddOn.h Interfaces/mitkIDataNodeReader.h Rendering/mitkLocalStorageHandler.h IO/mitkPixelTypeTraits.h ) set(CPP_FILES Algorithms/mitkBaseDataSource.cpp Algorithms/mitkCompareImageDataFilter.cpp Algorithms/mitkMultiComponentImageDataComparisonFilter.cpp Algorithms/mitkDataNodeSource.cpp Algorithms/mitkGeometry2DDataToSurfaceFilter.cpp Algorithms/mitkHistogramGenerator.cpp Algorithms/mitkImageChannelSelector.cpp Algorithms/mitkImageSliceSelector.cpp Algorithms/mitkImageSource.cpp Algorithms/mitkImageTimeSelector.cpp Algorithms/mitkImageToImageFilter.cpp Algorithms/mitkImageToSurfaceFilter.cpp Algorithms/mitkPointSetSource.cpp Algorithms/mitkPointSetToPointSetFilter.cpp Algorithms/mitkRGBToRGBACastImageFilter.cpp Algorithms/mitkSubImageSelector.cpp Algorithms/mitkSurfaceSource.cpp Algorithms/mitkSurfaceToImageFilter.cpp Algorithms/mitkSurfaceToSurfaceFilter.cpp Algorithms/mitkUIDGenerator.cpp Algorithms/mitkVolumeCalculator.cpp Algorithms/mitkClippedSurfaceBoundsCalculator.cpp Algorithms/mitkExtractSliceFilter.cpp Algorithms/mitkConvert2Dto3DImageFilter.cpp Controllers/mitkBaseController.cpp Controllers/mitkCallbackFromGUIThread.cpp Controllers/mitkCameraController.cpp Controllers/mitkCameraRotationController.cpp Controllers/mitkCoreActivator.cpp Controllers/mitkFocusManager.cpp Controllers/mitkLimitedLinearUndo.cpp Controllers/mitkOperationEvent.cpp Controllers/mitkPlanePositionManager.cpp Controllers/mitkProgressBar.cpp Controllers/mitkRenderingManager.cpp Controllers/mitkSliceNavigationController.cpp Controllers/mitkSlicesCoordinator.cpp Controllers/mitkSlicesRotator.cpp Controllers/mitkSlicesSwiveller.cpp Controllers/mitkStatusBar.cpp Controllers/mitkStepper.cpp Controllers/mitkTestManager.cpp Controllers/mitkUndoController.cpp Controllers/mitkVerboseLimitedLinearUndo.cpp Controllers/mitkVtkInteractorCameraController.cpp Controllers/mitkVtkLayerController.cpp DataManagement/mitkProportionalTimeGeometry.cpp DataManagement/mitkTimeGeometry.cpp DataManagement/mitkAbstractTransformGeometry.cpp DataManagement/mitkAnnotationProperty.cpp DataManagement/mitkApplicationCursor.cpp DataManagement/mitkBaseData.cpp DataManagement/mitkBaseProperty.cpp DataManagement/mitkClippingProperty.cpp DataManagement/mitkChannelDescriptor.cpp DataManagement/mitkColorProperty.cpp DataManagement/mitkDataStorage.cpp # DataManagement/mitkDataTree.cpp DataManagement/mitkDataNode.cpp DataManagement/mitkDataNodeFactory.cpp # DataManagement/mitkDataTreeStorage.cpp DataManagement/mitkDisplayGeometry.cpp DataManagement/mitkEnumerationProperty.cpp DataManagement/mitkGeometry2D.cpp DataManagement/mitkGeometry2DData.cpp DataManagement/mitkGeometry3D.cpp DataManagement/mitkGeometryData.cpp DataManagement/mitkGroupTagProperty.cpp DataManagement/mitkImage.cpp DataManagement/mitkImageAccessorBase.cpp DataManagement/mitkImageCaster.cpp DataManagement/mitkImageCastPart1.cpp DataManagement/mitkImageCastPart2.cpp DataManagement/mitkImageCastPart3.cpp DataManagement/mitkImageCastPart4.cpp DataManagement/mitkImageDataItem.cpp DataManagement/mitkImageDescriptor.cpp DataManagement/mitkImageVtkAccessor.cpp DataManagement/mitkImageStatisticsHolder.cpp DataManagement/mitkLandmarkBasedCurvedGeometry.cpp DataManagement/mitkLandmarkProjectorBasedCurvedGeometry.cpp DataManagement/mitkLandmarkProjector.cpp DataManagement/mitkLevelWindow.cpp DataManagement/mitkLevelWindowManager.cpp DataManagement/mitkLevelWindowPreset.cpp DataManagement/mitkLevelWindowProperty.cpp DataManagement/mitkLookupTable.cpp DataManagement/mitkLookupTables.cpp # specializations of GenericLookupTable DataManagement/mitkMemoryUtilities.cpp DataManagement/mitkModalityProperty.cpp DataManagement/mitkModeOperation.cpp DataManagement/mitkNodePredicateAnd.cpp DataManagement/mitkNodePredicateBase.cpp DataManagement/mitkNodePredicateCompositeBase.cpp DataManagement/mitkNodePredicateData.cpp DataManagement/mitkNodePredicateDataType.cpp DataManagement/mitkNodePredicateDimension.cpp DataManagement/mitkNodePredicateFirstLevel.cpp DataManagement/mitkNodePredicateNot.cpp DataManagement/mitkNodePredicateOr.cpp DataManagement/mitkNodePredicateProperty.cpp DataManagement/mitkNodePredicateSource.cpp DataManagement/mitkPlaneOrientationProperty.cpp DataManagement/mitkPlaneGeometry.cpp DataManagement/mitkPlaneOperation.cpp DataManagement/mitkPointOperation.cpp DataManagement/mitkPointSet.cpp DataManagement/mitkProperties.cpp DataManagement/mitkPropertyList.cpp DataManagement/mitkRestorePlanePositionOperation.cpp DataManagement/mitkApplyTransformMatrixOperation.cpp DataManagement/mitkRotationOperation.cpp DataManagement/mitkSlicedData.cpp DataManagement/mitkSlicedGeometry3D.cpp DataManagement/mitkSmartPointerProperty.cpp DataManagement/mitkStandaloneDataStorage.cpp DataManagement/mitkStateTransitionOperation.cpp DataManagement/mitkStringProperty.cpp DataManagement/mitkSurface.cpp DataManagement/mitkSurfaceOperation.cpp DataManagement/mitkThinPlateSplineCurvedGeometry.cpp DataManagement/mitkTransferFunction.cpp DataManagement/mitkTransferFunctionProperty.cpp DataManagement/mitkTransferFunctionInitializer.cpp DataManagement/mitkVector.cpp DataManagement/mitkVtkInterpolationProperty.cpp DataManagement/mitkVtkRepresentationProperty.cpp DataManagement/mitkVtkResliceInterpolationProperty.cpp DataManagement/mitkVtkScalarModeProperty.cpp DataManagement/mitkVtkVolumeRenderingProperty.cpp DataManagement/mitkWeakPointerProperty.cpp DataManagement/mitkRenderingModeProperty.cpp DataManagement/mitkShaderProperty.cpp DataManagement/mitkResliceMethodProperty.cpp DataManagement/mitkMaterial.cpp DataManagement/mitkPointSetShapeProperty.cpp DataManagement/mitkFloatPropertyExtension.cpp DataManagement/mitkIntPropertyExtension.cpp DataManagement/mitkPropertyExtension.cpp DataManagement/mitkPropertyFilter.cpp DataManagement/mitkPropertyAliases.cpp DataManagement/mitkPropertyDescriptions.cpp DataManagement/mitkPropertyExtensions.cpp DataManagement/mitkPropertyFilters.cpp Interactions/mitkAction.cpp Interactions/mitkAffineInteractor.cpp Interactions/mitkBindDispatcherInteractor.cpp Interactions/mitkCoordinateSupplier.cpp Interactions/mitkDataInteractor.cpp Interactions/mitkDispatcher.cpp Interactions/mitkDisplayCoordinateOperation.cpp Interactions/mitkDisplayInteractor.cpp Interactions/mitkDisplayPositionEvent.cpp # Interactions/mitkDisplayVectorInteractorLevelWindow.cpp # legacy, prob even now unneeded # Interactions/mitkDisplayVectorInteractorScroll.cpp Interactions/mitkEvent.cpp Interactions/mitkEventConfig.cpp Interactions/mitkEventDescription.cpp Interactions/mitkEventFactory.cpp Interactions/mitkInteractionEventHandler.cpp Interactions/mitkEventMapper.cpp Interactions/mitkEventStateMachine.cpp Interactions/mitkGlobalInteraction.cpp Interactions/mitkInteractor.cpp Interactions/mitkInternalEvent.cpp Interactions/mitkInteractionEvent.cpp Interactions/mitkInteractionEventConst.cpp Interactions/mitkInteractionPositionEvent.cpp Interactions/mitkInteractionKeyEvent.cpp Interactions/mitkMousePressEvent.cpp Interactions/mitkMouseMoveEvent.cpp Interactions/mitkMouseReleaseEvent.cpp Interactions/mitkMouseWheelEvent.cpp Interactions/mitkMouseDoubleClickEvent.cpp Interactions/mitkMouseModeSwitcher.cpp Interactions/mitkMouseMovePointSetInteractor.cpp Interactions/mitkMoveBaseDataInteractor.cpp Interactions/mitkNodeDepententPointSetInteractor.cpp Interactions/mitkPointSetDataInteractor.cpp Interactions/mitkPointSetInteractor.cpp Interactions/mitkPositionEvent.cpp Interactions/mitkPositionTracker.cpp Interactions/mitkStateMachineAction.cpp Interactions/mitkStateMachineCondition.cpp Interactions/mitkStateMachineState.cpp Interactions/mitkStateMachineTransition.cpp Interactions/mitkState.cpp Interactions/mitkStateMachineContainer.cpp Interactions/mitkStateEvent.cpp Interactions/mitkStateMachine.cpp Interactions/mitkStateMachineFactory.cpp Interactions/mitkTransition.cpp Interactions/mitkWheelEvent.cpp Interactions/mitkKeyEvent.cpp Interactions/mitkVtkEventAdapter.cpp Interactions/mitkVtkInteractorStyle.cxx Interactions/mitkCrosshairPositionEvent.cpp Interfaces/mitkInteractionEventObserver.cpp Interfaces/mitkIShaderRepository.cpp Interfaces/mitkIPropertyAliases.cpp Interfaces/mitkIPropertyDescriptions.cpp Interfaces/mitkIPropertyExtensions.cpp Interfaces/mitkIPropertyFilters.cpp IO/mitkBaseDataIOFactory.cpp IO/mitkCoreDataNodeReader.cpp IO/mitkDicomSeriesReader.cpp IO/mitkDicomSR_LoadDICOMScalar.cpp IO/mitkDicomSR_LoadDICOMScalar4D.cpp IO/mitkDicomSR_LoadDICOMRGBPixel.cpp IO/mitkDicomSR_LoadDICOMRGBPixel4D.cpp IO/mitkDicomSR_ImageBlockDescriptor.cpp IO/mitkDicomSR_GantryTiltInformation.cpp IO/mitkDicomSR_SliceGroupingResult.cpp IO/mitkFileReader.cpp IO/mitkFileSeriesReader.cpp IO/mitkFileWriter.cpp # IO/mitkIpPicGet.c IO/mitkImageGenerator.cpp IO/mitkImageWriter.cpp IO/mitkImageWriterFactory.cpp IO/mitkItkImageFileIOFactory.cpp IO/mitkItkImageFileReader.cpp IO/mitkItkLoggingAdapter.cpp IO/mitkItkPictureWrite.cpp IO/mitkIOUtil.cpp IO/mitkLookupTableProperty.cpp IO/mitkOperation.cpp # IO/mitkPicFileIOFactory.cpp # IO/mitkPicFileReader.cpp # IO/mitkPicFileWriter.cpp # IO/mitkPicHelper.cpp # IO/mitkPicVolumeTimeSeriesIOFactory.cpp # IO/mitkPicVolumeTimeSeriesReader.cpp IO/mitkPixelType.cpp IO/mitkPointSetIOFactory.cpp IO/mitkPointSetReader.cpp IO/mitkPointSetWriter.cpp IO/mitkPointSetWriterFactory.cpp IO/mitkRawImageFileReader.cpp IO/mitkStandardFileLocations.cpp IO/mitkSTLFileIOFactory.cpp IO/mitkSTLFileReader.cpp IO/mitkSurfaceVtkWriter.cpp IO/mitkSurfaceVtkWriterFactory.cpp IO/mitkVtkLoggingAdapter.cpp IO/mitkVtiFileIOFactory.cpp IO/mitkVtiFileReader.cpp IO/mitkVtkImageIOFactory.cpp IO/mitkVtkImageReader.cpp IO/mitkVtkSurfaceIOFactory.cpp IO/mitkVtkSurfaceReader.cpp IO/vtkPointSetXMLParser.cpp IO/mitkLog.cpp Rendering/mitkBaseRenderer.cpp Rendering/mitkVtkMapper.cpp Rendering/mitkRenderWindowFrame.cpp Rendering/mitkGeometry2DDataMapper2D.cpp Rendering/mitkGeometry2DDataVtkMapper3D.cpp Rendering/mitkGLMapper.cpp Rendering/mitkGradientBackground.cpp Rendering/mitkManufacturerLogo.cpp Rendering/mitkMapper.cpp Rendering/mitkPointSetGLMapper2D.cpp Rendering/mitkPointSetVtkMapper2D.cpp Rendering/mitkPointSetVtkMapper3D.cpp Rendering/mitkPolyDataGLMapper2D.cpp Rendering/mitkSurfaceGLMapper2D.cpp Rendering/mitkSurfaceVtkMapper3D.cpp Rendering/mitkVolumeDataVtkMapper3D.cpp Rendering/mitkVtkPropRenderer.cpp Rendering/mitkVtkWidgetRendering.cpp Rendering/vtkMitkRectangleProp.cpp Rendering/vtkMitkRenderProp.cpp Rendering/mitkVtkEventProvider.cpp Rendering/mitkRenderWindow.cpp Rendering/mitkRenderWindowBase.cpp Rendering/mitkShaderRepository.cpp Rendering/mitkImageVtkMapper2D.cpp Rendering/vtkMitkThickSlicesFilter.cpp Rendering/vtkMitkLevelWindowFilter.cpp Rendering/vtkNeverTranslucentTexture.cpp Rendering/mitkRenderingTestHelper.cpp Rendering/mitkOverlay.cpp Rendering/mitkVtkOverlay.cpp Rendering/mitkVtkOverlay2D.cpp Rendering/mitkVtkOverlay3D.cpp Rendering/mitkOverlayManager.cpp Rendering/mitkAbstractOverlayLayouter.cpp Rendering/mitkTextOverlay2D.cpp Rendering/mitkTextOverlay3D.cpp Rendering/mitkLabelOverlay3D.cpp Rendering/mitkOverlay2DLayouter.cpp + Rendering/mitkScaleLegendOverlay Common/mitkException.cpp Common/mitkCommon.h Common/mitkCoreObjectFactoryBase.cpp Common/mitkCoreObjectFactory.cpp Common/mitkCoreServices.cpp ) list(APPEND CPP_FILES ${CppMicroServices_SOURCES}) set(RESOURCE_FILES Interactions/globalConfig.xml Interactions/DisplayInteraction.xml Interactions/DisplayConfig.xml Interactions/DisplayConfigPACS.xml Interactions/DisplayConfigPACSPan.xml Interactions/DisplayConfigPACSScroll.xml Interactions/DisplayConfigPACSZoom.xml Interactions/DisplayConfigPACSLevelWindow.xml Interactions/DisplayConfigMITK.xml Interactions/PointSet.xml Interactions/Legacy/StateMachine.xml Interactions/Legacy/DisplayConfigMITKTools.xml Interactions/PointSetConfig.xml Shaders/mitkShaderLighting.xml mitkLevelWindowPresets.xml )