00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKGEOMETRY2DDATAMAPPER2D_H_HEADER_INCLUDED_C19C0BFB 00020 #define MITKGEOMETRY2DDATAMAPPER2D_H_HEADER_INCLUDED_C19C0BFB 00021 00022 #include "mitkCommon.h" 00023 #include "mitkGLMapper2D.h" 00024 #include "mitkSurfaceGLMapper2D.h" 00025 #include "mitkDataStorage.h" 00026 #include "mitkDataNode.h" 00027 #include "mitkWeakPointer.h" 00028 00029 namespace mitk { 00030 00031 class BaseRenderer; 00032 00049 class MITK_CORE_EXPORT Geometry2DDataMapper2D : public GLMapper2D 00050 { 00051 00052 public: 00053 mitkClassMacro(Geometry2DDataMapper2D, GLMapper2D); 00054 00055 itkNewMacro(Self); 00056 00060 const Geometry2DData *GetInput(); 00061 00062 virtual void Paint( BaseRenderer *renderer ); 00063 00064 00065 virtual void SetDatastorageAndGeometryBaseNode(mitk::DataStorage::Pointer ds, mitk::DataNode::Pointer parent); 00066 00068 virtual void ApplyProperties( BaseRenderer *renderer ); 00069 00070 00071 protected: 00072 Geometry2DDataMapper2D(); 00073 00074 virtual ~Geometry2DDataMapper2D(); 00075 00076 virtual void GenerateData(); 00077 00078 void DrawOrientationArrow( Point2D &outerPoint, Point2D &innerPoint, 00079 const PlaneGeometry *planeGeometry, 00080 const PlaneGeometry *rendererPlaneGeometry, 00081 const DisplayGeometry *displayGeometry, 00082 bool positiveOrientation = true ); 00083 00084 SurfaceGLMapper2D::Pointer m_SurfaceMapper; 00085 00086 mitk::WeakPointer<mitk::DataStorage> m_DataStorage; 00087 DataNode::Pointer m_ParentNode; 00088 00089 typedef std::vector<DataNode*> NodesVectorType; 00090 NodesVectorType m_OtherGeometry2Ds; 00091 00092 bool m_RenderOrientationArrows; 00093 bool m_ArrowOrientationPositive; 00094 }; 00095 } // namespace mitk 00096 #endif /* MITKGEOMETRY2DDATAMAPPER2D_H_HEADER_INCLUDED_C19C0BFB */