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 #ifndef __vtkUnstructuredGridMapper_h 00019 #define __vtkUnstructuredGridMapper_h 00020 00021 #include "mitkCommon.h" 00022 #include "MitkExtExports.h" 00023 #include "mitkBoundingObject.h" 00024 00025 #include "vtkMapper.h" 00026 00027 class vtkPolyDataMapper; 00028 class vtkGeometryFilter; 00029 class vtkUnstructuredGrid; 00030 00031 class MitkExt_EXPORT vtkUnstructuredGridMapper : public vtkMapper 00032 { 00033 public: 00034 static vtkUnstructuredGridMapper *New(); 00035 vtkTypeRevisionMacro(vtkUnstructuredGridMapper,vtkMapper); 00036 void PrintSelf(ostream& os, vtkIndent indent); 00037 void Render(vtkRenderer *ren, vtkActor *act); 00038 00039 // Description: 00040 // Get the internal poly data mapper used to map data set to graphics system. 00041 vtkGetObjectMacro(PolyDataMapper, vtkPolyDataMapper); 00042 00043 // Description: 00044 // Release any graphics resources that are being consumed by this mapper. 00045 // The parameter window could be used to determine which graphic 00046 // resources to release. 00047 void ReleaseGraphicsResources(vtkWindow *); 00048 00049 // Description: 00050 // Get the mtime also considering the lookup table. 00051 unsigned long GetMTime(); 00052 00053 // Description: 00054 // Set the Input of this mapper. 00055 void SetInput(vtkUnstructuredGrid *input); 00056 vtkUnstructuredGrid *GetInput(); 00057 00058 void SetBoundingObject(mitk::BoundingObject* bo); 00059 00060 protected: 00061 vtkUnstructuredGridMapper(); 00062 ~vtkUnstructuredGridMapper(); 00063 00064 vtkGeometryFilter *GeometryExtractor; 00065 vtkPolyDataMapper *PolyDataMapper; 00066 00067 mitk::BoundingObject::Pointer m_BoundingObject; 00068 00069 virtual void ReportReferences(vtkGarbageCollector*); 00070 00071 // see algorithm for more info 00072 virtual int FillInputPortInformation(int port, vtkInformation* info); 00073 00074 private: 00075 vtkUnstructuredGridMapper(const vtkUnstructuredGridMapper&); // Not implemented. 00076 void operator=(const vtkUnstructuredGridMapper&); // Not implemented. 00077 }; 00078 00079 #endif // __vtkUnstructuredGridMapper_h