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 http://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 _MITK_SPLINE_VTK_MAPPER_3D__H 00020 #define _MITK_SPLINE_VTK_MAPPER_3D__H 00021 00022 #include "mitkPointSetVtkMapper3D.h" 00023 #include "MitkExtExports.h" 00024 00025 class vtkActor; 00026 class vtkAssembly; 00027 00028 namespace mitk 00029 { 00030 //##Documentation 00031 //## @brief Vtk-based mapper for Splines 00032 //## 00033 //## properties looked for: 00034 //## "line width" = with of the spline 00035 //## @ingroup Mapper 00036 00037 /************************************************************************/ 00038 /* 00039 * - \b "line width": (FloatProperty) line width of the spline 00040 00041 */ 00042 /************************************************************************/ 00043 class MitkExt_EXPORT SplineVtkMapper3D : public PointSetVtkMapper3D 00044 { 00045 public: 00046 00047 mitkClassMacro( SplineVtkMapper3D, PointSetVtkMapper3D ); 00048 00049 itkNewMacro( Self ); 00050 00051 virtual vtkProp* GetVtkProp(mitk::BaseRenderer *renderer); 00052 virtual void UpdateVtkTransform(mitk::BaseRenderer *renderer); 00053 00054 bool SplinesAreAvailable(); 00055 00056 vtkPolyData* GetSplinesPolyData(); 00057 00058 vtkActor* GetSplinesActor(); 00059 00060 unsigned long GetLastUpdateTime() const; 00061 00062 virtual void UpdateSpline(); 00063 00064 itkSetMacro( SplineResolution, unsigned int ); 00065 00066 itkGetMacro( SplineResolution, unsigned int ); 00067 00068 protected: 00069 00070 SplineVtkMapper3D(); 00071 00072 virtual ~SplineVtkMapper3D(); 00073 00074 virtual void GenerateData(); 00075 00076 virtual void GenerateData(mitk::BaseRenderer * renderer); 00077 00078 virtual void ApplyProperties(); 00079 00080 vtkActor* m_SplinesActor; 00081 00082 vtkPropAssembly* m_SplineAssembly; 00083 00084 bool m_SplinesAvailable; 00085 00086 bool m_SplinesAddedToAssembly; 00087 00088 unsigned int m_SplineResolution; 00089 00090 itk::TimeStamp m_SplineUpdateTime; 00091 }; 00092 00093 00094 } //namespace mitk 00095 00096 00097 #endif 00098 00099